{"id":956,"date":"2021-09-20T02:38:23","date_gmt":"2021-09-20T09:38:23","guid":{"rendered":"https:\/\/gantovnik.com\/bio-tips\/?p=956"},"modified":"2021-10-04T19:54:56","modified_gmt":"2021-10-05T02:54:56","slug":"174-run-all-tcl-scripts-in-the-given-folder","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2021\/09\/174-run-all-tcl-scripts-in-the-given-folder\/","title":{"rendered":"#174 Run all tcl scripts in the given folder"},"content":{"rendered":"<p>#174 Run all tcl scripts in the given folder<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nset dir &quot;D:\/projects\/tcl\/test174\/tcl_files&quot;\r\nforeach script &#x5B;glob -nocomplain -dir $dir *.tcl] {\r\n  source $script\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#174 Run all tcl scripts in the given folder set dir &quot;D:\/projects\/tcl\/test174\/tcl_files&quot; foreach script &#x5B;glob -nocomplain -dir $dir *.tcl] { source $script }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[27],"tags":[],"class_list":["post-956","post","type-post","status-publish","format-standard","hentry","category-tcl"],"modified_by":"gantovnik","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-fq","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":904,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/03\/163-call-one-tcl-script-from-another-tcl-script\/","url_meta":{"origin":956,"position":0},"title":"#163 Call one tcl script from another tcl script","author":"gantovnik","date":"2021-03-22","format":false,"excerpt":"[code language=\"python\"] puts \"Hello0!\" proc myfunc {} { source \"D:\/projects\/tcl_hypermesh\/example1\/hello1.tcl\" source \"D:\/projects\/tcl_hypermesh\/example1\/hello2.tbc\" } myfunc [\/code] Output: [code language=\"python\"] Hello0! Hello1! Hello2! [\/code]","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":525,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/05\/tcl-script-that-prompts-the-user-to-select-nodes-and-displays-their-x-y-and-z-coordinates\/","url_meta":{"origin":956,"position":1},"title":"Tcl script that prompts the user to select nodes and displays their x, y and z coordinates","author":"gantovnik","date":"2020-05-06","format":false,"excerpt":"Tcl script that prompts the user to select nodes and displays their x, y and z coordinates: [code language=\"python\"] #An example is a Tcl script that prompts the user to select nodes #and displays their x, y and z coordinates: hm_markclear nodes 1 *createmarkpanel nodes 1 set nodes [hm_getmark nodes\u2026","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1426,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/03\/210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2-2-2\/","url_meta":{"origin":956,"position":2},"title":"#273 The pwd and cd commands in tcl","author":"gantovnik","date":"2022-03-16","format":false,"excerpt":"#273 The pwd and cd commands in tcl [code language=\"python\"] set dir [pwd] puts $dir cd .. set dir [pwd] puts $dir [\/code] Output: [code language=\"python\"] D:\/projects\/wordpress\/ex273 D:\/projects\/wordpress [\/code]","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2032,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/01\/403-get-nodes-for-all-elements-in-the-fem-model-in-hypermesh-using-tcl-script\/","url_meta":{"origin":956,"position":3},"title":"#403 Get nodes for all elements in the FEM model in HyperMesh using tcl script","author":"gantovnik","date":"2024-01-13","format":false,"excerpt":"ex403.tcl [code language=\"python\"] set script_path [ file dirname [ file normalize [ info script ] ] ] puts $script_path cd $script_path pwd *createmark elems 1 all set elemList [ hm_getmark elements 1 ] *clearmark elements 1 set outfile [open \"ex403.txt\" w] foreach elem_id $elemList { # Get the list of\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4445,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/09\/447-command-loadsize-in-tcl-for-hypermesh\/","url_meta":{"origin":956,"position":4},"title":"#447 Command *loadsize in tcl for HyperMesh","author":"gantovnik","date":"2024-09-16","format":false,"excerpt":"This command is deprecated but can be found in old tcl scripts. It is replaced with setoption load_size_magnitude, *setoption load_size_type,\u00a0setoption load_size_uniform *loadsize Sets the display size of loads. Syntax *loadsize config size option scale Inputs config The load config to set. Valid values are: 1 \u2013 forces 2 \u2013 moments\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1950,"url":"https:\/\/gantovnik.com\/bio-tips\/2023\/08\/388-hypermesh-tcl-script-to-calculate-total-area-of-all-components\/","url_meta":{"origin":956,"position":5},"title":"#388 HyperMesh tcl script to calculate total area of all components","author":"gantovnik","date":"2023-08-15","format":false,"excerpt":"[code language=\"python\"] *createmark comps 1 \"all\" set comp_id_list [hm_getmark comps 1] set total_surf_area 0 foreach comp_id $comp_id_list { *createmark surfs 1 \"by comp id\" $comp_id set surf_id_list [hm_getmark surfs 1] foreach surf_id $surf_id_list { set surf_area [hm_getareaofsurface surfs $surf_id] puts \"The area of surface ${surf_id} is ${surf_area}\" set total_surf_area [expr\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=956"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/956\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}