Skip to end of metadata
Go to start of metadata

Overview

You know the Model Gateway as a tool to customize import/export data between arKItect and Excel.

Now the Model Gateway became much more. arKItect now supports an integrated tabular display of the Model Gateway data.

This allows you to customize tabular views in arKItect and use them to display and edit any arKItect information.

Furthermore, since the tabular view is integrated in arKItect (instead of being a simple Excel files), filling the cells can be done with embedded arKItect features (example: use "Add existing" to find an existing object instead of typing its name manually in Excel).

Running the tab-embedded version

As of arKItect 2.3.1, it is possible to run the model gateway interface in a new tab using the following script :

The showInTab function can take additional parameters :

Name

Default

Description

config

{}

Configuration values as a python dictionnary (see table below).

tabName

'Model Gateway'

The caption of the tab that will be created.

removeMGWTabs

False

If set to True, every tab created using this module will be removed before the new one is created.

forceNewTab

False

If set to True, forces the model gateway interface to be created in a new tab. If the tab name is already taken, a new name based on the one given will be used instead.
By default, if a tab has already tabName as its caption, the new model gateway interface will be added next to the existing interface in that tab.

The configuration values are the following:

Name

Default

Description

'export_rmgw'

None

Path to the rmgw file used to export the arKItect project data to the spreadsheet.

'import_rmgw'

None

Path to the rmgw file used import back the spreadsheet data to the arKItect project. If not defined 'export_rmgw' is used instead.

'use_synchronize'

False

If true the spreadsheet data is imported back to the arKItect project using the MGW synchronize mechanism, otherwise the normal import is used.

'confirm_object_deletion'

True

Setting used on if 'use_synchronize' is True. When true a popup asks the user to confirm if he wants to proceed with object deletion, if false objects are deleted without asking the user.

'show_load_rmgw_button'

False

Hide/show the 'Load rmgw' button for reexporting data from arKItect to the spreadsheet using a rmgw file selected by the user.

'excel_template'

None

Path to an Excel template file to be used for the export to Excel function. Can also be set to True in which case the user will be asked to select a template when launching the Excel export.

'fast_template'FalseWhen True and excel_template is set, active a much fast excel export but which does not support formulas in the excel.

'read_only'

False

If set to True, it will neither be possible to edit the content of the spreadsheet nor to import data back to the arKItect project.

'export_user_macro'

None

optional dictionary containing the identifier and value of user defined macros. Macro identifier found in the export_rmgw file's rule sheets columns default and filter values are replaced by the value found in macroDict. Read more about macros.

'import_user_macro'

None

optional dictionary containing the identifier and value of user defined macros. Macro identifier found in the import_rmgw file's rule sheet columns default and filter values are replaced by the value found in macroDict. Read more about macros.

'export_view_list'

None

A list of views used for the export.

'import_view_list'

None

A list of views used for the import.

'export_hook'

lambda : None

A function of arity 0 that will be called before the export.

'import_hook'

lambda : None

A function of arity 0 that will be called after the import.

'max_column_width'400Maximum column width in pixels.
'max_row_height'350Maximum row height in pixels.
'adjust_row_height_limit'4000Number of rows in a table above which the model gateway will not adjust row height anymore for performance reasons.
'hidden_columns_list'NoneList of columns (titles) which are hidden by default.
'sheets_hierarchy_info'{}

(warning) Warning: experimental feature !!! (warning)

Dictionary of sheets which will use a hierarchy view. The key is the sheet name and the value it itself a dictionary defining the parent and child column of the hierarchy.

Example: {'sheet1': {'parent': '<name of parent column>', 'child':  '<name of child column>'}}

 

Example of using the parameters:

To remove every tab that was created using this module, you can do the following :

the clearAll function can also be fed a parameter to specify the standard arKItect view that will get the focus once all the tabs are gone.
The default value is pyark.ARK_TAB_INNER_VIEW

Running the non-embedded version

You can also display the tabular view as a popup dialog. To run the popup dialog use the following usage script (the location is not important):

Additionally Embedded::LaunchGui takes an optional Python dictionary argument. This dictionary defines the configuration values to be used, all values are optional so it is perfectly safe to pass an empty dictionary as in the example above. Configuration values can be found in the section above.

  • No labels