Cancel
Showing results for 
Search instead for 
Did you mean: 

Fail to control UDF defaul directory

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Hello everyone!

 

I'm having a hard time setting up the UDF default directory. I thought it would be easy, but I actually can't set the folder where UDF's are saved and from where they are accessed to any other than my NX defaul start folder (defined in the Windows shortcut). I tried setting up the UGII_UDF_LIBRARY_DIR and using Menu > Tools > UDF > Configure Library, but regardless of my choices it work ONLY with the single folder. What am I missing?

4 REPLIES

Re: Fail to control UDF defaul directory

Siemens Phenom Siemens Phenom
Siemens Phenom

Did you copy the udf_database.txt and dbc_udf_ascii.def from the NX install folders to your desired location and then point to those using Configure Library?  Depending on how you've installed NX, you may not have write access to the files that were installed with NX, so better to move them to a custom location.  Is the location that you're defining for the library dir one that can be written to by NX?

 

Having used Configure Library to point to the txt and def files, NX should default the library dir to the same location:

Screenshot - 12_14_2017 , 7_59_30 AM.png

 

Create a block and use the UDF Wizard to test that NX is going to write to the library dir:

Screenshot - 12_14_2017 , 8_02_18 AM.png

 

You can then define a custom library dir using UGII_UDF_LIBRARY_DIR.  Restart NX and run Configure Library.  It will recognize the change:

Screenshot - 12_14_2017 , 8_16_36 AM.png

 

Choose Reload and you should see your new library:

Screenshot - 12_14_2017 , 8_16_50 AM.png

 

Use the Wizard to create a new UDF and confirm that the new library dir is being used (I had to re-run Configure Library and choose "Change" and redefine the txt and def files for this to work - Reload didn't see to work):

Screenshot - 12_14_2017 , 8_21_22 AM.png

 

Regards, Ben

Re: Fail to control UDF defaul directory

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

I tried many of this. Nevertheless I will give it a careful try again and get back to you.

Re: Fail to control UDF defaul directory

Phenom
Phenom

Ciao @Scaffold,

 

I hope to help you:

 

NX SETTINGS


set UGII_UDF_LIBRARY_DIR=X:\MY-UDF\Standard
set UGII_UDF_DEFINITION_FILE=X:\MY-UDF\Standard\MY-UDF_def.def
set UGII_UDF_DATABASE_FILE=X:\MY-UDF\Standard\MY-database-UDF.txt

 

LIBRARY HIERARCHY IN MY-UDF_def.def FILE

#########################################################################
#                      The Library Hierarchy                            #
#########################################################################

CLASS Standard
{
    TYPE Standard
    QUERY  "[DB(udf_lib_name)] &= [Standard]"  
    FILE "$UGII_UDF_LIBRARY_DIR"
    DIALOG udf_name
    RSET udf_file_name

    CLASS First_subdirectory
    {
        TYPE Ingranaggi
        QUERY "[DB(udf_lib_name)] &= [First_subdirectory]"
        FILE "$UGII_UDF_LIBRARY_DIR"
        DIALOG udf_name
        RSET udf_file_name
    }

    CLASS Second_subdirectory
    {
        TYPE Pignoni
        QUERY "[DB(udf_lib_name)] &= [Second_subdirectory]"
        FILE "$UGII_UDF_LIBRARY_DIR"
        DIALOG udf_name
        RSET udf_file_name
    }
}


The [Standard] [First_subdirectory] [Second_subdirectory] ..... are LOGICAL not physical subdirectories


ROWS IN MY-database-UDF.txt

.......................
udf_name1;name1.prt;name1.cgm;/Standard/First_subdirectory;
udf_name2;name2.prt;name2.cgm;/Standard/First_subdirectory;
.......................
udf_name3;name3.prt;name3.cgm;/Standard/Second_subdirectory;
.......................

 

where udf_nameX is the the UDF-feature name in name1.prt file

udf.png

Re: Fail to control UDF defaul directory

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

I finally managed to make it work by carefully ensuring two crucial steps:

  1. Taking definition files from the original NX install folder
  2. Explicitly defining /metric library rather than No Library during the UDF definition