ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
|||
|
|||
Adding Levels to a rack by code is not updating the rack drawing
Hello,
I'm setting the nr of levels in rack via flexsim by using code. But the rack is not drawn correctly until i open and close the properties panel of the rack. How can i redraw the rack, showing the right nr of levels? I use the following code to add levels to my bays of my rack: //set the levels for (int x = currentnroflevels+1;x <= TotalRackHight;x++) { string levelname = concat("Level",numtostring(x)); nodeinsertafter(last(currentbay)); setnodename(last(currentbay),levelname); nodeadddata(last(currentbay), DATATYPE_NUMBER); setnodenum(last(currentbay),0.5); } |
#2
|
||||
|
||||
Hello,
updating the racksize is more than updating a table. There exists three tables under the Rack object: sizetable, locationtable and contenttable. Each of these tables has a meaning in placing and releasing items. Their structure has to match. One way how the updating works, is to understand the view structure of the Rack Properties window. You find the important function call in the following Path (######## stands for an individual number of your active properties window view) VIEW:/active/RackParameters########/tabcontrol/SizeTable/Advanced>apply In the node you find a event function call beginning with the command function_s. The calls leads into the library tree of the fixed resource object Rack. The path to this function is: MAIN:/project/library/fixedresources/Rack>behaviour/eventfunctions/RefreshTable There you find also the Function BasicRefreshTable This source code deletes the current sizetable and creates a new one. It uses 5 Parameters: Reference to the rack object, number of levels, number of bays, value of the level height, value of the bay width. At the end the function executes the previous node "Refreshtable". Give it a try: Code:
function_s(node("/?Rack", library()),"BasicRefreshTable",node("/Rack2",model()),7,2,1,1.5); 7 is the number of levels 2 is number of bays 1 is the height of a level 1.5 is the width of the bays The eventfunction updates the rack but it doesn't refresh an open view of the properties window of the rack. Jörg |
The Following 5 Users Say Thank You to Jörg Vogel For This Useful Post: | ||
Sebastian Hemmann (06-22-2015) |
#3
|
|||
|
|||
How to see the view in an treeview
Thanks a lot,
This is working like a charm... How do you visualize the VIEW: active/... in a window? I can only see my model in a treeview. I didn't know you could show the structure of properties windows. Kr, Koen |
#4
|
||||
|
||||
Hi,
Open a Tree. You find on the right site in the Quick Properties the Tree Navigation. Select a tree from the list: Model, Main, View. Jörg Last edited by Jörg Vogel; 06-19-2015 at 09:18 AM. |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
koenslootmans (06-22-2015) |
Tags |
racks flexscript redraw |
Thread | Thread Starter | Forum | Replies | Last Post |
Rack statistics | Sebastian Hemmann | Gripes and Goodies | 2 | 04-18-2013 02:33 AM |
Picking from a Rack | hani2899 | Q&A | 5 | 11-23-2011 02:04 AM |
Items are placed in rack | Dane Lee | Q&A | 4 | 11-19-2010 06:39 AM |
how to make the forklift grab a pallet from the upper levels of the rack and place it in the first or second l | LINWEIXU | Q&A | 5 | 09-04-2009 01:25 AM |
to take from the rack | mariogib | Q&A | 17 | 08-05-2009 08:12 PM |