iLogic write iproperties only for active model state

iLogic write iproperties only for active model state

diegojacobs
Participant Participant
315 Views
1 Reply
Message 1 of 2

iLogic write iproperties only for active model state

diegojacobs
Participant
Participant

I'm using ilogic to write some physical properties of a part to the iproperties description field.

 

I do this by using

 

iProperties.value("Project", "Description") = <partlength>

 

however i noticed that when i have multiple model states and length of part in the active model state changes, the iproperties for the other inactive model states get changed too. 

 

I'm looking for something like this:

iProperties.Value(ThisDoc.ActiveModelState,"Project", "Description") = <partlength>

however this doesnt work for model states.

 

how do i write iproperties to only the current active model state?

0 Likes
316 Views
1 Reply
Reply (1)
Message 2 of 2

MjDeck
Autodesk
Autodesk

On the ribbon under Manage > Author, make sure you have Edit Member Scope selected. That's the default.

When Edit Member Scope is selected, the iProperty changes will only apply to the active model state. However, what's probably happening is that your rule is also running when other model states are active. If that's the case, you have to check for the active model state in your rule. Here's a sample:

If ThisDoc.ActiveModelState = "Model State1" Then
	iProperties.Value("Project", "Description") = "Test 1"
ElseIf ThisDoc.ActiveModelState = "Model State2" Then
	iProperties.Value("Project", "Description") = "Test 2"
End If

Mike Deck
Software Developer
Autodesk, Inc.

0 Likes