🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Auto assign properties using TCL script

User: "Feby_21215"
New Altair Community Member
Updated by Feby_21215

Hi,

 

I want to write a script that auto assign pre-existing properties, materials and element types (ANSYS Profile) to components based on the component name. For example: if I have properties, material and ET already created as 2mm, steel, shell181 and my component name is '2mm@Steel_plate' I want the script to read the component name search the characters before '@', match it with the similarly named property and assign it to the component. Similarly for material and ET.

 

I am new to TCL scripting. I tried doing it manually in HM and read the command.tcl file. However the command file contains only commands based on the ID as shown below.

 

 *startnotehistorystate {Modified Type of component from 0 to 1} *setvalue comps id=1 STATUS=2 3081={sensors 1} *endnotehistorystate {Modified Type of component from 0 to 1} *startnotehistorystate {Modified Property of component from 0 to 1} *setvalue comps id=1 propertyid={props 1} *endnotehistorystate {Modified Property of component from 0 to 1} *startnotehistorystate {Modified Material of component from 0 to 1} *setvalue comps id=1 materialid={mats 1} *endnotehistorystate {Modified Material of component from 0 to 1}

Here is a link to a screen grab of the HM tree. https://imgur.com/a/zz72Tj2

 

Please point me in the right direction.

Find more posts tagged with