TAGGED: ansysmotion, expression, function, python, python-scripts, user-defined-function
-
-
April 8, 2024 at 8:34 am21642478Subscriber
Hi,
I have been using custom imported python functions in the Ansys Motion Preprocessor, but I started getting problems with the software 'forgetting' 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: "*
EXPRESSION :: Smooth_Ramp => SmoothRamp06.RampSmooth(TIME, 1.0, 31.0, 0.0, 19) name 'SmoothRamp06' is not defined" 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 Is there something I'm missing as to how to prevent this?
I will include a picture of the error window and the ouputted error message:
Kind regards,
HC Janse van Vuuren
-
April 10, 2024 at 2:59 pmAnkush ChoudharyAnsys Employee
Hi Hendrik,
Which Ansys version are you using?
-
April 10, 2024 at 3:26 pm21642478Subscriber
Hi,
2024R1
-
April 18, 2024 at 12:37 pmVishnuAnsys Employee
When you have referred a python file path in your python code object ,the python file is copied to your working directory like below
One test is check if the python file exist in the working directory
Â
and check if the solver file refers the path right like below:
Export XML file (DFSXML) andÂ
check for the python code path in the file
My suspicion is there could be some copy rights violations going on and its not able to find that python file from path.
Also check if path is something abnormal (Too long, or some special charecters and so on)
-
- You must be logged in to reply to this topic.
-
451
-
199
-
194
-
177
-
162
© 2024 Copyright ANSYS, Inc. All rights reserved.