Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
Could anyone please let me know which API is used to achieve this action -> "Build Associated Part" from CAD Documents Actions Menu.
Thanks in Advance!
Regards
Guru
Hello,
I use API which is used from workspace to build structure from CAD to WTPart.
links between CAD and WTPart have to exist before building structure.
com.ptc.windchill.uwgm.common.util.buildFromCAD(WTCollection var0, ConfigSpec var1, boolean var2)
Build WTP structure from CAD
WTHashSet buildEPM = new WTHashSet();
buildEPM.addElement(epm); // found EPM by another function
ConfigSpec configSpec = new EPMConfigSpecFilter(EPMDocConfigSpec.newEPMDocConfigSpec(), EPMFilters.NO_WORKING);
com.ptc.windchill.uwgm.common.util.buildFromCAD(buildEPM, configSpec, false);
Create link between CAD and WTP
epmbuildrule = EPMBuildRule.newEPMBuildRule(epmDocAssoc, partAssoc, EPMBuildRule.ALL_BUILD_ROLES);
epmbuildrule = (EPMBuildRule) PersistenceHelper.manager.save(epmbuildrule);
Hope this can help.
Best Regards
PetrH