Quantcast
Channel: NX Journaling - Journaling / NXOpen API
Viewing all articles
Browse latest Browse all 783

Find Node Associated With Mesh Point

$
0
0

Hello All,

I am looking to get the node label from a mesh point after the mesh has been updated to include a node at the new meshpoint.

The code I have written takes in a selected meshpoint and I am trying to get the node label from that mesh. Unfortunately it doesn't get the node label.

Sub meshpointNodeLabel(meshpoint) 
        Dim workFemPart As NXOpen.CAE.FemPart=CType(theSession.Parts.BaseWork, NXOpen.CAE.FemPart)Dim displayFemPart As NXOpen.CAE.FemPart=CType(theSession.Parts.BaseDisplay, NXOpen.CAE.FemPart) 
        Dim tagObj As NXOpen.TaggedObject= meshpoint(0)Dim point As NXOpen.Point= tagObj
        Dim point3d As NXOpen.Point3d= point.Coordinates 
        'Function that sets meshpoint as NXOpen.CAE.MeshPointDim meshpoint1 As NXOpen.CAE.MeshPoint= GetClosestMeshPoint(point3d) 
        Dim meshPointProjectBuilder1 As NXOpen.CAE.MeshPointProjectBuilder=Nothing
        meshPointProjectBuilder1 = workFemPart.MeshPoints.CreateMeshpointProjectBuilder()
        meshPointProjectBuilder1.ProjectionTolerance=0.001
        meshPointProjectBuilder1.MeshPointToEdit= meshpoint1
        Dim meshNodeLabel AsInteger= meshPointProjectBuilder1.NodeLabel 
        Dim meshPointExistingPointBuilder1 As NXOpen.CAE.MeshPointExistingPointBuilder=Nothing
        meshPointExistingPointBuilder1 = workFemPart.MeshPoints.CreateMeshpointExistingPointBuilder()
        meshPointExistingPointBuilder1.MeshPointToEdit= meshpoint1
        Dim meshNodeLabel2 AsInteger= meshPointExistingPointBuilder1.NodeLabel 
        theLW.Open()
        theLW.WriteLine("The node label is: "& meshNodeLabel.ToString&" "& meshNodeLabel2.ToString)EndSub

Viewing all articles
Browse latest Browse all 783

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>