Configure SW for "Save" macro

Discussion in 'SolidWorks' started by Len K. Mar, Nov 16, 2003.

  1. Len K. Mar

    Len K. Mar Guest

    Hello,

    I remember reading about a similiar macro years ago on this site. My
    searches have been in vain since I can't for the life of me figure out
    what to include in the search engine other than "macro".

    I've tried duplicating the macro from memory but I'm running into
    problems on playback.

    Prior to saving a SW file I want to be able to run a macro that cleans
    up all those annoying settings (such as displayed viewing planes,
    points, etc...) and views (how many times do you have to hit zoom
    extents and diametric to get the part/assembly to fill your screen
    propery. Again, tried doing this with a recorded macro but with little
    success.

    Why? -- because I would like a decent preview that doesnt' display
    dimensions or has the part off to one side, etc...

    Any suggestions would be appreciated.

    Len
     
    Len K. Mar, Nov 16, 2003
    #1
  2. sub main()

    dim swapp as sldworks.sldworks
    dim mymodeldoc as sldworks.modeldoc2
    dim bret as boolean

    set swapp = new sldworks.sldworks
    set mymodeldoc = swapp.activedoc

    bret = myModelDoc.SetUserPreferenceToggle ( swDisplayAxes , false)
    bret = myModelDoc.SetUserPreferenceToggle ( swDisplayPlanes , false)
    bret = myModelDoc.SetUserPreferenceToggle ( swDisplayOrigins , false)
    bret = myModelDoc.SetUserPreferenceToggle ( swDisplayTemporaryAxes , false)
    bret = myModelDoc.SetUserPreferenceToggle ( swDisplayCoordSystems , false)
    bret = myModelDoc.SetUserPreferenceToggle ( swDisplayReferencePoints , false)
    bret = myModelDoc.SetUserPreferenceToggle ( swDisplaySketches, false)
    bret = myModelDoc.SetUserPreferenceToggle ( swDisplayReferencePoints2, false)

    'save the document here.

    end sub
     
    Sean Phillips, Nov 17, 2003
    #2
  3. Len K. Mar

    Len K. Mar Guest

    Thanks,

    Len



     
    Len K. Mar, Nov 18, 2003
    #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.