Skip to main content
15-Moonstone
Sep 27, 2017 12:10 PM UTC
Solved

Attaching a selected Document sub type to a Part

Hi All, I would like to know the solution for a scenario listed below. Please let me know what can be done to solve the same. Say for WTDocument there are 3 soft types like ADocument, BDocument and CDocument, and if I had to attach only BDocument to WTPart and not ADocument or CDocument. How would I be doing it ? In case if i try attaching ADocument or CDocument an error should pop up saying that only BDocument can be attached. How to customize the above solution ? Is it using events, listeners or form processor or by any other means ? Can anyone please let me know about the same. Thanks in advance. Best Regards, Aditya
17-Peridot
Oct 5, 2017 11:34 AM UTC

There is no need to customize - configuring the Relationship constraint will give you this behavior.  Once you configure you will only be able to relate the defined subtypes and not other subtypes.  The UIs used while relating will only let you select Docs of the appropriate type.

3 replies

17-Peridot
Sep 28, 2017 3:19 PM UTC

Please check out Relationship Constraints.  They will allow you to configure which types of objects can be used in relationships.  For Part to Doc be sure to look at whether its a Describes or Reference relationship you want to configure.

 

Check out this section of help:  Relationship Constraints Tab

Translate
aachanta15-MoonstoneAuthor
15-Moonstone
Oct 5, 2017 11:28 AM UTC
Hi Jeff, Thanks for the reply. I had gone through the link. But can we customize it in Windchill like for a WTPart only a selected document subtype can be attached and others should not be attached. So if there is any API or code regarding the same do request you to share the same. Thanks and Regards, Aditya
Translate
17-Peridot
Oct 5, 2017 11:34 AM UTC

There is no need to customize - configuring the Relationship constraint will give you this behavior.  Once you configure you will only be able to relate the defined subtypes and not other subtypes.  The UIs used while relating will only let you select Docs of the appropriate type.

Translate