Toolbox definition


<< Click to show table of contents >>

Navigation:  Connection to Plant Simulation >

Toolbox definition


The toolbox of the exported project can be defined at an instance of the ToolboxDef_Class (Library SimUIToolbox).

 

Contents

1. General parameter

2. Item object definition

3. Item link definition

 

 

1. General parameter

•v_sToolboxID: string for identifying the toolbox, e.g. “PlantBasicObjects”

•v_sToolboxVersion: string for identifying the toolbox version, e.g. “0.2.0”

•v_sSimulationModelType: string for API-interface at the SimController;

oNot used when specific model name API is used (v_bUseModelSpecificSimulationToControllerInterfaceVersion and v_sModelSpecificSimModelVersion in SimJSONExport)

•v_sSimulationModelVersion: string for API-interface at the SimController;

oNot used when specific model name API is used (v_bUseModelSpecificSimulationToControllerInterfaceVersion and v_sModelSpecificSimModelVersion in SimJSONExport)

•v_bUseIconFilesInFolder: use external icons (png or svg) for icon visualization; path is within v_sSrcIconFileFolderPath; within toolbox-definition in subtable “icons” there can be given an external set of icons in higher svg/vector quality instead of png-exports based on Plant Simulation pixel icons

•v_sSrcIconFileFolderPath: Windows path to the folder of the external icons for usage; icons must be defined in explicit sub-tables within the item object definition

 

 

2. Item object definition

Toolbox items (correspond to Plant Simulation classes) are defined in the table t_ItemObjDef with following columns:

•Class: unique identifier within SimUI-Toolbox, regularly Plant Simulation class name

•Active: object used/considered for export for toolbox and project files

•classPath: object path to the Plant Simulation class (necessary except for customText elements)

•category: distinguish between different element types within the front end:

oitem: “regular” simulation object with icon, name and parameter

oicon: icon object for annotations, only additional text, no parameter list (not simulation relevant)

otext: specific text elements (not simulation relevant)

obackgroundImage: background image (not simulation relevant)

oshape: specific drawing tools (not simulation relevant)

•group: group id specified as group class in t_ItemGroupsDef (can be left empty)

•hideInPalette: defines if a toolbox item is visible in the SimUI frontend toolbox area; if not: copying (and inserting) in the SimUI-Frontend in the modelling area is not possible/allowed

•title_localization_key: key-id for translation; translation for toolbox is within t_KeywordLocalization

oif not key is given, the class is the localization key

oif no localization reference is given under either a key or the class, the class name is taken

•icons: sub-table only necessary when external icons are used (png or ideally svg for vector graphics); within the sub-tables icons can be defined by:

oobjType: unique icon class per node-object

oiconname: file name within v_sSrcIconFileFolderPath, without the file type (e.g. “SingeProcSpecialType” for file “SingleProcSpecialType.svg”)

•parameters: definition of parameter for a toolbox item, with:

oclass: unique identifier for attribute per node object, ideally also the Plant Simulation attribute, otherwise within “plantMapping” a mapping between SimUI and Plant Simulation can be done

▪NOTE: class not necessarily the title, Variable name with e.g. “v_sMode1”, can and should also have the same class; localization and titles can be set by title_localization_key

otitle_localization_key: key-id for translation; translation for toolbox is within t_KeywordLocalization

▪if not key is given, the class is used as key; if no localization is given, the class name will be set at title in SimUI (same as node localization)

otype: datatype of the attribute;

▪NOTE: for tables the type “tableGrid” should be used

ovalue: default value as string representation within the toolbox when creating new object in the modelling area;

▪NOTE: when exporting a SimUI project from Plant Simulation the corresponding/current values of the object instances within the Plant Simulation modelling frame are taken

oparameterRelevantForSimulation: apply and read this parameter to or from the simulation model when importing/exporting

oshowCompact: there are three different parameter box visualization modes in the frontend: all, compact and no parameter box; this value describes if the parameter should be shown at “compact”

orequired: enforces in the frontend a parameter entry

oenumoptions: options for a dropdown-list as enumeration; for the options there are classes (unique values applied to plant simulation) and their localization key words

otable_header: header columns for table definitions (tableGrid, table should no longer be used); contents with analogous definition compared to attribute/parameter definition

otable_rows: optional default row definition

onumber_min: minimum value for a number attribute

onumber_max: maximum value for a number attribute

onumber_step: step value (increase/decrease button) for a number attribute

oJSONoptions: json element of form “{…}” to define specific options for this attribute

oJSONcustomData: json element of form “{…}” to define specific options for this attribute

oplantMapping: possibility to map a node class in SimUI to an attribute class in Plant Simulation, if empty: Plant Mapping is internally equals the class

oUserJSONGetMethod_StrPath: possibility to define a user method to get a certain parameter from Plant Simulation to SimUI-structure (in case the structure or content is more specific than the general workflow application, not necessary by default)

▪Plant Simulation export to SimJSON

▪Path in String either absolute or relative to SimJSONImport-Network of instance

oUserJSONSetMethod_StrPath: possibility to define a user method to apply a certain parameter to Plant Simulation (in case the structure or content is more specific than the general application, not necessary by default)

▪SimJSON import to Plant Simulation

▪Path in String either absolute or relative to SimJSONExport-Network of instance

•relevantForSimulation: if false, the object will not be considered for import and export within SimJSONCtrl

•minCount: minimum number of nodes within the SimUI-Modelling frame (more relevant if dynamic creation with createFromTemplate is applied)

•maxCount: maximum number of nodes within the SimUI-Modelling frame (more relevant if dynamic creation with createFromTemplate is applied)

 

Specific JSONoptions:

Possible adjustments for tableGrid attribute with specific behavior for editing, e.g.:

•{"editing": {"enableRowDragging": true, "disableCreate": true, "disableUpdate": true, "disableDelete": true}}

•Also, only a subset of the editing functions can be used for “tableGrid” attributes

 

Specific JSONcustomData:

Text attribute with multiple lines (e.g. for notes):

•{"multiline": true}

 

As already indicated above, items can be aggregated to groups within the toolbox area of the front end.

For this, for every group id given in the t_ItemObjDef a corresponding group must be defined within t_ItemGroupsDef, incl. a link to the localization key word within the toolbox definition.

In general, groups for toolbox items are optional (also the column within t_ItemObjDef).

 

 

3. Item link definition

Possible link connections between item nodes can be defined within t_ConnectorObjDef with classes for connectors.

Allowed predecessor and successor connections between these connector classes can be defined within t_AllowedConnectorMatrix.

Connector definitions (incl. successor and predecessor matrix definitions) are optional (and probably not necessary if Plant Models are exported to the frontend in the mode UpdateNetwork).

 

 


© SimPlan AG - Hanau District Court, Commercial Register (Part B) 6845 - info@simplan.de - www.simplan.de