Hi Team,
Once objects are dropped from custom library instead of standard library, it is not available in respective group. I need to add it manually in group every time to make model work.
Is there any better way to do it?
Thank you!
Hi Team,
Once objects are dropped from custom library instead of standard library, it is not available in respective group. I need to add it manually in group every time to make model work.
Is there any better way to do it?
Thank you!
Hi @Ankur A3, was our answer helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. 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 unaccept and comment back to reopen your question.
Add them as group members on reset (or use the OnDrop or OnCreate triggers for when you drag the object into the model)
Hello @Ankur A3,
I have an on reset trigger that adds objects to a group if the object fit a certain super class and that are not already in a group.
Array tree= model.subnodes.toArray(); for (int i=2; i<= tree.length; i++){ if(tree[i].find(">superclasses").subnodes[1].name == "FixedResource" && Group("Group1").indexOf(tree[i].as(Object)) == 0){ Group("Group1").addMember(tree[i]); } }
If you were to open the Model Tree you will see that all objects are listed in the tree and I just go through that list of objects.
If you were to investigate on of those nodes you would notice that there is a subnode called superclasses that I am using to identify what items should be added. You will need to look at your custom objects and see if there is a unique class or superclass that will help you identify them and add them to the group.
Hi @Jeanette F,
Thank you for your answer.
I wanted to add custom library objects (like standard library objects) in default groups so that it can be used in process flow.
Here is the screenshot:
I have uploaded model in cloud with name "Default_Gp_Custom_Library". How can I get link to paste here directly?
Thank you!
Hello @Ankur A3, You can look into the objects tree and go to classes. This is where I found the distinguishable information to put something in the Staff, Location, ect. group.
You can use the following code in the script window or on reset trigger for Staff. You can easily change it for location or equipment.
Array tree= model.subnodes.toArray(); for (int i=2; i<= tree.length; i++){ if(tree[i].find(">classes").subnodes[1].name == "People::Staff" && Group("Staff").indexOf(tree[i].as(Object)) == 0){ Group("Staff").addMember(tree[i]); } }
In the reset trigger of the object put something like:
Group("MyGroup").addMember(current);
This doesn't fire for library objects but will fire after you've dragged them into the model and press reset. Duplicates are handled by default so you don't get more than one entry for each object.
14 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved