question

Rohan Vaidya avatar image
0 Likes"
Rohan Vaidya asked Cliff King answered

Programmatic Model Building Documentation

I was looking for documentation on commands used for programmatic model building. Here are some of the things that I would like to be doing:

- Automatically create FR objects based on global table lookup. Global table columns - (col_1 - FR_type, col_2 - xloc, col_3 - yloc, col_4 - FR_name)

- Automatically create TE objects and AGV networks by global table lookup.

- Automatically create conveyor objects ( based on start point and end point in a global table)

- Automatically create connections as needed.

- Assign label values on creation of above objects.

- Attach created objects to process flows that might have been created in the model.

- Eventually create a GUI interface with a delete model and create model option.


FlexSim 20.1.1
flexscriptflexsim 20.1.1programmatic controlprogrammatic model
5 |100000

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

Matt Long avatar image
0 Likes"
Matt Long answered Rohan Vaidya commented

Although FlexSim has the functionality to auto-build models, it is not something that has been documented as a standard feature of FlexSim. The creating FR/TE objects, connections, and adding labels are fairly easy. I would recommend you build a General Process flow and use the Create Object and Assign Labels activity. You can use a quick decide at the top of the flow that determines if the model should be built or if the model is going to be running. Attaching objects to a process flow can be found by diving in to the tree in the quick properties where you can attach objects to an instanced process flow (right click the view and select Explore Structure).

As for auto-building AGV networks and Conveyors, I will admit I'm not sure how to do this. Your best bet is to also dive into the tree and see how the model is able to create and layout/connect conveyors. There may be someone else on this forum that has experience doing this and could answer this question much better.

· 3
5 |100000

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

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

You can search this Answers platform to find how to create AGV networks and conveyors with code.

For example:

How to create and join AVG paths in flexscript

Create a straight conveyor in code?

1 Like 1 ·
Rohan Vaidya avatar image Rohan Vaidya Phil BoBo ♦♦ commented ·

Hi Phil. Thank-you for sharing the links. I did come across those posts on searching. I am using them as reference to build my model.

0 Likes 0 ·
Rohan Vaidya avatar image Rohan Vaidya commented ·

Hi Matt. Thanks for your response. I was able to find some questions addressing the AGV and conveyor questions. Also, I was able to create objects using code through the createinstance command. I will share a model later.

1 Like 1 ·
Cliff King avatar image
1 Like"
Cliff King answered

@Rohan Vaidya, I know this question has already been answered to your satisfaction, but to possibly help someone searching for documentation on this topic in the future, I wanted to add the following reference for Auto-Building a Model with SQL Insert Into. The following link even gives a couple of examples of automatically creating objects in the model and connecting them up.

https://docs.flexsim.com/en/21.0/Reference/Tools/PropertyTables/PropertyTables.html#sql

5 |100000

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