TCL/TK to import and export files

User: "X2Murugesan, Arjun (A.)"
Altair Community Member
Updated by X2Murugesan, Arjun (A.)

I have tried to automate the tetra creation and order change using tcl/tk for DOE study using hyperstudy. the script refers a location from which it works. i need to make the script dynamic such that it refers to the folder in which the tcl/tk is kept and should export it to the same folder. My Script:

set fullTemplate [file join [hm_info -appinfo SPECIFIEDPATH TEMPLATES_DIR] feoutput optistruct optistruct]
*templatefileset $fullTemplate
*feinputwithdata2 "\#optistruct\\optistruct" "C:/User/17/approaches/nom_1/run__00001/m_2/Model.fem" 0 0 0 0 0 1 10 1 0
*currentcollector components "mm2_mesh"
*createstringarray 2 "pars: upd_shell fix_comp_bdr aft" "tet: 99 1.2 2 0 0.5 0"
*createmark elems 2 "by comp id" 1; #select elements by comp (maybe by collector or comp name)
set elems_list [hm_getmark elems 1]; #store in a list
*tetmesh elements 2 1 elements 0 -1 1 2
#*clearmark elems 1
*createmark elems 3 "by comp id" 2; #select elements by comp (maybe by collector or comp name)
set elems_list [hm_getmark elems 3]; #store in a list
*orderchangetosecond 3 0 0
*startnotehistorystate {Assigned "shell" to component "Skin"}
*createmark components 1 "Skin"
*propertyupdate components 1 "shell"
*endnotehistorystate {Assigned "shell" to component "Skin"}
*createmark components 1
*clearmark components 1
*startnotehistorystate {Assigned "shell" to component "Skin"}
*feoutputwithdata "C:/Program Files/Altair/2017.4/templates/feoutput/optistruct/optistruct" "Model_run.fem" 1 0 0 1 1

kindly help me to update for the same. Thank you in advance

Find more posts tagged with