Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IFRs on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NX7.5 Journal for polygon edge selection in CAE

Status
Not open for further replies.

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
 
Replies continue below

Recommended for you

Code:
UF_caegeom_type
  UF_caegeom_region_subtype
  UF_caegeom_face_subtype
  UF_caegeom_edge_subtype
  UF_caegeom_vertex_subtype
  UF_caegeom_body_subtype
  UF_caegeom_volume_subtype

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
 
That did the trick.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor