Dim s As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Sub Main()
Dim component As NXOpen.Tag
Dim message As String
Dim title As String = "Select a COMPONENT"
Dim scope As Integer = UFConstants.UF_UI_SEL_SCOPE_ANY_IN_ASSEMBLY
Dim response As Integer
Dim obj As NXOpen.Tag
Dim view As NXOpen.Tag
Dim cursor(2) As Double
Dim mask_cmpnt As UFUi.SelInitFnT = AddressOf mask_for_components
Try
ufs.Ui.SelectWithSingleDialog(message, title, scope, mask_cmpnt, _
Nothing, response, component, cursor, view)
Finally
ufs.Ui.UnlockUgAccess(UFConstants.UF_UI_FROM_CUSTOM)
End Try
ufs.Disp.SetHighlight(component, 0)
'============================================
Dim size() As String
Dim n As Integer
ufs.Modl.AskBlockParms(component, 0, size)
For n = 0 To size.Length
MsgBox(size(n))
Next
'============================================
End Sub
'=================================
Function mask_for_components(ByVal select_ As IntPtr, _
ByVal userdata As IntPtr) As Integer
Dim num_triples As Integer = 1
Dim mask_triples(0) As UFUi.Mask
mask_triples(0).object_type = UFConstants.UF_solid_type
mask_triples(0).object_subtype = UFConstants.UF_solid_body_subtype
mask_triples(0).solid_type = UFConstants.UF_UI_SEL_FEATURE_BODY