question

royjuventus29 avatar image
0 Likes"
royjuventus29 asked Jason Lightfoot answered

How to create a new flow item by Flexscript?

FlexSim 24.0.1
flexscriptflowitem
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 royjuventus29 commented

To create a new flowitem type in the bin it's:

Object newFlowItem=Tools.create("FlowItem,"");   // or for a container use "Container" for the 2nd parameter

To create an instance in an object in the model it's:

string itemname="Box";
Object flowitem=Model.find("Tools/FlowItemBin").subnodes[itemname].first;
createcopy(flowitem,<object>);  //replace <object> with a valid pointer to an object.
5 |100000

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