Import custom object by code

Import custom object by code

martin_k5
Not applicable
21 Views
4 Replies
Message 1 of 5

Import custom object by code

martin_k5
Not applicable

[ FlexSim 23.2.0 ]

Hi,


I would like to ask if it is possible to import custom object by code?


Thank you,


Martin

0 Likes
Accepted solutions (1)
22 Views
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

I assume you want to reuse a customized object from one model file in a different model. You need to export your customized object into a user library file. This file can you load into a new model file manually or always for any new model by environment settings. In a case where you need a set of different objects you put all customized objects into a single user library and export this.
Adding a user library by code makes only sense, if you are absolutely sure this action takes only place once during existence of your model or you need structures which deletes and unloads user library objects on each simulation run start.
https://docs.flexsim.com/en/23.2/Using3DObjects/CreatingCustomObjectsAnimations/CreatingCustomLibrar...

0 Likes
Message 3 of 5

martin_k5
Not applicable
Not exactly. The idea is to automatically import more custom objects into FlexSim model instead of dragging 'Shape' object for each custom object and then changing its Visuals.


Is this somehow possible?


Thank you.

0 Likes
Message 4 of 5

jason_lightfootVL7B4
Autodesk
Autodesk

In your preferences set the user library to load every time FlexSim starts and then create a script to copy instances from the library into your model.

0 Likes
Message 5 of 5

jason_lightfootVL7B4
Autodesk
Autodesk

Hi @Martin K5, was Joerg Vogel's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes