Query result values of an element set and write to .TXT-file

User: "Sebastian_Karp"
Altair Employee
Updated by Sebastian_Karp

Overview

This script will apply a Contour plot and query result values of an element set. These values are written to a .TXT-file.

 

January 18th 2024:
Script version was corrected as element set label was hardcoded in the procedure. This line 88 was deleted and new script version attached.

 

Pre-Requisite

-------------------------------------------------------------------------------------------------------------------------------------------------------------

 

NOTE:

To use the script for own result files, these lines in the .TCL need to be edited:

  • line 165: defines the contour plot (result type, component, layer, applied elements/components)
  • line 166: defines the label of the element set used for query
  • line 170: second to last argument ("element.id ...") defines the query string. These are the columns with info that is output to the final .TXT-file.
    A description how to get such query string from a manual GUI operation can be found in this article:  LINK
  • line 170: last argument defines the path to where the query-.TXT-file will be written (this must be edited for the example as well)

 

 

Usage/Installation Instructions

-------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Steps to execute:

 

1. Download attached .TCL / .H3D / .MVW-files and place in same folder

2. Open the session .MVW-file (NOTE: the HyperWorks version the session was saved in, is 2021)

 

image

 

image

 

 

3. Edit the .TCL-file in line 170 and use a valid string for the path, where the final query-.TXT-file will be written (see very last argument the line)

4. Run script from DropDown  File > Load > Script

 

image

 

image

 

 

5. See the query-.TXT-file that is written, containing the info defined by the query string in script line 170

 

 

image

 

 

Post-Requisite

-------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Find more posts tagged with

Share projects with the Community

Share your models, scripts, workspaces, and more with the Altair Community.
New Exchange Project