Get Material Used in Part | Get Material Name | NX Open Programming

This journal get’s the name material used in part.

Imports System
Imports NXOpen

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


Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()

Dim workPart As NXOpen.Part = theSession.Parts.Work

Dim pm As NXOpen.PhysicalMaterial()
pm = workPart.MaterialManager.PhysicalMaterials.GetUsedMaterials

If pm.Length = 0 Then
MsgBox("Material not assigned")
Else
MsgBox("Physical Material " & pm(0).name)
End If


End Sub
End Module
API Information:

PhysicalMaterial Class should be used to retrieve used materials information from part.

Even this class is used to get material category (GetMaterialCategory), get material type (GetMaterialType), assign material (AssignObjects, AssignToAllBodies, AssignToBodiesNotUsingPreferredMaterial, AssignToBodiesWithoutMaterials) and lot more.

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 …