question

Martin K5 avatar image
0 Likes"
Martin K5 asked Jeanette F commented

Uploading a custom library.

Hi,

I would like to ask regarding the custom library upload. My custom library is dependent on various global variables and global tables that are set in the current model. When uploading this library in a new model, collisions appear (undefined variables). Is there a way to prepare these variables before uploading the custom library but not doing it separately? If I can for example encapsulate this settings script into the custom library that will be triggered before the upload? I know that there is the possibility to do some post settings by a dropscript. In worst case scenerio, I can do it set up the model manually and then upload the library but it devaluates the efficiency of a custom library.


Thank you,


Martin

FlexSim 23.2.3
codeuser libraryimport
· 9
5 |100000

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

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot commented

You can add global tables to your user library for automatic install easily since they have the icon for it in their properties: 1715093589318.png

The rest you can install using the newmodelinstall folder dropscript on a dummy object. I will try to find an example to upload to make this simpler for you.

In the meantime you might find the documentation on Custom Libraries helpful.

Edit: If you're adding global variables in the dropscript call 'refreshglobalvariables()' afterwards.


1715093589318.png (1.1 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.