Scripts

In the Project Environment dialog, in the Resources > Scripts view of the library or project database, there are some predefined scripts that are used for running the CADMATIC design applications, and administrator can also add custom scripts there.

Running a script when object's catalog part or GDL reference changes

If Resources > Scripts contains a custom script by the name "PmSetObjectCustomization", Plant Modeller will automatically run this script when either the Catalog Part reference (pid) or the GDL reference (cmd) of a model object is changed. The object must be currently checked out to the Plant Modeller area.

This can be used, for example, to automatically update a COS attribute that stores object revision information.

Administrator must add the required custom script to the library or the project.

An example custom script for this purpose is provided below.

Example PmSetObjectCustomization.mac

Related Topics

Script hook