The NX reader utilizes the UGOpen library to read files from NX.

The reader relies on a valid NX installation and license to access these libraries. Environment variables must be set appropriately to ensure proper access to these libraries. Any NX file formats not supported by the available NX installation are not supported.

## Supported Entities

Entities supported by the Native reader.
• UF_coordinate_system
• UF_point
• UF_line
• UF_circle
• UF_conic
• UF_spline
• UF_faceted_model
• UF_solid
• When reading an NX assembly or part file with material information, the material information is read into HyperWorks CFD as Nastran MAT1 material collectors. When @CreationType = TreeOfComponents if there is more than one material associated to the entities in a given part file, HyperWorks CFD splits the part into multiple component collectors. When @CreationType = Parts this happens depending on the split type, that is a material is created and associated to the component only if there is just one material associated to the entities of that component. A property collector is always created when importing material information and assigned to the component (see note below), and the material collector is then associated to the respective property collector.
• The NX Native reader also recognizes midsurface thickness information for each part of an assembly. After the part is imported, the thickness information is stored in Nastran PSHELL property collectors. If no thickness information is present but material information does exist, an empty PSHELL property collector is created and the material is assigned to the property collector. The property collector is then assigned to the component collector.
• When @creationType = TreeOfComponents, midsurface geometry is organized into a separate component from the solid geometry it is associated to, using a similar name as the solid component. When @CreationType = Parts this happens depending on the split type.

## Environment Variables

Since the NX reader needs to use the UGOpen library during the run time, it requires that a valid NX installation and NX license be present and available to the user with the assemblies, gateway and solid_modeling modules.

Set the following environment variables prior to starting:
Windows
UGII_BASE_DIR
Must point to the NX installation directory1.
UGII_ROOT_DIR
Must point to the NX installation UGII directory1.
PATH
Must include the %UGII_BASE_DIR%\UGII\ directory, and for NX11 and NX12 the %UGII_BASE_DIR%\NXBIN directory2.
Must point to the NX license server.
Must specify the NX license bundle.
Example: NX installation located at C:\Program Files\Siemens\NX 12.0
UGII_BASE_DIR: C:\Program Files\Siemens\NX 12.0
UGII_ROOT_DIR: %UGII_BASE_DIR%\UGII\
PATH: %UGII_BASE_DIR%\UGII\
Linux
UGII_BASE_DIR
Must point to the NX installation directory.1
UGII_ROOT_DIR
Must point to the NX installation bin directory.1
Must point to the NX license server.
Must point to the NX license server.
Must specify the NX license bundle.
Example: NX installation located at /soft/usr/ugs120
UGII_BASE_DIR: /soft/usr/ugs120
UGII_ROOT_DIR: /soft/usr/ugs120/bin/
1. UGII_ROOT_DIR is needed only for NX10. NX is very sensitive about the environment variables. You should NOT have '/' at the end of UGII_BASE_DIR path and you MUST have '/' at the end of UGII_ROOT_DIR path.
2. It is advisable to specify %UGII_BASE_DIR%\UGII\ at the beginning of the PATH environment variable to avoid DLL version conflicts.

## Import Options

The NX Native reader uses the ug_reader.ini file. The NX reader also includes a browser to control the import of assemblies, the sorting of entities by component, and various other import details. The NX Part browser will come up just for GUI import when Creation type is set to Assemblies.
@AssignThicknessToSolids
Value Description
on Assign thickness to a solid if the owning part has an attribute with the name THICKNESS. The thickness value is the value of this attribute.
off Do not assign thickness to solids (default).
@AttributesAsMetadata
Value Description
on Import all generic attributes (global and related to single entities) as metadata.

<name>

off Do not import attributes related to single entities. Only import global attributes.
%attribute1%attribute2%attribute3 Import specified generic attributes as metadata.

The attribute names are listed, separated by a character that you choose, and inserted as the first element of the string. The example uses '%' as a separator. You can choose another character as a separator, in case one of the listed attribute names contains '%'. HyperWorks CFD will recognize it as it is the first character of the string.

<name>

@BodyIdAsMetadata
Value Description
on Assign body identifier as metadata.

BODY_ID

off Do not assign body identifier as metadata (default).
@CleanupTol
Value Description
double A negative value (default) indicates to use the auto cleanup tolerance. A value greater than the calculated auto cleanup tolerance indicates to use that specific tolerance. Refer to the CAD Cleanup Tolerance.
@ColorsAsMetadata
Value Description
on

COLOR_RGB

