Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
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
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>