I would like to check as part of macro if (a user specified) element ID is either a CBUSH or a CBEAM? looking at the doc and recording a test journal it seems that the on;ly way is to use the 'NodeElementInfoBuilder'. Is this correct ?
Dim nodeElementInfoBuilder1 As CAE.NodeElementInfoBuilder
nodeElementInfoBuilder1 = caePart1.NodeElementInfoMgr.CreateNodeElementInfoB
The problem I can see with the Bulder is that I am not sur ehow to access the 'Elment Type' information
using the following
Dim elementIdToMatch As Integer = 1234 '456 Dim theFEElm as CAE.FEElement Dim femPart As NXOpen.CAE.BaseFemPart = theSimPart.FemPart Dim elementMap As NXOpen.CAE.FEElementLabelMap = femPart.BaseFEModel.FeelementLabelMap Dim element As NXOpen.CAE.FEElement = elementMap.GetElement(elementIdToMatch) If (Not element Is Nothing) Then 'Dim nodes As NXOpen.CAE.FENode() = element.GetNodes() theLW.WriteLine("Elm Shape is:" & element.shape) End If
returns a integer (1 in my case)
Any hints, suggestions, ideas, corrections , etc is welcome
Solved! Go to Solution.
CBUSH and CBEAM are only meaningful in the context of the NX Nastran solver language. The elements are stored internally based on shape and order (which are FEElement properties).
You can get the name indirectly by parsing the card name out of the string returned by CAE.FEElement.GetSolverCardSyntax()