ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2015
koenslootmans koenslootmans is offline
Flexsim User
 
Join Date: Jan 2013
Posts: 17
Downloads: 2
Uploads: 0
Thanks: 10
Thanked 4 Times in 2 Posts
Rep Power: 87
koenslootmans is on a distinguished road
Default 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);
}
Reply With Quote
  #2  
Old 06-19-2015
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 637
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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);
node("/Rack2",model()) is the reference to the Rack object in my model
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
Reply With Quote
The Following 5 Users Say Thank You to Jörg Vogel For This Useful Post:
arunkrmahadeva (06-19-2015), koenslootmans (06-19-2015), RalfGruber (06-19-2015), sagar bolisetti (06-24-2015), Sebastian Hemmann (06-22-2015)
  #3  
Old 06-19-2015
koenslootmans koenslootmans is offline
Flexsim User
 
Join Date: Jan 2013
Posts: 17
Downloads: 2
Uploads: 0
Thanks: 10
Thanked 4 Times in 2 Posts
Rep Power: 87
koenslootmans is on a distinguished road
Default 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
Reply With Quote
  #4  
Old 06-19-2015
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 637
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

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.
Reply With Quote
The Following User Says Thank You to Jörg Vogel For This Useful Post:
koenslootmans (06-22-2015)
Reply

Tags
racks flexscript redraw

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -6. The time now is 05:45 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.