Automatically create APDL snippet in Mechanical after creating a workflow in Workbench
Hi,
I created two script:
1- The first one creates multiple systems in Workbench ;
2- The second one creates one APDL snippet in each system I created first.
My first script is launched in Workbench environment, while my second script is launched in Mechanical environment.
Is there a way to "merge" these twe script ?
My wish is to run a script which create all my system and the create all my APDL snippet in each system.
Regards,
Jean
Best Answer
-
Check out this thread:
https://discuss.ansys.com/discussion/3069/execute-mechanical-scripts-and-there-function-from-workbench-act-consoleThe key is the "SendCommands" call from WB to send commands of various languages to a component of the schematic. In terms of Mechanical this will be the Model components. You will need to take care of getting all the independent model systems and/or tracking which ones area shared to ensure you are sending commands to all the Mechanical models you want and not being redundant.
0
Answers
-
FYI, one other option that is low-code is to simply have a template project file that contains the systems you want with the APDL snippets already included. Your script can then essentially just open that template and do a save as to make a working copy.
I highly recommend using templates in this manner instead of trying to code every step as it makes it more transparent to users and templates are easy to change via the UI vs. change in code.This does break down if the configuration is dependent on case-specific updates, so those should be parsed out to coded solutions.
0 -
thanks
I will try, but I think it's perfectly what I was searching0 -