off Do not read color attributes (default).
@ComponentAttributes
Value Description
string In batch mode, this corresponds to the NX Part Browser Component attributes option.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@ComponentNameFormat
Value Description
string In batch mode, this corresponds to the NX Part Browser Assign components by name option; the default value is "default", that is the standard component naming; to have custom component name one should set:

@ComponentNameFormat = "custom <custom1><custom2>...<customnn>"

where <customi> could be one of the following:

<Part Name>, <Part Number>, <RID-PDI>, <Layer>, <Category>, <Instance Name>, <Material Name>, <Thickness>, <UG Body ID>, <UG Tag>, <Solid Name>.

In GUI import when Creation type” is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@CoordinateSystem
Value Description
global In batch mode, individual parts in an assembly are imported into the global coordinate system (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

local In batch mode, individual parts in an assembly are imported into their local coordinate system.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@CreateMatsAndProps
Value Description
on Create materials and properties in HyperMesh if material and thickness data are found in the model (default).
off Do not create materials and properties in HyperMesh.
@CreateWeldsInHypermesh
Value Description
on In batch mode, welds are created in HyperMesh.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

off In batch mode, welds are not created in HyperMesh (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@CreationType
Value Description
Parts Generate a full part-based hierarchy.
BOMOnly Generate an empty part-based hierarchy.
TreeOfComponents Generate an assemblies/components based hierarchy.
PackIntoSinglePart Consolidate hierarchy into a single part.
@DensityAsMetadata
Value Description
on

DENSITY

off Do not read density value.
@DisableLayers
Value Description
string This corresponds to the NX Part browser Disable option in Layer filtering mode.

The layers to disable in the import should be listed with the same rules as for the NX Part browser entry.

@Display
Value Description
categories In batch mode, this corresponds to the NX Part browser Categories selection.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

layerfiltering In batch mode, this corresponds to the NX Part browser Layer filtering selection (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@DoNotMergeEdges
Value Description
on Preserve the original geometry edges, instead of merging them together during the import cleanup phase.
off Merge edges together during the import cleanup phase (default).
@EnabledLayers
Value Description
string This corresponds to the NX Part browser Enable option in Layer filtering mode.

The layers to enable in the import should be listed with the same rules as for the NX Part browser entry.

@ExportToMasterWeldFile
Value Description
on In batch mode, a master weld file is created.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

off In batch mode, no master weld file is created (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@ImportBlanked
Value Description
on In batch mode, imports entities that are hidden, blanked, or no show.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

off In batch mode, do not import entities that are hidden, blanked, or no show (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@ImportCoordinateSystems
Value Description
on Import CAD coordinate systems as system collectors (default).
off Do not import CAD coordinate systems.
@ImportForVisualizationOnly
Value Description
on

Import the model for visualization purposes only.

This skips many of the import steps (cleanup, stitching, solid creation, and so on) to provide a faster import. The resulting model may not be suitable for other uses.

off Import the model in the normal fashion (default).
@ImportFreeCurves
Value Description
on Import free curves (wireframe entities) into the model (default).
off Do not import free curves.
@ImportFreePoints
Value Description
on Import free points into the model (default).
off Do not import free points.
@ImportParameters
Value Description
on Import parameters.

Parameters are imported even if they are not associated to any geometry. See also @ParametersPrefix.

For parameters that have relationships to other parameters, parameter expressions are created.

In addition, @DoNotMergeEdges is automatically set to "on" when using this option, to give the best results for edge parameter association.

CADIO_FEAT_PARAM_IDS

FULL_NAME

off Do not import parameters (default).
@ImportWaveLinkedGeometry
Value Description
on Import geometry created by the WAVE Geometry Linker.
off Do not import geometry created by the WAVE Geometry Linker (default).
@IncludeWireFrame
Value Description
on In batch mode, import free curves and points (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

off In batch mode, do not import free curves and points.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@LayerAsMetadata
Value Description
on Read layer value as metadata.

LAYER

off Do not read layer value (default).
@LegacyHierarchyAsMetadata
Value Description
on Generate metadata with the original CAD hierarchy within the part.

LEGACY_HIERARCHY

off Do not generate metadata with the original CAD hierarchy within the part (default).
@MatchUGAssemblyHierarachy
Value Description
on The assembly hierarchy created in HyperMesh is the same as seen in NX.
off An assembly level is created in HyperMesh for parts contained in an assembly (default).
@MaterialName
Value Description
string Name of the CAD attribute containing the material name info of the current part. Default is "P_MAT".
@MeshFlag
Value Description
string Name of the CAD attribute containing the PDM mesh flag name info of the current part.

Default is "MeshFlag".

@Merge
Value Description
on In batch mode, the MERGE metadata is generated.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

off In batch mode, the MERGE metadata is not generated.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@MetadataPrefix
Value Description
string The string is prefixed to all metadata names. No prefix is used by default.

@MID
Value Description
string Name of the CAD attribute containing the PDM material ID info of the current part.

Default is "MID".

@Midsurface
Value Description
on In batch mode, and when @Display= layerfiltering, midsurfaces are imported.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

off In batch mode, and when @Display= layerfiltering, midsurfaces are not imported (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@ModelAttributes
Value Description
string In batch mode, this corresponds to the NX Part browser Model attributes option.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@OriginalIdAsMetadata
Value Description
on Import original CAD entity IDs as metadata.

ORIGINAL_ID

off Do not import original CAD entity IDs as metadata (default).
@ParametersPrefix
Value Description
string Only import parameters with this prefix. All others will not be imported.

Default is "HW_"; meaningful only if @ImportParameters = "on".

@PartNumber
Value Description
string Name of the CAD attribute containing the PDM part number info of the current part.

Default is "PartNumber”.

@PID
Value Description
string Name of the CAD attribute containing PDM property ID info of the current part.

Default is "PID”.

@PropertyName
Value Description
string Name of the properties created in HyperMesh. It can contain “special” strings that will be replaced with their meaning: <COMPONENT_NAME> is the name of the component to which the property is associated, <PROPERTY_CARD_NAME> is the name of the property card. Default is <COMPONENT_NAME>
@Revision
Value Description
string Name of the CAD attribute containing PDM major revision info of the current part.

Default is "Revision”.

@SaveSettingsAsDefault
Value Description
on In batch mode, the ug_reader.ini file is saved with the current settings.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

off In batch mode, the ug_reader.ini file is not saved (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@ScaleFactor
Value Description
double Define the model scaling factor during import.

Default is 1.0.

@SelectedCategories
Value Description
string This corresponds to the NX Part browser option Categories; they should be listed as they are written in the command file string: “<name1_length> <name1> <name2_length> <name2>…”, where <name<i>_length> is a number representing the string length of the ith category name.
@SelectedParts
Value Description
string This corresponds to the NX Part browser Parts selection; they should be listed as they are written in the command file string: “<handle1_length> <handle1> <handle2_length> <handle2>…”, where <handle<i>> is a string representing the handle of the part as retrieved by UGOpen libraries and <handle<i>_length> is the string length.
@ShowAllCategories
Value Description
on In batch mode, when @Display= categories, all categories will be retrieved and displayed.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

off In batch mode, when @Display= categories, only categories in the top assembly will be retrieved and displayed (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@SkipCreationOfSolid
Value Description
on Read surfaces, but do not create solid entities.
off Create solid entities (default).
@Solid
Value Description
on In batch mode, when @Display= layerfiltering, solids are imported (default).

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

off In batch mode, when @Display= layerfiltering, solids are not imported.

In GUI import when Creation type is set to Assemblies, this initializes the corresponding option in the NX Part browser.

@SplitComponents
Value Description
Body Generate body-based component (default if CreationType=Parts).
Category Generate category-based component.
Layer Generate layer-based component.
Material Generate material-based component.
InstanceName, Part, PartName, PartNumber, RID-PDI, UGTag Generate part-based component (and the name is given based on the specific split value).
Solid Generate solid-based component.
Thickness Generate thickness-based component.
@SplitPeriodicFaces
Value Description
on Split periodic surfaces to improve the quality and robustness of the import (default).
off Import periodic surfaces as a single surface with a seam edge.
@StitchDifferentSheets
Value Description
on Stitching across different sheet bodies belonging to the same NX part/instance is enabled (default).
off Stitching across different NX sheet bodies is disabled.
@TagsAsMetadata
Value Description
on

TAG

FromBody

Take entity from its parent body and create as metadata.

TAG

off Do not read tags (default).
@TargetUnits
Value Description
CAD units Keep the units of the CAD files (default for GUI).
MKS [m kg N s] Convert to the corresponding units system.
MMKS [mm kg N s] Convert to the corresponding units system.
MPA [mm t N s] Convert to the corresponding units system.
CGS [cm g dyn s] Convert to the corresponding units system.
MMKNMS [mm kg kN ms] Convert to the corresponding units system.
MMGNMS [mm g N ms] Convert to the corresponding units system.
IPS Std [in pounds lbf s] Convert to the corresponding units system.
IPS Grav [in slinch lbf s] Convert to the corresponding units system.
FPS Std [ft pounds lbf s] Convert to the corresponding units system.
FPS Grav [ft slug lbf s] Convert to the corresponding units system.
Scale factor Apply the corresponding scale factor (default for no GUI to allow supporting legacy scripts).
@ThicknessName
Value Description
string Name of the CAD attribute containing the PDM thickness info of the current part. Default is "P_GAUGE".
@Timeout
Value Description
seconds Defines a timeout value (in seconds) that is used to abort the import of a CAD file. The timeout covers only the time spent in processing done within the third-party library calls (load and prepare the data to be sent to HyperMesh). Once the data is sent to HyperMesh the timeout no longer applies. This timeout applies individually to each CAD file being imported. If you import a single file (either an individual part or a master assembly file), it applies to the import of the entire file. If you import multiple files (such as selecting multiple files, or performing Representation Load from the Part Browser), it applies individually to each file. Default is empty (no timeout).
@UID
Value Description
string Name of the CAD attribute containing the PDM UID info of the current part.

Default is "UID".

@UniqueIdAsMetadata
Value Description
on

When a Parasolid body is present in the Parasolid assembly, the Parasolid instance ID is appended to the ORIGINAL_ID using "-". For each assembly level, its instance ID will be appended in the same way.

For example:

No body entities present in the assembly: 20

Body entities present in a single level assembly: 1-20

Body entities present in a multiple level assembly: 1-4-2-20

The same identifier can be obtained for two entities when a single entity is split during import.

UNIQUE_ID

off Do not create metadata to track the unique CAD ID (default).

BODY_ID
Type Entities Description
string
• points
• lines
• surfs
Identifier of the CAD body containing the entity.

Generated when @BodyIDAsMetadata=on

CADIO_FEAT_PARAM_IDS
Type Entities Description
• entity
• array
• points
• lines
• surfs
• solids
This metadata is assigned to the geometric objects for which the imported parameters apply. One or more parameters may control a particular object.

This association is only for parameters that are directly assigned to the object in NX. The association is not done for any parameters that may be part of an expression, since that relationship can be determined from the parameter expression itself.

Generated when @ImportParameters = on

COLOR_RGB
Type Entities Description
string comps, assems if hierarchy as Assemblies; parts if hierarchy as Parts

Three RGB values, ranging from 0 to 255, indicating the color of the entity in the CAD model.

Generated when @ColorsAsMetadata = on

DENSITY
Type Entities Description
double solids

The value of the density of a solid.

Generated when @DensityAsMetadata = on

FULL_NAME
Type Entities Description
string params Parameters are named with the NX default name.

This contains the full name of the parameter, as defined in NX.

Generated when @ImportParameters = on
LAYER
Type Entities Description
integer
• points
• lines
• surfs
• solids
Value of the layer of an entity.

Generated when @LayerAsMetadata=on

LEGACY_HIERARCHY
Type Entities Description
string
• points
• lines
• surfs
Hierarchy of an entity within a part.

Generated when @LegacyHierarchyAsMetadata=on

MERGE
Type Entities Description
integer comps

Set to 1 if the Merge assemblies option is chosen in the Part browser.

Generated when @Merge = on

MODELUNIT
Type Entities Description
integer comps if hierarchy as Assemblies; parts if hierarchy as Parts Model units specified in the CAD file.
• 1 = inches
• 2 = millimeters
• 4 = feet
• 5 = miles
• 6 = meters
• 7 = kilometers
• 8 = mils
• 9 = microns
• 10 = centimeters
• 11 = microinches
• 12 = decimeters
• 13 = yards

This is always generated.

NX_MIDSURFACE
Type Entities Description
integer comps Generated and set to 1 when @CreationType="TreeOfComponents", if the component contains midsurface geometry.
ORIGINAL_ID
Type Entities Description
string

points

lines

surfs

solids

parts

Generated when @OriginalIdAsMetadata = on

TAG
Type Entities Description
string

points

lines

edges

surfs

solids

The tag (name) of the entity as read from the CAD model, if one exists.

Generated when @TagsAsMetadata = on

UG_DESCRIPTIVE_PARTNAME
Type Entities Description
string

assems

comps

The NX descriptive part name of the assembly/comp. For example, its attribute DB_PART_DESC. This is always generated, if present.
UG_PARTNAME
Type Entities Description
string

assems

comps

The NX part name of the assembly/comp. This is always generated.
UNIQUE_ID
Type Entities Description
string
• assems
• points
• lines
• surfs
• solids
For assemblies the name of the NX assembly.

For geometrical entities a combination of the body identifiers and the entity ID.

Generated when @UniqueIdAsMetadata = on

<name>
Type Entities Description

integer

double

string

points

lines

surfs

solids

comps

assems

The <name> field is the attribute name and the integer/double/string is the value of the attribute.

Generated when @AttributesAsMetadata = on

## NXPart Browser

Use the NX Part Browser to filter and select options for importing NX parts and assemblies. The browser opens when you import an NX file from the Import browser when Creation type is set to Assemblies.

On the left of the browser is the model tree. The parts listed in the model tree are shown either using the File name or Instance name options. To select a part import, select its check box. If the root is selected, all parts are considered selected. Root assembly/part is selected by default.

The NX Part Browser searches all part files for weld information as well as mid-surface definitions. Parts in the assembly that have welds assembled to them are marked with . Parts with mid-surface definitions are marked with .

On the right of the browser are the available import options.
Display by
Method used to import parts specified in the model tree.
• Choose Categories to import the selected Categories for the parts specified in the model tree. Some categories may be available in multiple parts/assemblies and some may be available in only one. You can choose multiple categories to import. All the categories for the selected parts are imported.
• Choose Layer filtering to import only selected layers for the parts specified in the model tree. You can specify specific layers to Enable or Disable for import. To designate more than one layer or a range of layers, use commas and dashes. For example, 1,4-7 designates layers 1, 4, 5, 6 and 7. An asterisk (*) matches everything. Only one of these two options may be specified. If any layers are specified for Disable, all other layers containing entities are imported. The default is to enable all layers.
You can additionally choose to import the Midsurface geometry and/or the Solid geometry. There are three options for Midsurface import.
• Choose Off (default) to not import any midsurface geometry.
• Choose on to import only the midsurface geometry that is visible.
• Choose always to import all midsurface geometry regardless of visibility.
Include wireframe geometry
Import free curves and points. The default is to import these entities.
Include invisible geometry
Import geometry contained in invisible layers. The default is to not import these entities.
Assign components by name
Customizes the organization and names of components (NX parts). The naming options are specified using the Format option.
• Choose <Part Name> to use the string attribute DB_PART_NAME from the part. If that attribute does not exist, the part file name is used.
• Choose <Part Number> to use the string attribute DB_PART_NUMBER or DB_PART_NO from the part. If that attribute does not exist, the part filename is used.
• Choose <Category> to creates and name components based off of the NX categories associated with the geometry.
• Choose <RID-PDI> to use the string attribute DB_PART_REV from the part.
• Choose <Layer> to create and name components based off of the layers of the geometry being imported.
• Choose <Instance Name> to use the name of the part's instance in an assembly. If the part is the root of an assembly, the part filename is used.
• Choose <Material Name> to use the name of the material if a material is specified for the geometry being imported. Otherwise, the name of the component is unaltered.
• Choose <Thickness> to use the thickness value if the geometry being imported is a midsurface with thickness information. Otherwise, the name of the component is unaltered.
• Choose <UG Body ID> to use the internal numerical ID of each geometric body. This value is unique for each geometric body imported.
• Choose <UG Tag> to use the internal numerical tag of the part instance. This value is unique for each part instance imported.
Save settings as default
Save the settings into a customized ug.ini file in the current working directory for future use.
Access additional options for coordinate system, weld creation, merging assemblies, and importing of attributes by clicking Options at the bottom of the browser.
Co-ordinate system
Import an individual part from an assembly in the global coordinate system or its local coordinate system. If the whole assembly file is selected, it can only be imported in the global coordinate system.
Create welds in HyperMesh
Create welds, and organized them in a component named ^weld.
• If the part file has mid-surface definition and the Midsurface option is selected while reading the part, the welds are created between two mid-surfaces.
• If there is no mid-surface definition or the Midsurface option is not selected while importing the part, the welds are created as they were initially created in the NX part file.
Export to master weld file
Write a master weld file from the weld data that can later be used to create the welds.
Merge Assemblies
Merge parts with the existing assembly if some parts of an assembly have been previously loaded and you want to add additional parts from the same assembly.
Model and component attributes
Select the attributes in the NX part file that are to be imported. Currently, the NX readers have the ability to import any user-defined attributes attached to a NX part, and attach that information as metadata to the component corresponding to the NX part. Specify the naming options by clicking Format.

The values setup and used to populate the NX Part Browser are stored in a file named ughm16.txt, located in the current working directory.