question

Gui Vaccaro avatar image
0 Likes"
Gui Vaccaro asked Gui Vaccaro answered

Object positioning inconsistency (dropuserlibraryobject): model vs view

Hello,

I have noticed the following inconsistency when using a "dropuserlibraryobject" call with the same coordinates and object:

A. call using view (mimics the manual dragging call, i.e., onto == NULL)

screenshot-2025-02-06-115312.png

B. call using onto == model() (similar to examples found in the answers)

screenshot-2025-02-06-115319.png

Could someone clarify why this happens, please?

Thank you.

FlexSim 25.0.2
modelviewobject creationdropuserlibraryobject
· 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.

Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·

This isn't a direct answer, but more food for thought: as a user, I wouldn't pass a view to dropuserlibraryobject(). This is because when you run an Experiment, there is no view so that views().find() always returns null. So unless you are making UI changes, I just wouldn't worry about it.

Also, some commands (like this one) say "for developer use". It's very rare for us to change those, even if they behave strangely.

A final note, some commands (like this one) are defined in the tree, so you can read the code as needed. You could even copy and rename the command as part of a module or user library if you want to make changes. See the definition here:
MAIN:/project/exec/commandlist/dropuserlibraryobject/node

1 Like 1 ·

1 Answer

Gui Vaccaro avatar image
0 Likes"
Gui Vaccaro answered

Hi, @Jordan Johnson ,

thank you. I was trying to overcome the problem with the experimenter and dropuserlibrary (https://answers.flexsim.com/questions/175655/possible-bug-dropuserlibraryobject-causes-exceptio.html) and trying to see it the change in the parameters could be the reason for my lack of success. It was exploration and then I noticed the difference.

I did not think about going through the command code. I will remember from now on.

Thank you.


5 |100000

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