LoadDraftingStandard

EmailFacebookGoogle+LinkedInTwitterShare

Imagine you received a set of SOLIDWORKS drawings from an outside source. Unfortunately the people who created the drawings didn’t use your drafting standards. [The peasants!]

You may be tempted to create a little macro that goes through every one of your settings, one at a time, setting user preference toggles, integer values, blah, blah… Not a bad idea, but doing this is slow, tedious and you’ll run into some “undocumented issues” that my lawyers don’t want me to get into. So instead, open your drawing template and save your standards out as a file.

ExternalFile

Now in your API code, after you open the drawing, use the “Drawing.Extension.LoadDraftingStandard” method to load the standards file you created. This one line of code can then take place of the possible hundreds of lines of codes setting the preferences one at a time.

One comment on “LoadDraftingStandard

  1. Or if you don’t need to do hundreds of files, you can just open the “bad” drawing and go to the window you show and hit “LOAD FROM EXTERNAL FILE”, browse for your “good” standard and it will plow over the “bad” file and “fix” it.

Comments are closed.