question

Jun Woo K avatar image
0 Likes"
Jun Woo K asked Phil BoBo edited

Numbering of custom objects from user library

Hello, I have a question about user library.

By default, an instance of built-in modeling objects are named 'object type + number' when it is created. For instance, the 3 processors in the Figure below are named Processor1, Processor2 and Processor3, respectively.

20230512-userlibrary-numbering.png

In constrast, Jig45, Jig46 and Jig47 are instances of custom objects contained in an user library. They are the first 3 instances of a custom modeling object called Jig. Thus, I hope them to be named Jig1, Jig2 and Jig3, but the object number starts from an arbitary number, 45, instead of 1.

Can I make the object number of custom modeling objects to start from 1?



FlexSim 20.1.3
user librarycustom objectnumbering
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
0 Likes"
Jason Lightfoot answered Phil BoBo edited

You will find that earlier versions remember any previous numbering or base it on the rank of the object (or something else), so either number them yourself or use a later version of FlexSim - 22.0 or higher, where, should you rename the object in the user library as 'Jig' then it will number the copies as an independent sequence when you drag/drop them into the model.

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

Jun Woo K avatar image Jun Woo K commented ·

Thank you for your answer Jason. I found out that a user library for FlexSim 2023 produces custom object numbers starting from 1, as you told. However, a user library for FlexSim 2020.1 does not. I am developing a model for a company that utilizes FlexSim 2020.1. Isn't there any way to start from custom object number 1 in earlier versions?


0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Jun Woo K commented ·
You'd need to control it yourself - possibly via the dropscript or the onCreate. To be honest though, using object names for anything other than reporting is something I would consider bad practice and if the user wants a certain name then they should be able to change it to whatever they want to see in a report.
0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Jun Woo K commented ·
applicationcommand("setuniquename", newObj);
0 Likes 0 ·
Jun Woo K avatar image Jun Woo K Phil BoBo ♦♦ commented ·
Thank you Phil BoBo. I found the setuniquename function in FlexSim 2020.1 and I think it might be helpful to handle my issue.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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