Get datum planes | Get total count | NX Open

Datum Planes are a planar reference feature to help define other features, such as swept bodies and features at angles to the faces of target solids.

This journal when used retrieves the number of Datum Planes used in part.

Imports System
Imports NXOpen

Module NXJournal
Sub Main (ByVal args() As String)

Dim theSession As Session = Session.GetSession()
Dim theUI As UI = UI.GetUI()
Dim workPart As NXOpen.Part = theSession.Parts.Work
'Insert code here
'find datum plane
Dim i as integer = 0
For Each pln As NXObject In workPart.Datums
If TypeOf (pln) Is NXOpen.DatumPlane Then
Dim datumpln As DatumPlane = CType(pln, DatumPlane)
i = i + 1
End If
Next
msgbox("Number of Datum Planes = " & i)

End Sub
End Module
API Information:

DatumPlane Class used in above journal represents a datum plane. 
More information can be found here – https://docs.plm.automation.siemens.com/data_services/resources/nx/10/nx_api/en_US/custom/nxopen_python_ref/NXOpen.DatumPlane.html

Social Connect

Learn CAD Automation using NX Open & Automate Design Tasks in Less Than 90 Days Without Any Prior Knowledge.

Attend the NX Open Masterclass to Discover

What’s Popular

Browse Popular, evergreen tutorials and how-to guides.

This journal get’s the name material used in part. Imports SystemImports NXOpenModule NXJournalSub Main (ByVal args() As String)Dim theSession As NXOpen.Session = …

This journal get’s the name material used in part. Imports SystemImports NXOpenModule NXJournalSub Main (ByVal args() As String)Dim theSession As NXOpen.Session = …

Datum Planes are a planar reference feature to help define other features, such as swept bodies and features at angles to the …

The use of computer-aided design (CAD) software has become an essential tool in engineering and manufacturing. There is no industry today that …

An attribute is a persistant way to store non-geometric data (i.e. not a point or curve or solid or feature). Attributes can …

An attribute is a persistant way to store non-geometric data (i.e. not a point or curve or solid or feature). Attributes can …

Design Engineers always spend more time on drawings for several reasons. A few of them are; Drawings are prime source of information …

It is quite possible to create a blank part and drawing sheet with one click of a button. Yes, you are right, …

NX Open is a powerful tool for automating NX CAD tasks. Below is source code that creates a new blank prt file …

As engineers and designers, we often have to work with complex 3D models and drawings, and extracting important information from these can …

NX Open is a powerful tool for working with imported geometries in NX.One common task that engineers and designers may need to …

https://youtu.be/5NWHlSM0sQ0 Q:Can you teach me nx open using visual basic .net? ChatGPT: Yes, I can help you get started with using Visual …

Leave a Comment

Your email address will not be published. Required fields are marked *