Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hello gurus,
So I'm modifying the OIR for the wtpart and need to set the folder.id to detect the folder.id of the epmdocument the wtpart is being created from and place the newly created wtpart in that folder. I know how to set the folder to a specific path - just don't know how to get it to detect the folder path from the epmdocument. Is this possible in the OIR?
Abbigail A. Ullrich
The result is (according to PTC) it's impossible upon creation of the wrPart to make the folder.id detect the folder path of the epmdocument it's associated with.
The solution for the name of the wtpart to match the epmdocument file name was to modify the OIR by:
a. Remove the following code:
<attrvalue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">
<value algorithm="wt.rule.algorithm.BooleanBranch">
<value algorithm="wt.rule.algorithm.EqualsTest">
<attr id="genericType"/">
<arg>variant</arg>
</value>
<arg>V</arg>
<arg></arg>
</value>
<arg>{GEN:wt.enterprise.SequenceGenerator:WTPARTID_seq:10:0}</arg>
</attrvalue>
b. And replace the following code:
<attrconstraint id="number" algorithm="wt.rule.algorithm.BooleanBranch">
<value algorithm="com.ptc.core.rule.server.impl.IfContainerTypeEqualsProjectTest"/">
<value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/">
</value>
<attrconstraint id="number" algorithm="wt.rule.algorithm.BooleanBranch">
<value algorithm="wt.rule.algorithm.StringEqualsTest">
<attr id="endItem"/">
<arg>true</arg>
</value>
<value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints"/">
<value algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/">
<value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint"/">
</value>
</attrconstraint>
</attrconstraint>
c. With this code:
</attrconstraint>
<attrconstraint id="number"</span">
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
</attrconstraint>
Abbigail A. Ullrich