Skip to main content
1-Visitor
Jul 18, 2025 3:38 PM UTC
Question

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

joe_morton
19-Tanzanite
Jul 18, 2025 7:58 PM UTC

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

 

Translate
Community Moderator
Aug 12, 2025 7:53 PM UTC

Hi @AKC_82440,

 

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 

Translate
HelesicPetr
22-Sapphire II
Aug 15, 2025 10:52 AM UTC

Hi @AKC_301264 

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

Translate