Control Solid Edge from other programs (e.g. MATLAB)?
Control Solid Edge from other programs (e.g. MATLAB)?
(OP)
Hi everyone,
This is a bit of an unusual request, so I'll try to explain the context. We are doing a multidimensional optimization of a tokamak fusion reactor, and have a CAD model built in Solid Edge ST2 Synchronous which is parametrically driven. So there is a Variables table (currently driven by an Excel spreadsheet) that contains certain key dimensions, which drives things like the overall size of the machine, aspect ratios of certain parts, etc.
The Solid Edge Assembly model is then exported to STEP, and the STEP file is imported into COMSOL Multiphysics for a couple electromagnetic/stress analysis, and also into a special front end built for the neutron transport code MCNP5 for a neutronics analysis. Then MCNP and Comsol output certain figures of merit (neutron damage rate to magnetic field coils, peak stress on the vacuum vessel, etc.).
The goal is to actually drive the entire process from a MATLAB multidimensional optimization "uber-loop" which will basically search in a multidimensional parameter space, calling the geometry builder (Solid Edge variables), export to STEP, import to our E&M/stress code (Comsol) and our neutronics code (MCNP), and then read back in the eventual figures of merit (as produced by Comsol and MCNP) and iterate to find the optimum shape for the reactor.
Okay, with all of that explanation out of the way, let me explain what I'm looking to do with Solid Edge. The idea is to have all of this happen automatically, without requiring a human to do File > Save As > Translated to do the STEP export every time.
So does anyone know a way to control Solid Edge from other Windows programs (e.g. Matlab)? I don't need to do much -- the geometry will be already built by me using the ordinary Solid Edge GUI -- it'll just be simple things like exporting to a STEP file.
Thanks for any help people can provide. Sorry for the length of the post.
This is a bit of an unusual request, so I'll try to explain the context. We are doing a multidimensional optimization of a tokamak fusion reactor, and have a CAD model built in Solid Edge ST2 Synchronous which is parametrically driven. So there is a Variables table (currently driven by an Excel spreadsheet) that contains certain key dimensions, which drives things like the overall size of the machine, aspect ratios of certain parts, etc.
The Solid Edge Assembly model is then exported to STEP, and the STEP file is imported into COMSOL Multiphysics for a couple electromagnetic/stress analysis, and also into a special front end built for the neutron transport code MCNP5 for a neutronics analysis. Then MCNP and Comsol output certain figures of merit (neutron damage rate to magnetic field coils, peak stress on the vacuum vessel, etc.).
The goal is to actually drive the entire process from a MATLAB multidimensional optimization "uber-loop" which will basically search in a multidimensional parameter space, calling the geometry builder (Solid Edge variables), export to STEP, import to our E&M/stress code (Comsol) and our neutronics code (MCNP), and then read back in the eventual figures of merit (as produced by Comsol and MCNP) and iterate to find the optimum shape for the reactor.
Okay, with all of that explanation out of the way, let me explain what I'm looking to do with Solid Edge. The idea is to have all of this happen automatically, without requiring a human to do File > Save As > Translated to do the STEP export every time.
So does anyone know a way to control Solid Edge from other Windows programs (e.g. Matlab)? I don't need to do much -- the geometry will be already built by me using the ordinary Solid Edge GUI -- it'll just be simple things like exporting to a STEP file.
Thanks for any help people can provide. Sorry for the length of the post.





RE: Control Solid Edge from other programs (e.g. MATLAB)?
For example you should be able to create/open and manipulate SE files from, say, an Access database or Excel spreadsheet as these both use VB.
bc.
2.4GHz Core2 Quad, 4GB RAM,
Quadro FX4600.
Where would we be without sat-nav?
RE: Control Solid Edge from other programs (e.g. MATLAB)?
Thanks for the tip. I actually just a minute ago suddenly thought to google for solid edge API. Not sure why I didn't realize this before :) Anyway, that brought up this guide:
ht
which appears to an official Siemens document written by a guy named Jason Newell, who is the 'guru' for Solid Edge API (C++ or VB) programming. (I think he's a Siemens employee?)
Anyway, this gives me a starting point. It looks like Solid Edge exposes its features as COM Objects, which are usable from within Matlab or Python.
RE: Control Solid Edge from other programs (e.g. MATLAB)?
Try http://www.barhamsoftware.com for some of Jason's macros and also http://www.jasonnewell.net although that appears to be currently under upgrading.
bc.
2.4GHz Core2 Quad, 4GB RAM,
Quadro FX4600.
Where would we be without sat-nav?
RE: Control Solid Edge from other programs (e.g. MATLAB)?
RE: Control Solid Edge from other programs (e.g. MATLAB)?
If you want a class, a "Developer Day" was added to Solid Edge University this year that covers this: http://solidedgeu.com/29