


{"id":311226,"date":"2023-10-12T08:52:14","date_gmt":"2023-10-12T08:52:14","guid":{"rendered":"\/forum\/forums\/topic\/problem-with-running-the-script-at-startup-icem\/"},"modified":"2023-10-20T07:55:43","modified_gmt":"2023-10-20T07:55:43","slug":"problem-with-running-the-script-at-startup-icem","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/problem-with-running-the-script-at-startup-icem\/","title":{"rendered":"Problem with running the script at startup ICEM"},"content":{"rendered":"<p>Hello, <span class=\"HwtZe\" lang=\"en\"><span class=\"jCAhz ChMk0b\"><span class=\"ryNqvb\">Please help me understand the problem.<\/span><\/span><\/span><\/p>\n<p>Created a script in TCL (test1.tcl):<br \/>proc test1 { } {<br \/>&nbsp; &nbsp;mess &#8220;*** start script ***\\n&#8221;<br \/>}<\/p>\n<p>test1<\/p>\n<p>I launch it in ICEM CFD when starting from a bat file:<br \/>&#8220;%ICEMCFD_ROOT145%\\win64_amd\\bin\\icemcfd.bat&#8221; -script test1.tcl<\/p>\n<p>The script is executed at startup, the message is displayed on the ICEM CFD command line, but when I then try to call my function on the command line again:<br \/>test1<br \/>then the error occurs:<br \/>Error: invalid command name &#8220;test1&#8221;<\/p>\n<p>ICEM CFD forgot about my function.<br \/>If I load the script from the ICEM command line:<br \/>source test1.tcl<br \/>then after this my function is executed again, now ICEM has remembered it.<br \/>The ICEM programming documentation says that all 4 methods of loading scripts are equivalent.<br \/>What&#8217;s the matter? How do I make ICEM remember my functions after loading via -script?<\/p>\n<p>Windows 10. ANSYS 2022R2, ANSYS 14.5.7<\/p>\n","protected":false},"template":"","class_list":["post-311226","topic","type-topic","status-closed","hentry","topic-tag-icem","topic-tag-script"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["295511","170445"],"_bbp_author_ip":["168.143.243.24"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["868"],"_bbp_status":["publish"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["311226"],"_bbp_forum_id":["27796"],"_bbp_engagement":["170445","295511"],"_bbp_voice_count":["2"],"_bbp_reply_count":["4"],"_bbp_last_reply_id":["312461"],"_bbp_last_active_id":["312461"],"_bbp_last_active_time":["2023-10-20 07:55:25"]},"test":"tyrex-sivgmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/311226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/311226\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=311226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}