cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

How to export subtypes as loadfiles?

PeterWigren
1-Newbie

How to export subtypes as loadfiles?

Hello!

Does anyone know if it's possible to export a subtype of WTDocument as a separate loadfile(s)?

The below loadfile will export the CADDocument type:

<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">

<NmLoader>

<csvExportDefinition handler="com.ptc.core.lwc.server.TypeDefinitionExporter.beginExportDefinition">

<csvtoLocation>/ptc/Windchill/temp/export/types/CAD_Document</csvtoLocation>

<csvtoFileName>CAD_Document.xml</csvtoFileName>

<csvexportDefClass>com.ptc.core.lwc.server.LWCTypeDefinition</csvexportDefClass>

<csvexportNames>com.volvo.DefaultEPMDocument</csvexportNames>

<csvmode>0</csvmode>

<csvExportAncestorTypes>true</csvExportAncestorTypes>

</csvExportDefinition>

</NmLoader>

Loading that exportfile will generate 3 xml files that can be used to load in another system to make it identical.

To export a subtype of WTDocument I have tried the following:

<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">

<NmLoader>

<csvExportDefinition handler="com.ptc.core.lwc.server.TypeDefinitionExporter.beginExportDefinition">

<csvtoLocation>/ptc/Windchill/temp/export/types/MySubDocument</csvtoLocation>

<csvtoFileName>AVP_Info.xml</csvtoFileName>

<csvexportDefClass>com.ptc.core.lwc.server.LWCTypeDefinition</csvexportDefClass>

<csvexportNames>wt.doc.WTDocument|com.volvo.MySubDocument</csvexportNames>

<csvmode>0</csvmode>

<csvExportAncestorTypes>false</csvExportAncestorTypes>

</csvExportDefinition>

</NmLoader>

However when loading the above code, the output file (only 1 is produced) is next to empty:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">

<NmLoader>

<csvTypeNodeIconRoot handler="com.ptc.core.lwc.server.TypeDefinitionLoader.getIconRoot">

<csviconRoot/>

</csvTypeNodeIconRoot>

</NmLoader>

Any help or insight is appreciated!

Best regards,

Peter

1 REPLY 1

Did you try extracting only sub typing using its internal name? This worked for me. You could have different files generated for each sub types.

 

<csvExportDefinition handler="com.ptc.core.lwc.server.TypeDefinitionExporter.beginExportDefinition">

<csvtoLocation>/ptc/Windchill/temp/export/types/MySubDocument</csvtoLocation>

<csvtoFileName>AVP_Info.xml</csvtoFileName>

<csvexportDefClass>com.ptc.core.lwc.server.LWCTypeDefinition</csvexportDefClass>

<csvexportNames>com.volvo.MySubDocument</csvexportNames>

<csvmode>0</csvmode>

<csvExportAncestorTypes>false</csvExportAncestorTypes>

</csvExportDefinition>

Top Tags