I am trying to batch simulate using Python and I have encountered an error which I cannot find how to fix.
One of the things I am supposed to change when simulating is the STLs. So for every simulation I should input an STL file, whose position/rotation I have slightly modified using Python.
Now my problem is that when I try to declare it as a DesignVar it has the following error:
I understand what the error is saying, but I am not sure why wouldn't it take the variable into consideration if I use the DesignVar and also add an input to it? Because I have other variables on which I used the DesignVar, but they show no errors. The variables were also arrays and matrices so maybe that is one of the reasons it does not work?
You can load different STLs to your model, but this is done different. Once the model is loaded and memory is allocated for all the STL structures - you cannot change the filename. But you can make a preprocessor statement: #define MYSTLFILE './STL/file1.stl' in the beginning of the model (order is important), which can then be changed on loading, but not once it is loaded.