cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to "Build Associated part" from a CAD Document using API in Windchill 11.2

GM_9991155
3-Newcomer

How to "Build Associated part" from a CAD Document using API in Windchill 11.2

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

1 REPLY 1

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

Announcements

Top Tags