Linking Described-By Documents to a Part Instance Best Practices
The below method seems to be working great but I was curious, since it's not documented, if there's a better way to do link described-by documents to a WTProductInstance2.
WTProductInstance2 instance = WTPartHelper.service.littleCreateDocLinks(instance, collection, false);
If you are wondering where I found this, it's being used by PartManagementHelper in the createRelationship() method. This PartManagmentHelper is a class called by some form processors, one in particularly is for the wizard that adds described-by documents to a part instance from the UI. I could use the createRelationship() method, but it's making a couple checks I've already handled so I went straight for the gold.
Thanks,
Chris
Windchill 10.2 M020, CPS15

