VBA to rename sheets? DXF just flat pattern?

Discussion in 'SolidWorks' started by Brian Mears, Sep 30, 2003.

  1. Brian Mears

    Brian Mears Guest

    I'm considering SolidWorks as a replacement for my tired old
    Mechanical Desktop, and I have a question about two things I'd like to
    be able to do. Namely:

    I anticipate my drawings having multiple sheets, possibly up to 60
    sheets. Finding a part on a specific sheet would be difficult without
    some sort of reference. Could a VBA program be written that would
    rename each sheet to the name of the part that's on it (or something
    along those lines)? That would be a huge benefit to me.

    I'll frequently need to send out DXF files of flat patterns. The flat
    pattern is always on the same sheet with the folded model. Is there a
    way to DXF out JUST the flat pattern? I don't need any other views,
    borders, notes, etc.--I want the pattern only so it can go right to
    the machine.

    Any help with the above questions would be appreciated. Also, if any
    of you have dealt with situations like I describe, I'd like to know
    how you handle them. Thanks!

    Brian
     
    Brian Mears, Sep 30, 2003
    #1
  2. Yes, SolidWorks VBA is rich in capabilities. Renaming sheets shouldn't be
    too difficult especially if you are already familiar with VBA. (In
    SolidWorks you can record a macro and use it as a basis for your VBA
    project) I know that someone here has already written an application to DXF
    flat patterns. They may be willing to share or you could work out some
    agreement. I don't think that SW handles multiple sheet drawings all that
    well though I think it bogs down especially if you get up to 60 sheets. We
    rarely use more that 2 or 3. I don't know if 2004 handles sheets better
    though.

    Corey Scheich
     
    Corey Scheich, Sep 30, 2003
    #2
  3. yes you can make a vba program to do this. but if your drawings are
    not changing often. id would say that making pdfs of your sheets would
    be faster.

    i have a question for you. what kind of api does mechanical desktop
    provide. or better yet inventor.
     
    Sean Phillips, Sep 30, 2003
    #3
  4. Brian Mears

    Eddy Hicks Guest

    If I understand the second part of your question, we do this often, though
    we specifically put the flat pattern on a second sheet called FLAT (and
    sometimes title blocked like sheet 1b or 2 of 2, depending on the client's
    requirements). This allows us to do just what you suggest - dxf/dwg just
    the flat pattern for cnc.

    - Eddy
     
    Eddy Hicks, Oct 1, 2003
    #4
  5. Renaming a drawing sheet to have the same name as the model contained in its
    views would be easily accomplished through the API.

    I have done several variations of programs to automate creation of DXF files
    for flat patterns with varying degrees of interaction from the user. In
    short, there is no problem in creating a DXF file from a single flat pattern
    view even if there are other views on the sheet. This could be as simple as
    a clipboard-type copy/paste of a selected view to a new blank 1:1 scale
    drawing. This could be done manually or automated (removing the annotations
    in any case might be worth making a macro for).

    Regards,
    Brenda
     
    Brenda D. Bosley, Oct 1, 2003
    #5
  6. Brian Mears

    rocheey Guest

    This could be as simple as
    If you parse the geometry out of the drawing view yourself, you dont
    have to worry out annotations or scale. The lines/arcs parse out to
    true size, there are no datum points/dims to worry about, and you have
    the option of including/excluding bend lines.
     
    rocheey, Oct 1, 2003
    #6
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.