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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Translate the entire conversation x

Need API to assign Option set to Configurable Part

AKC
13-Aquamarine
13-Aquamarine

Need API to assign Option set to Configurable Part

Version: Windchill 13.0

 

Use Case: I’m trying to assign an Option Set to a Configurable Part. Can anyone help me with the API code for this?


Description:

I’m trying to assign an Option Set to a Configurable Part. Can anyone help me with the API code for this?

3 REPLIES 3

It looks like there is some info on getting the assignment info: https://www.ptc.com/en/support/article/CS406283?source=search

 

But setting it might not be supported: https://www.ptc.com/en/support/article/CS413254?source=search

 

anursingh
Moderator
(To:AKC)

Hi @AKC,

 

I wanted to see if you got the help you needed.

If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation. 

 

Thanks,
Anurag 

HelesicPetr
22-Sapphire II
(To:AKC)

Hi @AKC 

It is just idea how to do so but it could work. 

here is an example how the link could be created but it needs good testing if it is the right way

		OptionSetMemberLink optionSetLink = new OptionSetMemberLink();
		optionSetLink.setRoleAObject(); //input OptionSet.class
		optionSetLink.setRoleBObject(); //input ChoiceMaster.class
		wt.fc.PersistenceServerHelper.manager.insert(optionSetLink);//store in DB
		
		ChoiceMappableChoiceLink choiceLink = new ChoiceMappableChoiceLink();
		choiceLink.setRoleAObject(); //input ChoiceMappable.class which is WTPart, EPMDocument all objects in the system where the choices can be set
		choiceLink.setRoleObject(); //input ChoiceMaster.class
		wt.fc.PersistenceServerHelper.manager.insert(choiceLink);// store in DB

 

PetrH

Announcements
Top Tags