Skip to main content
1-Visitor
July 18, 2025
Question

Need API to assign Option set to Configurable Part

  • July 18, 2025
  • 3 replies
  • 468 views

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
18-Opal
18-Opal
July 18, 2025

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

 

Community Moderator
August 12, 2025

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 

HelesicPetr
22-Sapphire II
22-Sapphire II
August 15, 2025

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