Skip to main content
2-Explorer
April 23, 2014
Solved

Exporting relationship constraints

  • April 23, 2014
  • 2 replies
  • 2750 views

Is there a way to export relationship constraints into an xml file so that they can be imported into a different environment? I can export the link type definition, but it doesn't include relationship constraints. Any ideas?

Best answer by GregoryPERASSO

in 10.0 it was not possible ... as you said ... link type definition but not relationship constraints ...

need to create the XML manually

for example

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">

<NmLoader>

<!-- ***************************************************** -->
<!-- ** Configurable Link Valid Relationships ** -->
<!-- ***************************************************** -->

<csvCreateDefaultAssociationConstraintItem handler="com.ptc.core.meta.type.mgmt.server.impl.association.LoadDefaultAssociationConstraintItem.createDefaultAssociationConstraintItem" >
<csvlinkType>com.richemont.MyLink</csvlinkType>
<csvroleAType>com.ptc.myWTpart</csvroleAType>
<csvroleBType>com.ptc.myObject</csvroleBType>
</csvCreateDefaultAssociationConstraintItem>

</NmLoader>

2 replies

1-Visitor
April 25, 2014

windchill wt.load.LoadFromFile -d DefinitionExporterType.xml

export all Attribute Definizer and LWC Constraint rule.

tstacy2-ExplorerAuthor
2-Explorer
April 25, 2014

That command only exports the link type definition, not the relationship constraints. Thanks anyway.

GregoryPERASSO
16-Pearl
April 25, 2014

in 10.0 it was not possible ... as you said ... link type definition but not relationship constraints ...

need to create the XML manually

for example

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">

<NmLoader>

<!-- ***************************************************** -->
<!-- ** Configurable Link Valid Relationships ** -->
<!-- ***************************************************** -->

<csvCreateDefaultAssociationConstraintItem handler="com.ptc.core.meta.type.mgmt.server.impl.association.LoadDefaultAssociationConstraintItem.createDefaultAssociationConstraintItem" >
<csvlinkType>com.richemont.MyLink</csvlinkType>
<csvroleAType>com.ptc.myWTpart</csvroleAType>
<csvroleBType>com.ptc.myObject</csvroleBType>
</csvCreateDefaultAssociationConstraintItem>

</NmLoader>

tstacy2-ExplorerAuthor
2-Explorer
April 25, 2014

That's what I thought. Thanks for confirming it. I have created my XML manually. Thank you.