question

Rykou avatar image
0 Likes"
Rykou asked Rykou commented

set rack NumofBays Numoflevels with flexscript

I'm trying to creat rack and set NumofBays=3 and Numoflevels=3 using flexscript.I have referred to following content.

https://answers.flexsim.com/questions/60109/rack-3d-creation-flexscript.html

https://answers.flexsim.com/questions/61354/create-rack-with-code-in-user-command.html

https://answers.flexsim.com/questions/61230/how-to-set-rack-sizetable-by-code.html


I find that function_s(libraryRack, "BasicRefreshTable", firstRack, numLevels, numBays, levelHeight, bayWidth); is not worked in recent version.


rack autobuild.fsm


FlexSim 23.1.2
flexscriptrackfunction_s
rack-autobuild.fsm (32.3 KiB)
5 |100000

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

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Rykou commented

That function has not been present since version 19.0;

You can set the dimensions using Properties - eg:

Object rack=Model.find("Rack1");
Map dimensions=rack.getProperty("Dimensions");
dimensions.NumBays=4;
dimensions.BaySize=3;
dimensions.NumLevels=5;
dimensions.SlotsPerBay=2;
dimensions.LevelSize=2;
rack.setProperty("Dimensions",dimensions);

You can have greater customization using a user command described in this post and the function calls are still working in versions 23.0.14 and 24.0.2.

· 1
5 |100000

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

Rykou avatar image Rykou commented ·

It works! Thanks for your help.

0 Likes 0 ·