Workbench macro
Workbench macro
(OP)
Does anyone know of a good reference for writing a macro for Workbench? I have not found anything useful in the help or with google.
My specific problem is that I want a script to open Workbench, update the geometry from a CAD file, run the simulation, and export a couple of values and pictures.
Any help would be greatly appreciated. Thank you.
Rob Stupplebeen
My specific problem is that I want a script to open Workbench, update the geometry from a CAD file, run the simulation, and export a couple of values and pictures.
Any help would be greatly appreciated. Thank you.
Rob Stupplebeen





RE: Workbench macro
Regards
Alex
RE: Workbench macro
RE: Workbench macro
I do not mind if the GUI is open for the pictures. I am going to be running on a dedicated machine. That could also be a post operation going through all of the results files. If anybody has tried to use Workbench this way any help would be greatly appreciated.
Assuming that there is little experience using Workbench this way how difficult would it be to get Classic to perform this? I can get SolidWorks to automatically export a parasolid file. If classic imports this file assuming no fundamental geometry changes (square to a rectangle is ok, but square to a triangle is not ok) will surface 1 always be the same surface number in Classic?
Thank you very much for all the help.
Robert Stupplebeen
RE: Workbench macro
1- geometry: in Classic, the geometry is completely "dumb". Should you modify any dimension or worse any part of the topology, you would have to start all over
2- in Classic, you can write all your BC attribution in a script file and then read it in after model change, but that's assuming that there is no change in the faces' IDs (well, you could even program an APDL to get rid of this "limitation", but it gets involved...)
3- on the other side, Workbench will take care of the previous point by itself, but unless you run Unigraphics you will always have to do "update geometry" in order for your model to update accordingly to the CAD model (with UG NX4, the parameters of the CAD model are imported, so that you can control the model directly from within Workbench; I don't think this is also valid with the Solidworks plugin); another thing: in order for this to work, you have to check the "reader saves the model after update" or however this is called
4- once a solution has run with Workbench, a ".rst" file is written, so the post-processing is not a problem: either you add a Commands snippet in the Solution item of the WB "tree", with the APDL commands to "batch-generate" the plots you need, either you skip any post-pro in the batch-run phase and you then open the ".rst" file(s) afterwards
5- the interactions between WB and the operating system (including the ability to be launched as a runtime from another application) are all in the Workbench's Development Kit, a thing that I've never explored so I can't be more specific. I only know that what you ask IS feasible. Ask your reseller this specific question, I believe he will help you positively
6- all I've written here refers to v.11
7- performing all this with Classic will have an advantage (batch-running is much easier) but also drawbacks (the problem of the model update, the problem of understanding how to use Classic); also consider that, with Classic, it's the first approach which is very difficult, but then it's not so hard to use unless you want to perform very complicated analyses (but I don't believe it's your case otherwise you wouldn't use Workbench).
Regards