article

Paul Toone avatar image
0 Likes"
Paul Toone posted

Model Tree View   

The Model Tree view is used in FlexSim to explore the model structure and objects in detail. To access the model tree view select the button from the toolbar. The Tree Window will then appear and the Quick Properties window will change to display the Tree Navigation and Search sections.


Note: If you are using the Evaluation version of FlexSim, you will not be able to use the Model Tree View.


The model tree view is a view window that provides many unique features. In this view you can:

  • Customize FlexSim objects using C++ or FlexScript
  • View all object data
  • Access the properties windows
  • Edit the model, delete objects, and modify all data

If you follow a few simple navigation rules you will find the tree view to be one of the most versatile views within FlexSim. The underlying data structure in FlexSim is contained in a tree. The many edit windows within FlexSim are simply graphical user interfaces (GUIs) that display filtered data from the tree. Since all tree views in FlexSim work the same way, once you understand how the tree view works you will be able to navigate and understand the structure of any tree view that is accessible.


Tree View Basics

FlexSim has been designed to hold all data and information in a tree structure. This tree structure is the core data structure for all of FlexSim's object oriented design. Those who are familiar with C++ object oriented programming will immediately recognize FlexSim's tree view as the C++ standard for object oriented data management.

There are several symbols used in the tree view that will help you understand the structure as you navigate the tree.

The entire MAIN tree view is referred to as a project. The library and model are contained in a project. The VIEW tree contains all the views and GUI definitions as well as all the currently open windows. When a session is saved the MAIN tree and the VIEW tree are saved together.

The folder icon identifies a node that does not have any object data, but may contain other folders or objects.

The object icon is used to represent FlexSim objects in the tree view.

The node icon is used to specify data nodes within an object. Data nodes can have additional data nodes placed inside them. If a data node has a "+" just to the left of the icon it will contain one or more additional data nodes. Data nodes can hold numeric or alphanumeric values.

Certain data nodes are used to hold executable code. There are four types of code nodes in FlexSim:

C++. C++ code must be compiled before running the model.

Flexscipt. This code will be auto-compiled during the running of the model. Read more details on writing logic in FlexSim.

Dll. This node refers to a FlexSim compatible pre-compiled dll. To create such a dll you would need to use a special Visual C++ project. This project is available on the user community.

Global C++. This is C++ code that is globally scoped. It must contain complete functions. These functions can be accessed by any node nested below this node. Typically this type of node is found as the first node under the main Tool folder.

When you select an object in the tree view by clicking on the icon with the mouse, the tree view will display the object as follows:

A highlighting box will be placed around the object icon and an expand tree symbol will be place to the left of the object icon. If you select this expand tree symbol, the data nodes for that object will be displayed as shown below.

As objects and data nodes are expanded, the tree view can quickly grow to be outside the viewing limits of the tree view window. FlexSim allows you to move the tree around in the window by using the mouse. To move the tree around in the window just click-and-drag on the left side of the tree, use the mouse wheel to scroll up and down, or use the scroll bar on the side.

Data nodes can be expanded by clicking on the "+" to the left of the node icon. Since data nodes can have values or text you will see the text information or the data values to the right of the node.

If you select on an object or data node you may not be able to move the tree. Click a spot in the view that is blank, then drag the mouse to move the tree up and down. You can also use the scroll bar, mouse wheel, or PageUp/PageDown buttons to move the tree up and down.

Data can be edited directly in the tree by selecting the node you wish to edit. If it is a numeric data node you will be able to edit the number in the field. If it is a text data node you will be given a text edit field on the right side of the window to edit the text.

As you can see, the tree is the repository of all data for the model. The properties windows are used to provide a more user-friendly way to manipulate the data in the tree. It is possible to completely edit your model from the tree, but it is recommended that you use the properties windows to avoid inadvertent deletion of model data. The properties windows are accessible in a tree view by double-clicking on the object icon or by selecting Properties from the right-click menu.

For more information on the Tree view, see the Tree Window page.



flexsim users manual
5 |100000

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

Article

Contributors

paul.t contributed to this article

Navigation

FlexSim 2016.1