Processing Solid Edge objects

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Maria R

    #1

    Processing Solid Edge objects

    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

  • olive

    #2
    Re: Processing Solid Edge objects

    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

    Comment

    • Maria R

      #3
      Re: Processing Solid Edge objects


      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.

      Comment

      • obnmfrbeqzgkst@mailinator.com

        #4
        Re: Processing Solid Edge objects

        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

        Comment

        Working...