How can I set the item in a rack?

How can I set the item in a rack?

marco_b8
Not applicable
204 Views
6 Replies
Message 1 of 7

How can I set the item in a rack?

marco_b8
Not applicable

[ FlexSim 17.2.5 ]

Hi to all!

In my model I wouldn't like to insert the 3rd and 4th source for position some item in the rack, in defined place, so I have insert them from script and use the function "racksetcellcontent". The problem is that when I run the scrip and then I run the function "rackgetcellcontent", it doesn't recognize none of the items. How can I do? Have you some ideas? Thank you to all!

(I can attach only part of the model)

prova-rack.fsm

0 Likes
Accepted solutions (1)
205 Views
6 Replies
Replies (6)
Message 2 of 7

joshua_s
Not applicable

It's working fine for me, I had to clear the "wallSX" Table data so that it would create the flow items every time I ran your code, but after running your script, I simply ran

rackgetcellcontent(model().find("Rack"),1,1)

which returned 14, it seemed to be the correct number it should be returning

Also the items are created offset in the Z axis and way in front of the rack.

Message 3 of 7

marco_b8
Not applicable

Thank for your answer @Joshua S.

The problem remains because when I start my complete model it happens what you see in the attached figure: it seems that the black items "disapper" from the rack, and the new items (the clear ones) are positioned where they should not.

foto.png

(in the picture I selected an item placed in a wrong position and I start a script when the black items in the first channel are not recognized)

Have you some ideas for solve this situation?

Thank you for your answer and for spend your time helping me

0 Likes
Message 4 of 7

joshua_s
Not applicable

@Marco B8, I can't tell what would be happening since your setup is through code, and so I wouldn't know what you wrote that would be affecting the system. You can post another question with it being private and then share your model. Without more information there isn't much we can do.

0 Likes
Message 5 of 7

joshua_s
Not applicable

@Marco B8

Were you able to get it working?

0 Likes
Message 6 of 7

marco_b8
Not applicable
Accepted solution

Hi @Joshua S! I'm sorry for not answering you but I'm dealing with an urgent delivery and I forgot. In the end I opted to create new sources that would position the objects in the correct way and make them "visible" to the rack

0 Likes
Message 7 of 7

joshua_s
Not applicable

Not a problem, just wanted to check to see if you needed any more help with the model.

0 Likes