Imports NXOpen Imports NXOpen.UF Imports NXOpen.Utilities Module FindTag Sub Main() Dim ufs As UFSession = UFSession.GetUFSession Dim entry As String = "123456" Dim lng As Integer ufs.Ui.LockUgAccess(UFConstants.UF_UI_FROM_CUSTOM) ufs.Ui.AskStringInput("Enter Tag", entry, lng) ufs.Ui.UnlockUgAccess(UFConstants.UF_UI_FROM_CUSTOM) Dim ID As UInteger = CUInt(entry) Dim stat As Integer = ufs.Obj.AskStatus(CType(ID, Tag)) If stat = UFConstants.UF_OBJ_ALIVE Then Dim tobj As TaggedObject = NXObjectManager.GetObjectFromUInt(ID) Dim can_displ As Boolean ufs.Obj.IsDisplayable(tobj.Tag, can_displ) If can_displ Then CType(tobj, DisplayableObject).Highlight() Else ufs.Ui.DisplayMessage(ID & " is not a valid Tag", UFConstants.UF_UI_DISP_SELECTED) End If End Sub End Module