Quality Control Scripts

Предыдущая страницаВ началоСледующая страница

The standard quality control script is supplied with T-FLEX CAD. The script file is located in the T-FLEX CAD installation folder (the default path is C:\Program Files\T-FLEX Parametric CAD 17\Program\QualityManagement\DefaultScript.tfqms). Actions included into the standard script by default are listed in the Standard Quality Control Actions chapter.

In addition to the standard script, you can create and use custom scripts. In order to create a custom script, copy the file of the standard one (DefaultScript.tfqms) under a different name and edit its content as described below using any text editor. Files of custom scripts can be placed in any folder.

Editing the content of the QualityManagement folder and the standard script requires administrator rights.

If you edit the original file of the standard script, without changing its name or location, changes will be lost upon updating T-FLEX CAD.

By default, the standard script is opened automatically upon launching T-FLEX CAD. When you call the QualityControlWindow6 Open Script command, the ...T-FLEX Parametric CAD 17\Program\QualityManagement\ folder is opened by default. In the system options dialog you can select a different script and folder to be opened by default or disable the automatic script opening (Options > Quality Control).

 

Quality control scripts are written in XML language and consist of three main groups of elements:

<Modules>
Modules of external dll-libraries are listed here. If your script uses standard action only, you don't need any external libraries. In order to use custom actions, you should add modules of libraries containing such actions. The standard script doesn't use external libraries by default, but contains the comment describing the module of the custom action example. In order use a library, add its module as follows:

 <Module Name="QualityManagementSample" Path="QualityManagementSample.dll"/>

where:

Name - the name of the module in arbitrary form.

Path - the path to the library file.
The path may be either absolute or relative. Relative path is specified in relation to the T-FLEX CAD installation folder ...T-FLEX Parametric CAD 17\Program\. So, the example above uses the QualityManagementSample.dll library file located within this folder.

Editing the content of the Program requires administrator rights.

<Parameters>
General parameters of the script are listed here as follows:

 <Parameter Key="Author" Name="Author (test)" Type="String" Value="John Doe"/>

where:

Key - the name to be used for identifying the action within the script.

Name - the name to be used for displaying the script in the quality control window.

Type - the data type of the parameter's value.

Value - the default value of the parameter.

<Actions>
Quality control action included into the script are listed here.
Actions without customizable parameters are defines as follows:

 <Action Name="Layer Names" Uid="96d2999d-2f59-492d-b71e-64185753c0de" LogicUid="07bc3705-0bc8-4833-b515-2cc8fb1eaa06"/>

where:

Name - the name to be used for displaying the action in the quality control window.

Uid - the GUID to be used for identifying the action within the script.

LogicUid - The GUID of the action's logic. For standard actions it is assigned within the T-FLEX CAD source code. For custom actions it is assigned within custom libraries.

If you want to include a standard action into a custom script, copy its LogicUid specified in the default script (LogicUids of standard actions are also provided in help sections describing such actions). In this case it doesn't matter, whether you copy the Uid as well, or generate it using a third-party generator.
If you want to include a custom action, copy its LogicUid from its custom library and generate Uid using a third party-generator.
If you script doesn't not contain multiple actions based on the same logic with, you can use in Uid the same value as in LogicUid.

The information on assigning actions identifiers within custom libraries is available in the Creation of Custom Quality Control Actions.

Actions with customizable parameters are defined as follows:

 <Action Name="Empty Text Variable" Uid="3e88cfc9-f2f8-4513-8675-23600ae3ab77" LogicUid="c7f32db1-af02-4994-af71-46044d9ca936">

   <Parameters>

     <Parameter Key="Variable" Name="Variable" Type="String" Value="$Drawing_Number"/>

   </Parameters>

 </Action>

where the <Parameters> group contains the parameters of the action defined as shown above, where:

Key - the identifier of the parameter in the action's logic. For standard actions identifiers of parameters are assigned within the T-FLEX CAD source code. You can copy them from the standard quality control script, or from the help section describing the corresponding action. For custom actions they are assigned within custom libraries containing action's logic.

Name - the name to be used for displaying the script in the quality control window.

Type - the data type of the parameter's value.

Value - the default value of the parameter in the current script.

If an action's logic contains customizable parameters, following usage cases are possible for default values of such parameters:

if a parameter is not included into a script, it is not displayed in the Quality Control window and the script uses value specified in the logic.

if a parameter is included into a script without specifying the Value, its default value in the Quality Control window depend on the data type:  string - empty value, bool  - false; double - 0.

if a parameter is included into a script with specifying the Value, its default value in the Quality Control window is defined by the Value.

Actions can be grouped by tags within the Quality Control window. Tags can be assigned to an action either in a quality control script, or in a library containing action's logic. The example of assigning a tag to an action in a quality control script is shown below (Tags="2D/3D"). The example of assigning a tag to an action in a library is shown in the Creation of Custom Quality Control Actions section. You can use tags already used in the standard script or create your own tags.
By default, all actions included into a script are enabled upon loading the script. If you want an action to be disabled by default, add the IsSkipped="true" attribute, as shown below. In such case, in order to enable the action, you will have to manually enable its checkbox in the Selection column of the Quality Control window.

 <Action Name="Layer Names" Uid="96d2999d-2f59-492d-b71e-64185753c0de" LogicUid="07bc3705-0bc8-4833-b515-2cc8fb1eaa06" Tags="2D/3D" IsSkipped="true"/>

Topics in this section:

Standard Quality Control Actions

Example of Custom Quality Control Action

Creation of Custom Quality Control Actions