I have a flowitem called Cart.
If I try to create copies with this statement I get an error I can't figure after trying to write it 50 ways.
createinstance(library().find("?Cart"),Model.find("Queue1"));
See attached sample model.
I have a flowitem called Cart.
If I try to create copies with this statement I get an error I can't figure after trying to write it 50 ways.
createinstance(library().find("?Cart"),Model.find("Queue1"));
See attached sample model.
First of all, especially since you're already using Process Flow, you should just use the Create Object activity to create the cart flowitem.
The issue with your code is that flowitems are not stored in the library, they are in the flowitem bin. To create a copy of a flowitem defined in the flowitem bin you'd do:
createcopy(Model.find("Tools/FlowItemBin/Cart/1"), Model.find("Queue1"));
The reason why I do it with code instead of the CreateObject activity is because I use this command to create starting inventory in a large number of queues. I use a for loop to place a cart in all members of a group of queues.
But why can't I use createinstance?
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