How can we import multiple CAD geometries in a folder to SimLab 2021.2(using script)?
I have more than 10 CAD files in a folder and I need to import them all at once using scripting into SimLab 2021.2.
Can someone help me in achieving this?
Answers
-
Hello, this task is handled in Altair's SIMLAB AUTOMATION training (that I recommend you to attend).
I copy here the explanation given in the Training.
So, let's assume you want to control which file is loaded from your folder uding a SimLab Parameter (called $CAD) and/or using a Python variable (called CADfile). Follow the syntax suggested in the slides below.
You can also avoid using the SimLab parameter and use directly the Python Variable (in our example it is called CADfile) in your script.
Create a cycle in which the Python Variable assumes all the names of your file list, and then let the Import command run multiple times.
I hope this helped.
Alessio - SimLab Global Tech Team
0 -
Hello, this case is handled in put SimLab Automation Training, I make a summary below of the main points.
You can control which file you want to import from your folder using a SimLab Parameter (called below $CAD) and/or a python variable (called below CADfile).
YOu can create a cycle in which the CADfile variabl,e assumes all the values of your name list and so import all files.
I hope this helped
Alessio Librandi - Global Tech Team0 -
Hello,
Just complementing Alessio`s answer. In the learning center we have an example on meshing all CAD files from a given folder. You can use the Import CAD script lines as reference for your case.
https://web.altair.com/altair-for-simlab-learning-center
0