Skip to end of metadata
Go to start of metadata

Executing Scripts Related to Objects

This section explains how to execute scripts defined as Program attributes attributes of objects. The scripts can be executed both in the Internal Block Diagram and the treeview.

Executing Scripts Through a Displayed Attribute

When a Program attribute is visible in the Internal Block Diagram, its content can be edited by right-clicking on the attribute name and choosing Edit from the context menu. This action displays the Edit script window. In the same manner, the script can be run by selecting Run in the right-click menu.

Executing Scripts Through Properties

Scripts can also be executed via the Object Properties panel. Click on the Edit... field next to the Program attribute name to execute the script.

Executing Scripts Through an Object

Scripts can also be executed directly by right-clicking on an object in the Internal Block Diagram or in the treeview. The script name should now appear in the context menu and selecting it executes the script.

Scripts can be executed in this manner only in projections where the Program attribute in question is not filtered out.

Executing Project and Common Scripts

It is also possible to define project or common(user-specific) scripts. These scripts can be executed by accessing them in the Scripting Panel of the Tools Category.

Project Tools

Project Tools allow you to execute Program attributes of the root object. The attributes need to be visible in the currently active projection in order to be listed in the Project Tools menu.

The attributes of the root object can also be placed in attribute folders which in turn appear as sub-menus.

This feature is intended for storing project-specific script tools.

Common Tools

Common Tools allow you to execute scripts (files with a .py extension) saved in the Scripts folder located at the root of your arKItect installation. If there is no such folder, the menu is empty. Scripts can also be organized in sub-folders presented as sub-menus.

Scripts in the Scripts folder are unattended mode scripts: they do not receive a reference to the caller arKItect object.

This functionality is for user-specific tools that can be used in many projects on the same computer.

Displaying the Program Trace

The Program Trace provides information on the success or problems encountered in the execution of scripts. To display the Program Trace pane use Program Trace in the Debug Panel of the Tools Category.

The Program Trace panel is displayed automatically when scripts are executed from elsewhere than the Edit script window. If the Edit script window is open, the script execution messages are displayed directly at the bottom of the window.

 

  • No labels