NX Native Reader
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
- 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 the application as Nastran MAT1
material collectors. When
@CreationType
=TreeOfComponents
if there is more than one material associated to the entities in a given part file, the application 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.
- 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.
- SPLM_LICENSE_SERVER
- Must point to the NX license server.
- UGS_LICENSE_BUNDLE
- Must specify the NX license bundle.
- Linux
- 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.
- It is advisable to specify %UGII_BASE_DIR%\UGII\ at the beginning of the PATH environment variable to avoid DLL version conflicts.
Import Options
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). |
Value | Description |
---|---|
on |
Import all generic attributes (global and related to single entities) as
metadata.
|
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 '%'. HyperMesh CFD will recognize it as it is the first character of the string.
|
Value | Description |
---|---|
on |
Assign body identifier as
metadata.
|
off |
Do not assign body identifier as metadata (default). |
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. |
Value | Description |
---|---|
on |
Read color attributes of geometric entities as metadata.
|
off |
Do not read color attributes (default). |
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. |
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:
where
In GUI import when Creation type” is set to Assemblies, this initializes the corresponding option in the NX Part browser. |
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. |
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. |
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. |
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. |
Value | Description |
---|---|
on |
Read density value as metadata (default).
|
off |
Do not read density value. |
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. |
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. |
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). |
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. |
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. |
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. |
Value | Description |
---|---|
on |
Import CAD coordinate systems as system collectors (default). |
off |
Do not import CAD coordinate systems. |
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). |
Value | Description |
---|---|
on |
Import free curves (wireframe entities) into the model (default). |
off |
Do not import free curves. |
Value | Description |
---|---|
on |
Import free points into the model (default). |
off |
Do not import free points. |
Value | Description |
---|---|
on |
Import parameters. Parameters are imported even if they are not associated to
any geometry. See also For parameters that have relationships to other parameters, parameter expressions are created. In addition,
|
off |
Do not import parameters (default). |
Value | Description |
---|---|
on |
Import geometry created by the WAVE Geometry Linker. |
off |
Do not import geometry created by the WAVE Geometry Linker (default). |
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. |
Value | Description |
---|---|
on |
Read layer value as metadata.
|
off |
Do not read layer value (default). |
Value | Description |
---|---|
on |
Generate metadata with the original CAD hierarchy within the
part.
|
off |
Do not generate metadata with the original CAD hierarchy within the part (default). |
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). |
Value | Description |
---|---|
string |
Name of the CAD attribute containing the material name info of the current part. Default is "P_MAT". |
Value | Description |
---|---|
string |
Name of the CAD attribute containing the PDM mesh flag name info of the current
part. Default is "MeshFlag". |
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. |
Value | Description |
---|---|
string |
The string is prefixed to all metadata names. No prefix is used by
default. See CAD Metadata Naming for more details. |
Value | Description |
---|---|
string |
Name of the CAD attribute containing the PDM material ID info of the current
part. Default is "MID". |
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. |
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. |
Value | Description |
---|---|
on |
Import original CAD entity IDs as
metadata.
|
off |
Do not import original CAD entity IDs as metadata (default). |
Value | Description |
---|---|
string |
Only import parameters with this prefix. All others will not be imported.
Default is "HW_"; meaningful only if |
Value | Description |
---|---|
string |
Name of the CAD attribute containing the PDM part number info of the current
part. Default is "PartNumber”. |
Value | Description |
---|---|
string |
Name of the CAD attribute containing PDM property ID info of the current
part. Default is "PID”. |
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> |
Value | Description |
---|---|
string |
Name of the CAD attribute containing PDM major revision info of the current
part. Default is "Revision”. |
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. |
Value | Description |
---|---|
double |
Define the model scaling factor during import. Default is 1.0. |
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. |
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. |
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. |
Value | Description |
---|---|
on |
Read surfaces, but do not create solid entities. |
off |
Create solid entities (default). |
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. |
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. |
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. |
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. |
Value | Description |
---|---|
on |
Create entity name as metadata.
|
FromBody |
Take entity from its parent body and create as metadata.
|
off |
Do not read tags (default). |
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). |
Value | Description |
---|---|
string |
Name of the CAD attribute containing the PDM thickness info of the current part. Default is "P_GAUGE". |
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). |
Value | Description |
---|---|
string |
Name of the CAD attribute containing the PDM UID info of the current
part. Default is "UID". |
Value | Description |
---|---|
on |
Create metadata to track the unique CAD ID. When a Parasolid body is present in the Parasolid assembly, the Parasolid instance ID is appended to the 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.
|
off |
Do not create metadata to track the unique CAD ID (default). |
Supported Metadata
Type | Entities | Description |
---|---|---|
string |
|
Identifier of the CAD body containing the entity. Generated when
|
Type | Entities | Description |
---|---|---|
|
|
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 |
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 |
Type | Entities | Description |
---|---|---|
double |
solids |
The value of the density of a solid. Generated when |
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 |
Type | Entities | Description |
---|---|---|
integer |
|
Value of the layer of an entity. Generated when
|
Type | Entities | Description |
---|---|---|
string |
|
Hierarchy of an entity within a part. Generated when
|
Type | Entities | Description |
---|---|---|
integer |
comps |
Set to 1 if the Merge assemblies option is chosen in the Part browser. Generated when |
Type | Entities | Description |
---|---|---|
integer |
comps if hierarchy as Assemblies; parts if hierarchy as Parts | Model units specified in the CAD file.
This is always generated. |
Type | Entities | Description |
---|---|---|
integer |
comps | Generated and set to 1 when
@CreationType ="TreeOfComponents ", if the
component contains midsurface geometry. |
Type | Entities | Description |
---|---|---|
string |
points lines surfs solids parts |
The original CAD entity ID. Generated when |
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 |
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. |
Type | Entities | Description |
---|---|---|
string |
assems comps |
The NX part name of the assembly/comp. This is always generated. |
Type | Entities | Description |
---|---|---|
string |
|
For assemblies the name of the NX assembly. For geometrical entities a combination of the body identifiers and the entity ID. Generated when
|
Type | Entities | Description |
---|---|---|
|
points lines surfs solids comps assems |
The Generated when |
NX Part 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 .
- 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
orDB_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.
- Choose <Part Name> to use the string attribute
- Save settings as default
- Save the settings into a customized ug.ini file in the current working directory for future use.
- 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.
Load Options
The NX Native reader provides additional customization options for loading of NX models. The ug_load_options.def file can be used for this purpose.
- This file can be setup and written out of NX using the dialog.
- The NX Native reader passes the options in this file to UGOpen during import, and NX utilizes the options accordingly
A default version of the ug_load_options.def file is located in the directory [Altair Home]/io/afc_translators/bin/[platform]. When the NX Native reader is activated, it first checks the current working directory for the ug_load_options.def file. If the file is not found, the translator uses the default ug_load_options.def file in the above directory. In this way the ug_load_options.def file can have "global" or "local" user scope. For instance, "local" user changes for a current job can be made by copying and modifying the ug_load_options.def file in the local current working directory.