Configure SW for "Save" macro

Nov 16, 2003 2 Replies

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


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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required