question

Marco B8 avatar image
0 Likes"
Marco B8 asked Joshua S commented

How can I set the item in a rack?

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

FlexSim 17.2.5
rackscriptitemtypefunctions
prova-rack.fsm (48.5 KiB)
· 4
5 |100000

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

Joshua S avatar image Joshua S commented ·

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.

1 Like 1 ·
Marco B8 avatar image Marco B8 Joshua S commented ·

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 0 ·
foto.png (108.3 KiB)
Joshua S avatar image Joshua S Marco B8 commented ·

@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 0 ·
Show more comments

1 Answer

Marco B8 avatar image
0 Likes"
Marco B8 answered Joshua S commented

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

· 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.

Joshua S avatar image Joshua S commented ·

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

0 Likes 0 ·