NX7.5 Journal for polygon edge selection in CAE
NX7.5 Journal for polygon edge selection in CAE
(OP)
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





RE: NX7.5 Journal for polygon edge selection in CAE
CODE --> uf_object_types.h
I have not tested any of these, but they look promising.
All the UF types defined can be found in the uf_object_types.h file, which can be found in the UGOPEN subdirectory within your NX install directory.
www.nxjournaling.com
RE: NX7.5 Journal for polygon edge selection in CAE
Thanks,
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_caegeom_type
.Subtype = UFConstants.UF_caegeom_edge_subtype
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