Parameter, Options type for selecting Floor

Parameter, Options type for selecting Floor

Walker_Huang
Contributor Contributor
253 Views
2 Replies
Message 1 of 3

Parameter, Options type for selecting Floor

Walker_Huang
Contributor
Contributor

hi, how could I set a parameter which is Option to activate desired Floor? thanks!

 

 

 

Walker_Huang_0-1764234255243.pngWalker_Huang_1-1764234284327.png

 

0 Likes
Accepted solutions (1)
254 Views
2 Replies
Replies (2)
Message 2 of 3

FelixMoehlmann
Mentor
Mentor
Accepted solution

I am not sure what exactly you mean by "activating" the floor (could be to make it visible, unlock objects on it or set the grid height to that level).

You can inspect what code is executed by the GUI buttons by "exploring" the view.

moehlmann_fe_0-1764752316160.png

There we can find the following code for the button actions:

int floor = ...;		// Floor number in list
double gridZ = ...;		// Height to set grid to
treenode activedoc = activedocumentnode();
set(first(gridplane(activedoc)), gridZ);
set(viewpointz(activedoc), gridZ);

int show = 0/1;		// 0 to hide, 1 to show
applicationcommand("showfloor", floor, show);

int lock = 0/1		// 0 to unlock, 1 to lock
applicationcommand("lockfloor", 1, lock);

You can use those in the parameters OnSet trigger.

Message 3 of 3

Walker_Huang
Contributor
Contributor

appreciate your answer, I will go to study it with your guidance. thank again.

0 Likes