Automating Exporting data (.prt files) from Teamcenter
Automating Exporting data (.prt files) from Teamcenter
(OP)
Hi, Currently we open the Teamcenter and open the part file and use file > export from teamcenter operation to export the data from the teamcenter. It typically takes 25 minutes to complete the process.(for 5 MB data)
I was wondering whether we could automate this process( Using Journal or Macros) and reduce the process time. We use NX 7.5 and Teamcenter 8.
Any help with this is appreciated.
Thanks in Advance.
I was wondering whether we could automate this process( Using Journal or Macros) and reduce the process time. We use NX 7.5 and Teamcenter 8.
Any help with this is appreciated.
Thanks in Advance.





RE: Automating Exporting data (.prt files) from Teamcenter
There are two command line utilities (scripts) to perform the export operation.
"%UGII_BASE_DIR%\ugmanager\ugmanager_batch_clone"
and
"%UGII_BASE_DIR%\ugmanager\ugmanager_clone"
Regards,
Joe
CODE --> From the Documentation
•Export a part:
ugmanager_clone -pim=yes -u=<userid> -p=<password> -g=<group> -o=export -par=@DB/12345/A
-default_n=autotranslate
•Export a part with a drawing:
ugmanager_clone -pim=yes -u=<userid> -p=<password> —g=<group> -o=export -par=@DB/12345/A
-copy_n=<type>:yes -default_n=autotranslate
where <type> is specification or manifestation. If you do not enter a type, the drawing is not exported.
•Export an assembly:
ugmanager_clone -pim=yes -u=<userid> -p=<password> -g=<group> -o=export -asse=@DB/6789/A
-default_n=autotranslate
•Export an assembly with checkout:
ugmanager_clone -pim=yes -u=<userid> -p=<password> -g=<group> -o=export -asse=@DB/6789/A
-default_n=autotranslate -default_checko=yes•Export multiple assemblies:
ugmanager_clone -pim= -o=export -default_dir=c:\temp -default_n=autotranslate
-asse=@DB/widget_assy1/A -asse=@DB/widget_assy2/A
•Export only the assembly UGMASTER and its non-masters:
The solution is a three part process that requires a simple editing procedure to complete.
◦Use the following command to generate the export.clone log file.
ug_clone -pim=yes -u=<userid> -p=<password> -g=<group> -o=export
-asse=@DB/<item_id>/<rev_id> -default_a=exclude -default_n=autotranslate –drIn this process, you can find only the –asse= option used, and the exclude action for the –default_n and the –dr (for dryrun) options added. The log file contains all the children of the assembly.
It is acceptable to have the children of the assembly in the log file, as it is programmed to exclude all the specified items from the export.
◦Open the export.clone log file in an editor, and change the Cloning_Action for the relevant UGMASTER part (in the earlier process, it is the Part: @DB/<item_id>/<rev_id>) from Default_Disp to OVERWRITE.
In the following process, it is programmed that only the UGMASTER and its non_masters are exported.
&LOG Part: @DB/<item_id>/<rev_id>&LOG Cloning_Action: OVERWRITE Naming_Technique: DEFAULT_NAMING◦Rerun the export using the edited export.clone log file as input.
ug_clone -pim=yes -u=<userid> -p=<password> -g=<group> -o=export -l=export.clone
RE: Automating Exporting data (.prt files) from Teamcenter
But I am new to command line scripting. I tried to run the command form CMD window. But I got an error message " the system cannot find the path specified"
can you give me some link where which I can start learning the scripting of NX or any link where which i can start learning automation of the NX.