question

jenner avatar image
0 Likes"
jenner asked Joshua S converted comment to answer

how to set rack sizetable by code ?

racksizetable-autosave.fsm

FlexSim 18.2.2
rackcoding
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

jenner avatar image jenner commented ·

thank you ,i know .

when i do not open rack's properties and not active rack .

i want to try the command: nodefunction(node("@>OnApply",views().find("guiclasses/BottomButtons/OK").find(">OnPress"))),to change rack size ,i find

the command can change the rack tree's sizetabe.value ,but in the mode view ,the rack 's shape is not change.

0 Likes 0 ·
jenner avatar image jenner commented ·

thank you very much !

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

@jenner J, it isn't so difficult adapt the code!

function_s(node("/?Rack", library()), "BasicRefreshTable",model().find("Rack1") , 4, 6, 2, 3);
repaintall();

copy this to the script console. Maybe you have to exchange the name of the rack in find-method. and adjust the values of number of bays and levels, cell height and width.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

You are trying to implement the Apply Basic Settings button as a script. @Clair A describes at "How to automatically create variables for OptQuest ?" the steps to get the code from the view tree of the experimenter window. You can adapt the steps for the properties window SizeTable to get the source code. You find there a parameter described as

node("@>objectfocus+",c)

This is the reference to the rack itself. You have to try yourself if it's necessary to execute the nodefunction update under the Advanced branch of the tree. If it is necessary you have to execute the nodefunction probably in the library tree, because the properties windows isn't open and active.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.