This section defines the location for the Design Assessment post processing scripts and also defines what values can be accessed in this Design Assessment system. The scripts are to be written using the Python scripting language.
There are three Design Assessment specific system environment variables that can be used when specifying script paths:
Default: C:\Program Files
Default: C:\Program Files\ANSYS Inc\v182
The Workbench project user_files subfolder
The Solve tag defines the location of the script that will be run upon pressing the solve button within the Mechanical application. The Evaluate tag defines the location of the script that will be run when evaluating the DAResult objects. The Evaluate script will be run by default after the solve script when solve has been selected. This separation enables the ability for any intensive processing to be performed and saved to files during the solve stage and then results extraction and presentation to be scripted during the evaluation stage. Alternatively, you may want all the processing performed during the evaluate script and enter None in the Solve Script section.
Additional tags allow you to:
permit or prevent the inclusion of Design Assessment Attribute Groups and Results in the tree for the associated Design Assessment system
permit or prevent the availability of solution combination results in the associated Design Assessment system
add additional columns to the Solution Selection Worksheet
define which upstream solution types are permitted in the Solution Selection Worksheet
<DAScripts ObjId="4" Type="DAScripts" Ver="2"/> <!--analysis script language & contents; used to define a script covering how the design assessment will be performed and a script used to obtain results--> <Solve PropType="string">"c:\mysolve.py"</Solve> <Evaluate PropType="string">"c:\myevaluate.py"</Evaluate> <DAData PropType="int">1</DAData> <CombResults PropType="int">1</CombResults> <CombExtra PropType="vector<string>">Extra 1,Extra 2,Extra 3</CombExtra> <CombTypes PropType="vector<unsigned int>">1,2,3,4,5,6,7</CombTypes> lt;/DAScripts>
The DAScripts tag properties should be set as follows:
| Property | Value | Meaning |
|---|---|---|
| ObjId | enter an integer | Number identifying this script set |
| Type | DAScripts | Signifies that the contents of the DAScripts tag define solve and evaluate postprocessing scripts |
| Ver | enter an integer | Version of the DAScripts tag; this should be set to 2 |
The following tags can be included as children of a DAScripts tag:
| Property | Value | Meaning |
|---|---|---|
| Solve | enter a string |
Path to the file called during the solution; a relative path can be entered. A relative path will be relative to {install}\aisol\bin\{platform}, so for example, ..\..\..\My_Solve.py would need to be located in the same folder as the installation. Standard environment variables or one of the Design Assessment specific environment variables may be used in the path (enclosed in percent signs). For example: %TEMP%\My_solve.py %DAPROGFILES%\My_solve.py If no solve script is required, the keyword None can be entered. |
| Evaluate | enter a string | Path to the file called during the evaluate. As per the Solve string, this can be relative or use standard environment variables or the Design Assessment specific environment variables. |
| DAData | enter either 1 or 0 | Set to 0 to prevent any DA Data (Attribute Groups or DA Results) from being added to the project, or 1 to allow them |
| CombResults | enter either 1 or 0 | Set to 0 to prevent Mechanical Results objects from being added to the Design Assessment Solution, or 1 to allow them |
| CombExtra | enter a comma separated list of strings | Enter a string for each extra column heading that you want to appear in the Solution Selection Worksheet. |
|
CombTypes |
enter a comma separated list of positive numbers between 1 and 7 |
Each of the numbers represents a system type. Only system types in this list will be permitted to be selected in the Solution Selections table. The numbers correspond to the systems as follows: 1: Static Structural 2: Transient Structural 3: Explicit Dynamics 4: Modal 5: Harmonic Response 6: Random Vibration 7: Response Spectrum If CombTypes is not defined, there will be no restrictions applied. |
The PropType property of the Solve and Evaluate tags must be set to
string, The PropType property of the DAData and
CombResults tags must be set to int, and the PropType
property of the CombExtra tag must be set to
vector<string> and the PropType property of the
CombTypes tag must be set to vector<unsigned
int>.