Macro Help

Macro Help

Beta_Librae
Advocate Advocate
504 Views
2 Replies
Message 1 of 3

Macro Help

Beta_Librae
Advocate
Advocate

Salutations all,

 

I'm looking for some help with the command to call the active state of the stock model.

Right now I'm calling it out as state '1', state '2', and so on...

Beta_Librae_0-1714065619820.png

I just came across a situation where I didn't want to run in that order. Had to export the stock model and bring it back in to get the macro to run at the proper state.

Any help would be greatly appreciated!


Kind Regards,
Not cnc, you can call me Peabrain
0 Likes
Accepted solutions (1)
505 Views
2 Replies
Replies (2)
Message 2 of 3

Sean571
Advocate
Advocate
Accepted solution

This gets the active state of the active stock model, but this will take awhile to run on large stock models, so keep that in mind.

string activeState = filter(entity('stockmodel', '').States, "this.Active")[0].name	

 

Sean Wroblewski
Applications Engineer

Message 3 of 3

Beta_Librae
Advocate
Advocate

Hey Sean,

 

Thanks for the reply. Greatly appreciated. I haven't had a chance to implement it yet, but this is for a roughing macro, the stock model will never be too big, I'm not to worried that it'll take long.


Kind Regards,
Not cnc, you can call me Peabrain
0 Likes