Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Solid Edge from other programs (e.g. MATLAB)? 1

Status
Not open for further replies.

olynyk

Mechanical
May 25, 2005
35
CA
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.
 
Replies continue below

Recommended for you

You can control SE using VB or C++ code, so as long as your program is able to generate or run VB or C++ you should be able to do it.
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?
 
Hi beachcomber,

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:


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.
 
Jason is the expert on the Solid Edge API but he does not work for Siemens other than some contract work for things like the guide.
 
If you look in your Solid Edge installation directory there is a SDK folder there with documentation, sample programs, etc. Everything you want to do should be possible.

If you want a class, a "Developer Day" was added to Solid Edge University this year that covers this:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top