Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
rbertoletti
160 Views, 3 Replies

Update all model state

I'm working on an assembly which contains an additional model state "PANEL_SCOPE" and i would like to update it  once i update the "Primary" or the opposite (Update "Primary" when i work on "PANEL_SCOPE").

 

Thanks in advance

CCarreiras
in reply to: rbertoletti

HI!

 

I believe you can only edit one model state, or all model states, you can't select a few from the bunch to edit.

CCarreiras

EESignature

rbertoletti
in reply to: CCarreiras

Yes, i need to update all model states. I've only those 2 in the assembly
CCarreiras
in reply to: rbertoletti

Ok, so it's simple,

 

If you want to edit all the members, you have to activate the Edit factory Mode Scope and have both pencils blue.

 

Manually:

CCarreiras_2-1731670234604.png

 

A code to pass from Member scope to Factory Scope is and vice versa is:

 

  • To change the active edit scope to edit member scope, depending on the needs, use:
ThisDoc.Document.ComponentDefinition.ModelStates.MemberEditScope = MemberEditScopeEnum.kEditActiveMember
or:
oDoc.ComponentDefinition.ModelStates.MemberEditScope = MemberEditScopeEnum.kEditActiveMember
  • To change the active edit scope to edit factory scope, depending on the needs, use:
ThisDoc.Document.ComponentDefinition.ModelStates.MemberEditScope = MemberEditScopeEnum.kEditAllMembers
or:
oDoc.ComponentDefinition.ModelStates.MemberEditScope = MemberEditScopeEnum.kEditAllMembers

 

 

 

 

CCarreiras

EESignature