A program to recognize and reward our most engaged community members
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?
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
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 helpedAlessio Librandi - Global Tech Team
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