


{"id":361019,"date":"2024-04-08T08:34:48","date_gmt":"2024-04-08T08:34:48","guid":{"rendered":"\/forum\/forums\/topic\/ansys-motion-imported-python-expression-not-defined\/"},"modified":"2024-04-08T08:34:48","modified_gmt":"2024-04-08T08:34:48","slug":"ansys-motion-imported-python-expression-not-defined","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-motion-imported-python-expression-not-defined\/","title":{"rendered":"Ansys Motion &#8211; Imported Python Expression Not Defined"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I have been using custom imported python functions in the Ansys Motion Preprocessor, but I started getting problems with the software &#8216;forgetting&#8217; that it knew the function from the python script that I imported after having used it previously in that simulation. The function used to work fine, then eventually is started giving the error: &#8220;* &lt;ERROR&gt; EXPRESSION :: Smooth_Ramp =&gt; SmoothRamp06.RampSmooth(TIME, 1.0, 31.0, 0.0, 19) name &#8216;SmoothRamp06&#8217; is not defined&#8221; when changing the input parameters or when writing a new function expression in Motion. Previously I fixed this by changing the path to the imported python script to the copy of the script created in the subsystem file root folder and then it worked again, but now that fix does not work anymore. The most confusing part is that&nbsp;<\/p>\n<p>Is there something I&#8217;m missing as to how to prevent this?<\/p>\n<p>I will include a picture of the error window and the ouputted error message:<\/p>\n<p><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/04\/08-04-2024-1712565008-mceclip0.png\"><\/p>\n<p><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/04\/08-04-2024-1712565211-mceclip1.png\"><\/p>\n<p>Kind regards,<\/p>\n<p>HC Janse van Vuuren<\/p>\n","protected":false},"template":"","class_list":["post-361019","topic","type-topic","status-closed","hentry","topic-tag-ansysmotion","topic-tag-expression","topic-tag-function-1","topic-tag-python","topic-tag-python-scripts-2","topic-tag-user-defined-function-1"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["38723","13632","36226"],"_bbp_author_ip":["23.52.43.10"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["559"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["361019"],"_bbp_forum_id":["27791"],"_bbp_engagement":["13632","36226","38723"],"_bbp_voice_count":["3"],"_bbp_reply_count":["3"],"_bbp_last_reply_id":["362938"],"_bbp_last_active_id":["362938"],"_bbp_last_active_time":["2024-04-18 12:37:50"]},"test":"21642478sun-ac-za"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/361019","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\/361019\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=361019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}