User Defined Simple Rules in Forms
- Last UpdatedJan 07, 2026
- 2 minute read
Note: The information about User Defined Simple Rules, as given in this section is only documented for reference not to be used by MDS customer.
When a drawing form is created it is possible to define a set of simple rules in the form for automatic addition of information to the drawing. for example, when a burning sketch is added to the drawing form this feature facilitates setting of texts with information extracted from the nesting.
The rules are defined by a number preceded by a $ sign ("$ values"). The text corresponding to the rule number will be positioned in the drawing form as indicated by the $ value.
A great number of rules with predefined meaning already exist already since long (for example, rules used in Hull Plate Nesting forms- see User's Guide Plate Nesting, Nesting System - Application Functions SAVE FORM).
It is also possible for the customer to create new rules with the meaning as defined by him. The rule numbers of these $ values should be in the interval 10000 - 10999. The texts created by the user-defined rules are all defined in a Vitesse script called _TBhook_Formula.py. When such a rule is recognized in the drawing form this Vitesse script will be called upon. Vitesse commands corresponding to the user-defined rule will then be evaluated in order to create a text that will be put into the drawing form.
User defined rules are supported in for example the Nesting system. When a user-defined rule is evaluated the Vitesse script _TBhook_Formula.py is supplied with the model context and the formula number. After the user defined Vitesse commands for the formula have been executed, a formula value will be returned as a text string.
Another form of rules is also supported by Vitesse script _TBhook_Formula.py. Those rules may be called user-implemented rules. They will all have a specific purpose defined in AVEVA Marine documentation. However, the user is free to implement the rules by Vitesse commands in _TBhook_Formula.py. The rule numbers for those predefined rules are in the interval 5000 - 5999. User implemented rules may be supplied with extra input and may also return extra output beside the formula value text.