Req help : macro to save current read-only model to "Work" area with drawing

Discussion in 'SolidWorks' started by SW Monkey, Nov 14, 2005.

  1. SW Monkey

    SW Monkey Guest

    Im trying to get a macro that after opening a model from our read-only
    vault, it saves the model into my "work" directory. I also want it to
    save the drawing that is associated to it. Our drawings have the same
    filename (minus extension) as the part/assy model.

    Does anyone have something like this already. Im doing some
    experimenting on having a manual file management system (thinking about
    getting rid of our current PDM system).
     
    SW Monkey, Nov 14, 2005
    #1
  2. SW Monkey

    cadguru Guest

    So you are trying to emulate what PDM/Works will do on a check out?

    Cadguru
     
    cadguru, Nov 14, 2005
    #2
  3. SW Monkey

    SW Monkey Guest

    Sure, but without the PDM system :p We currently use Smarteam, and we
    want to get rid of it.
     
    SW Monkey, Nov 15, 2005
    #3
  4. SW Monkey

    SW Monkey Guest

    Devon, I want to do this inside of SolidWorks, with a macro.
     
    SW Monkey, Nov 15, 2005
    #4
  5. SW Monkey

    Tony Guest

    I use this technique to copy a model template and it's related drawing to a
    local PC, update the model with new dimensions and save the revised model
    and document to new names.

    The technique is to use WSH to get a reference to both files. Set the
    original file attributes to "normal" before copying (not read only), copy
    the files to the local PC, change the attributes of the original files back
    to read only. Now using Solidworks API set references to both the model and
    drawing files using the WSH references. Open the files using Solidworks
    object.opendoc6() , modify as needed, rebuild and do a save as
    object.saveas4( ) for the model and then the drawing. Delete the copied
    files (saveas replaced obsolete them). Done.

    Hope this helps

    Tony
     
    Tony, Nov 17, 2005
    #5
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.