2.5. UG/NX

These procedures assume that you are running NX 9.0, or 10.0 and ANSYS 18.2. In addition, the part file you want to import must be created using NX.

When initiating a part file import, you can select the layers and entities to import, and can specify whether the part file is to be defeatured after import. You can use the ANSYS GUI or the ~UGIN command.

Import with ANSYS GUI

  1. Select File> Import> NX. The ANSYS Connection for NX dialog box appears, as shown below.

    Figure 2.5:  ANSYS Connection for NX Dialog

    ANSYS Connection for NX Dialog


  2. Select the desired UG/NX file. In addition to the file name, file location and file type options, you can modify the following values as necessary.

    • Use selected layers only - Import specific layers of the NX part by checking the Use selected layers only button and by entering the layer numbers to be imported in the field beside it. You can specify one layer (for example, 5) or a range of layers (for example, 7-20). The default is to import all layers (1-256).

    • Allow Defeaturing - Select this button to store the model in the solid database format so that it can be defeatured after import. The default is to store the model in neutral database format, which restricts defeaturing after import.

    • Geometry Type - Import the part as:

      • Solids Only - imported as ANSYS volumes (default).

      • Surfaces Only - Imported as ANSYS areas.

      • Wireframe Only - Imported as ANSYS lines.

      • All - Import all entities; use this when the file contains multiple entity types.

  3. Press OK.

Import with ANSYS ~UGIN Command

You can also use the following command line method to import your NX model.

Command Syntax

~UGIN,Name,Extension,Path,Entity,LAYER,FMT

Troubleshooting

For general troubleshooting information, please see Troubleshooting Connection Issues, or examine Problems Specific to the Connection for NX for specific issues.

2.5.1. Additional Output Files from NX Conversions

The NX-to-ANSYS import produces the following two files in addition to the database file.

  • partname.tbl

  • partname.attr

The partname.tbl file is the NX-to-ANSYS correspondence table file, which relates NX item names to ANSYS IDs and types.

Here is a sample NX-to-ANSYS correspondence table file:

!
! *** UNIGRAPHICS-TO-ANSYS CORRESPONDENCE TABLE FILE ***

.
.
.
!     Part        : square_cube
!     Units       : Inches
!     Selected Layers   : 1-256
!     Geometry Type     : Solids Only
!
!     Translator Working Tolerance:  5.0000000E-004
!     Part system Tolerance (ref):   1.0000000E-003
!
!Object Name                      ANSYS Type                ANSYS ID
NS_SIDE_FACE                        AREA                      4     
NS_PEG_FACE                         AREA                      15    

The NX attribute name appears in the first column, the ANSYS entity type appears in the second, and the ANSYS ID appears in the third.

The partname.attr file is the NX-to-ANSYS attribute file, which lists the object attributes that are applied in NX and that are for use in ANSYS. These attributes may be used to add mesh control information, load and boundary condition information, or material or element property information.

Here is a sample NX-to-ANSYS attribute file:

!
! *** UNIGRAPHICS-TO-ANSYS ATTRIBUTE FILE ***

. 
. 
.
!
!     Part        : square_cube
!     Units       : Inches
!     Selected Layers   : 1-256
!     Geometry Type     : Solids Only
!
!     Translator Working Tolerance:  5.0000000E-004
!     Part system Tolerance (ref):   1.0000000E-003
!
!Object Name                        Keyword                   Value
RMsquare_cube.prt R000000b4000      EDGE_4                  (str)  bottom edge 
RMsquare_cube.prt R000000ac000      FACE_3                  (str)  face3456    
NS_PEG_FACE                         PEG_FACE                (real) 1258.0000   

Saving Modified Part To save the modified part produced during the ANSYS NX Connection import, please use command line '-s [SAVE_AS_LOCATION]' or set as an environment variable 'ANSCONUG_SAVE_PART_AS=[SAVE_AS_LOCATION]'. The 'SAVE_AS_LOCATION' should be the full path to the part name where the user wants to save the modified NX part.

2.5.2. Environment Variables for NX

NX and the connection for NX require a number of environment variables to run properly. One of these variables is set by the ANSYS installation, and others are set by the NX installation. Because most of these environment variables are set during the installation, you will only need to reset them if you have used non-default installation directories.


Note:   Both of the following variables must be set to import a part. Check to see what variables have been set for your platform, and if necessary, set these variables as indicated below.


UGII_BASE_DIR

Sets the location of the NX files; set by the NX installation. A typical value for this variable is C:\Program Files\Siemens\NX 10.0.

UGII_ROOT_DIR

Sets the location of the NX executable; set by the NX installation. A typical value for this variable is C:\Program Files\Siemens\NX 10.0\UGII\.

For NX versions 11.0 and newer, the variable's path ending should be set to C:\Program Files\Siemens\NX 10.0​\nxbin.


Release 18.2 - © ANSYS, Inc. All rights reserved.