Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import Assembly to TeamCenter 2

Status
Not open for further replies.

PSI-CAD

Computer
Feb 13, 2009
997
I know how to import assembly to teamcenter but I would like to have original native file names in teamcenter instead of number.
I use TeamCenter 8.3 and NX7.5
Thanks in advance


Regards
Didier Psaltopoulos
 
Replies continue below

Recommended for you

We have found a solution to this problem in the following way.

1) In the import menu you must choose autogenerate in the nomenclature rule.
2) In the tab log files select output log file and try dry run first. This create a log file with the new names.
3) Edit the log file:
a) In the header change AUTO_GENERATE to USER_NAME
b) Change the Part_Name and the Part_Description for each file in the assembly with the native name of the prt
4) Now in tab log file, select load an apply existing log file.

In order to change the name and description automatically, I have made an script in awk called clone_tc.awk to make this edition of the log file.

To run the awk script you need the awk program or gawk.exe which is easily found in internet, if you have linux or unix the awk comes by default.

To run the script in a console command type:
awk -f clone_tc.awk input_log_file > output_log_file
or
gawk -f clone_tc.awk input_log_file > output_log_file

I attach the script.

Hope this helps.
Regards
Frank.

Regards
Frank.
 
 http://files.engineering.com/getfile.aspx?folder=dd517b08-1122-4555-bdcb-fccd7355368d&file=clone_tc.zip
Hi Franck
Thanks for your answer. I have got gawk exe but I understand that I have to edit your script.
Can you help me to do that regarding of my unput log file ?
Thanks in advance


Regards
Didier Psaltopoulos
 
Hi Franck
Forget my previous message. It's wrong.
All is perfect without any script modification.
Just one question:
Is it possible to have only the name without the number ?


Regards
Didier Psaltopoulos
 
Hi Didier,

I don't understand very well what do you mean with to have only the name without the number but, in TC all items must have an unique identifier, this is created when you say AUTO_GENERATE, this item number or item identifier is created according the naming rules you have defined.

The script can change this data base number too, but this identifier, as I said before must be unique and it should follow the naming rule defined.

Regards and a happy new year.
Frank.
 
Hi Franck,

First of all, I wish you also a happy new year

I mean that:
If you create a new part and assign a name instead of press the touch assign, you will have a name without number before.
So, I would like the same result during import assembly operation.

One question:
What the difference between auto generate and auto translate ?

Thanks in advance


Regards
Didier Psaltopoulos
 
Hi Didier:

Didider wrote:
>> If you create a new part and assign a name instead of press the touch assign, you will have a name without number before.
>> So, I would like the same result during import assembly operation.

You can do it with AUTO_TRANSLATE but, you often will find errors due to duplicate names. There is a user exit what is called to parse the native part name and generate a new item number and revision.

You can do it too, with the script and AUTO_GENERATE changing the item number in the filed DB@number/revision but try a dry run with the log file to see what happen and what errors in bad item numbers were created.

>> What the difference between auto generate and auto translate ?

Auto translate calls a user exit (you can modify with open API), in order to parse the native part name into a valid item number/item revision, but this generate often duplicate item numbers and the names don't follow the naming rules defined.

Auto translate is better for export purposes than import ones.

Regards
Frank.
 
Hello Frank,
I have downloaded and used your program. It works great except for one caveat. If the UG part file on the OS has spaces in the name then there is a problem.
When reading back in the log file UG will let you know what line has the issue. If I open the log file and go to that line I can see that the Part_Name and the Part_Description have spaces. If I put quotations around the name then all works fine.
Is it possible for you to modify your clone_tc.awk file to put quotations around the Part_Name and the Part_Description.
eg.
&LOG Part_Name: 787 Section 41
&LOG Part_Description: 787 Section 41
should be
&LOG Part_Name: "787 Section 41"
&LOG Part_Description: "787 Section 41"

Thanks in advance.
Your program has saved me hours of mind numbing work.
Jurgen
 
You're right, I will check it out, and I'll tell you something.

Frank.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor