Model State Toggle Edit Scope via iLogic?

Model State Toggle Edit Scope via iLogic?

zoe.baker-bushby
Enthusiast Enthusiast
986 Views
1 Reply
Message 1 of 2

Model State Toggle Edit Scope via iLogic?

zoe.baker-bushby
Enthusiast
Enthusiast

Is there anyway to toggle edit scope of model states via iLogic?

 

So go from Member Scope to Factory Scope and vice versa? 

 

 

Accepted solutions (1)
987 Views
1 Reply
Reply (1)
Message 2 of 2

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi @zoe.baker-bushby 

 

This is a timely question, as I have a project I'm beginning to work on that has a request to do this.

 

Here is a simple iLogic rule to toggle the edit scope.

 

Dim oDoc As Document = ThisDoc.Document

oModelStates = oDoc.ComponentDefinition.ModelStates
If oModelStates.MemberEditScope = MemberEditScopeEnum.kEditAllMembers Then
	oModelStates.MemberEditScope = MemberEditScopeEnum.kEditActiveMember
Else
	oModelStates.MemberEditScope = MemberEditScopeEnum.kEditAllMembers
End If

 I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature