×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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.

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

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?

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

(OP)
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:

http://www.plm.automation.siemens.com/de_de/Images/Solid_Edge_API_tcm73-125829.pdf

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)?

I have a hard copy of that guide that I often refer to and it's also in the Solid Edge Help.
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)?

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.  

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

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: http://solidedgeu.com/29

   

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources