Hi All,
Is any API to create link between .prt and it's drawing in Windchill.
i have tried EPMBuildrule type of link, but it creates structure links.
is any one has tried to create link between .prt or .asm to it's respective drawing throgh Windchill API ?
Any help will be grate.
Thanks,
Vivek
Hi Vivek,
OOTB there is no link to do this. A list of the OOTB links can be found in here.
You can create a custom Version to Version link and use this one.
The EPMBuildRule is a link between WTPart and EPMDocuments.
BR,
Tom
Dear Tom,
Just to clarify one point the hyperlink you have mentioned is a list of commonly used OOTB Links.
But apart from them there are many OOTB link exists like .
etc.
Regards,
Kaushik
EPMReferenceLink should create the link between ".asm" or ".prt" EPMDocument (3D cad model) and the respective ".drw" EPMDocument. (2D drawing).
EPMBuildRule create link between WTPart and EPMDocument while EPMMemberLink will create parent child relationship between two EPMDocument like WTPartUsageLink does in case of WTPart.
Regards,
Kaushik
Dear Kaushik,
yes this link can by used, but from my point of view it isn't the correct one.
This is a Version to Master link. The correct one (from my point of view) should be a Version to Version link to by sure that you link only the referenced versions.
Eg.:
drw B.1 displays prt C.4
If you now use a Version to Master link the history of the object isn't correct. Prt A.1 is linked to B.1 as well.
BR,
Tom
Dear Ttempel,
I don't know whether its the correct one for Vivek's requirement or not but I just describe the OOTB links and their usage in OOTB system.
As I think He just want do the same thing but programmatically.
If what you are saying is correct then can you please explain me how WTPartUsageLink works as it's also Part to PartMaster link.
Regards,
Kaushik
Dear Kaushik,
Please have a look at https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS156972&art_lang=en&posno=1&q=version%20to%20master%20link&sou…
BR,
Tom
Good information.
Thank you.
Hi Vivek,
try this
EPMDocument epmDoc = <your EpmDocument>;
WTPart wtPart= <your WTPart>;
Folder checkOut = WorkInProgressHelper.service.getCheckoutFolder();
WTPart wtPartCheckOut = (WTPart) WorkInProgressHelper.service.checkout(wtPart, checkOut, "").getWorkingCopy(); //get working copy
EPMBuildRule buildRuleObj = EPMBuildRule.newEPMBuildRule(epmDoc, wtPartCheckOut, EPMBuildRule.BUILD_ATTRIBUTES);
buildRuleObj = (EPMBuildRule)PersistenceHelper.manager.save(buildRuleObj);
WorkInProgressHelper.service.checkin(wtPartCheckOut, "Associated Drawing Object");
A D,
this work if you will link a drw and prt to the WTPart, but Vivek will link two EPMDocuments it self.
BR
Tom