jhoelscher
Agricultural
- Jun 29, 2011
- 6
Using NX7.5 Advanced Simulation and trying to create a journal to automate a routine of selecting multiple polygon edges on which to apply a load for multiple subcases. Looking through the .NET reference and can't find command for selection manager to allow selection of polygon edges.
Similar commands are UFConstants.UF_pseudo_CAE_Node or UFConstants.UF_pseudo_CAE_Element.
What is the UFConstants for Polygon Edge?
Thanks,
Josh H.
Function select_an_edge(ByRef obj As Edge)
Dim ui As UI = NXOpen.UI.GetUI()
Dim mask(0) As Selection.MaskTriple
With mask(0)
.Type = UFConstants.UF_pseudo_object_type
.Subtype = UFConstants.UF_pseudo_CAE_subtype
.SolidBodySubtype = UFConstants.UF_pseudo_CAE"PolygonEdge"
End With
Dim cursor As Point3d = Nothing
Dim resp As Selection.Response = _
ui.SelectionManager.SelectObject("Select Edge", "Select Edge", _
Selection.SelectionScope.AnyInAssembly, _
Selection.SelectionAction.ClearAndEnableSpecific, _
False, False, mask, obj, cursor)
If resp = Selection.Response.ObjectSelected Or _
resp = Selection.Response.ObjectSelectedByName Then
Return Selection.Response.Ok
Else
Return Selection.Response.Cancel
End If
End Function
Similar commands are UFConstants.UF_pseudo_CAE_Node or UFConstants.UF_pseudo_CAE_Element.
What is the UFConstants for Polygon Edge?
Thanks,
Josh H.
Function select_an_edge(ByRef obj As Edge)
Dim ui As UI = NXOpen.UI.GetUI()
Dim mask(0) As Selection.MaskTriple
With mask(0)
.Type = UFConstants.UF_pseudo_object_type
.Subtype = UFConstants.UF_pseudo_CAE_subtype
.SolidBodySubtype = UFConstants.UF_pseudo_CAE"PolygonEdge"
End With
Dim cursor As Point3d = Nothing
Dim resp As Selection.Response = _
ui.SelectionManager.SelectObject("Select Edge", "Select Edge", _
Selection.SelectionScope.AnyInAssembly, _
Selection.SelectionAction.ClearAndEnableSpecific, _
False, False, mask, obj, cursor)
If resp = Selection.Response.ObjectSelected Or _
resp = Selection.Response.ObjectSelectedByName Then
Return Selection.Response.Ok
Else
Return Selection.Response.Cancel
End If
End Function