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)
-
- The topic ‘Ansys Motion – Imported Python Expression Not Defined’ is closed to new replies.
- How to apply Compression-only Support?
- At least one body has been found to have only 1 element in at least 2 directions
- Error when opening saved Workbench project
- Script Error Code:800a000d
- Elastic limit load, Elastic-plastic limit load
- Image to file in Mechanical is bugged and does not show text
- Element has excessive thickness change, distortion, is turning inside out
-
1762
-
635
-
599
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.