Cancel
Showing results for 
Search instead for 
Did you mean: 

Rename datasets with PLMXML export

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hello,

 

it is possible to rename dataset with PLMXML Export (before, while or after the export) in other names with custom Attributes?

 

the default PLMXML Export (ConfiguredDataFilesExportDefault) exports the datasets with the named reference name.

i have custom attributes like project_ids. and what i want ist to export .prt and jt Files with names like

%project_ids%-%CustomAttribute%-%itemID%

does anyone have an idea how to do that?

 

thank you

5 REPLIES

Re: Rename datasets with PLMXML export

Legend
Legend

Can you give me an example of what you want to acheive with screenshots if possible so I can better understand what you are trying to acheive.

 

Its certainly possible to export your custom properties (depending on there type) to a an xml file.  Then, you will have to edit the export manually or with a script to edit the name and then re-import it.

 

Or, you can write an XSLT file to transform the xml file by swapping properties or building a property value by concatanating other properties and values.

 

Rich

Richard Bennett
PLM Consultant
Prospect PLM Ltd

Re: Rename datasets with PLMXML export

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hallo Richard,

 

sorry for the late answer.

 

i have a workflow 0 PLMXML which exports the dataset (.prt file) with the attribute project_ids in the xml file (in my case it's a export_from_TC.plmxml file). and that works.

what i want to do is to rename the exportet PRT's from %ItemID%_%RevID%.prt to %project_ids%_%ItemID%_%RevID%.prt

how can i do that?

thanks

Re: Rename datasets with PLMXML export

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
Renaming NX files outside of NX is a bad idea as any internal references (assemblies, wave, etc.) will be broken (yes, an NX part is basically a database - see ug_inspect). That's why NX Clone is used to export/import into Teamcenter. You might be able to accomplish this with PLMXML but I wouldn't recommend it. Any renaming on NX files should be done within NX (or NX tools/utilities). Please rethink your approach/requirement.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Rename datasets with PLMXML export

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hello Randy,

 

the format of the exported Dataset was just an example. 

i want just to know how renaming Dataset with plmxml after or while exporting.

i want to do it for other Dataset format (.jt and .stp).

 

Re: Rename datasets with PLMXML export

Legend
Legend

I'm a bit lost now... Why are you renaming the files? Are you renaming the dataset and/or the named reference and are you then reimporting?

 

To rename in the PLMXML I would just use a .bat file which did a find a replace.  There is no doubt better solution with VB, perl etc, but I cant program in those languages!

 

And, if you are re-importing after the edit, then I would just do a small sample and do it manually first to make sure it worked.

 

Rich

Richard Bennett
PLM Consultant
Prospect PLM Ltd