find all drawings that relate to parts/assy in a top assembly

Discussion in 'SolidWorks' started by domino, Sep 10, 2008.

  1. domino

    domino Guest

    Hello,

    I have a problem I can't find a solution for. I am designing (not
    writing) a simple application that will translates all files in an
    assembly into pdf (if drawings) and STEP (if part or assembly
    document). All this, by using Solidworks (not PDM Workgroup or
    anything else).

    Say that I have an assembly on 3 levels, 100 parts total, and 50
    drawings. I need to create a dialog bix with a table that include all
    these files, showing what drawing relates to what part/assy. Pretty
    much like what you get when invoking Pack and Go.

    How do I know which drawings relate to what part/assembly so I can
    save all of them as pdf programmatically?

    Thank you for your help
    -Donato
     
    domino, Sep 10, 2008
    #1
  2. If you look in API help you will find by searching the word "traverse"
    several examples of how to traverse the feature tree in an assembly. When
    you retrieve each feature in the assembly you can check what it is and
    output accordingly.

    Finding all the drawings is a little different because a drawing is not
    referenced by its parents. I think SW now has an API that will do this
    for you without even having SW open. I can't think of what it is called
    off the top of my head. Documnent Manager comes to mind.

    SW Explorer also will find drawings related to assemblies.

    If you wanted to find drawings by brute force you could use the
    filesystem object to find slddrw files and then do some checks on them.

    If you use this method you can open SW in the background and not have the
    files displayed because you are just checking them. That saves a lot of
    overhead.

    TOP
     
    Paul B. Kellner, Sep 11, 2008
    #2
  3. domino

    That70sTick Guest

    You may want to use the SolidWorks Document Manager (SWDM) object for
    this. You will need to contact SW to get a key.

    Where-used via SWDM can be very slow, as it actually searches through
    files in all specified locations.
     
    That70sTick, Sep 11, 2008
    #3
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 (here). After that, you can post your question and our members will help you out.