By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,272 Members | 1,733 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,272 IT Pros & Developers. It's quick & easy.

Processing Solid Edge objects

P: n/a
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

Nov 29 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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 :
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
Nov 29 '06 #2

P: n/a

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.

Nov 29 '06 #3

P: n/a
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

Nov 29 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.