Processing Solid Edge objects

M

Maria R

I consider using Python to process Solid Edge .par .asm etc objects.
Solid Edge provides a pretty rich documentation and tutorials.
Still, when trying it out, using PyWin32, I get somewhat frustrated.

So, I hope for someone out there to be willing to share experiences.

The objective is to automate generation of customer specific machine
elements from project spec's.
In particular, we wish to be able to use .par files as templates and,
by
taking a copy and changing attribute values, instantiate components
to be used in an assembly.
The end result shall be a complete construction structure from which,
among many things, customer doc's drawings and Bill Of Materials are to
be
extracted.
//M
 
O

olive

It would help if you could give an exemple of .par and .asm file.

Is it human readable, XML ... ?

Is there any other import/export file format provided ?

Maria R a écrit :
 
M

Maria R

olive skrev:
It would help if you could give an exemple of .par and .asm file.

Is it human readable, XML ... ?

Is there any other import/export file format provided ?

The .par files and friends are in binary format so the method I prefer
is
using the provided COM interfaces and access the various objects that
way.

Therefor I seek advice from those who have tried this so I may decide
whether
I shall pursue the Python trail or go for some other language like VB
or C# where
there are code samples.
 
O

obnmfrbeqzgkst

I've done a similar thing with Python and Catia in the past. I used
late binding to the Catia objects and I didn't have any real issues.

Things to remember:

Remove all of the "Set" statements

No need to :
set obj = XYZ
just
obj =XYZ

Include the brackets with all Sub calls. VB is sloppy and lets you call
subroutines without the brackets, but you have to specify them in
Python.

It can be a bit tricky passing arrays by reference from Python to a VB
subroutine. The advice I found suggested creating a small VB wrapper
which creates the array and passes it back to Python. You then call
this wrapper from Python.

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top