0 Replies Latest reply on Nov 5, 2018 10:40 AM by Ricky Graber

    How can i prevent Solidworks from switching from Sheet to Margins in the zone parameters region when I run a template update macro?

    Ricky Graber

      I recently created a macro that updates my template and everything seems to work ok except that it changes from Sheet to Margins in the sheet properties, zone parameters tab, region. It does not do this when I update the template manually, only when running the macro. Oddly enough, I can run the macro with other standard templates and it works properly, even while running through the macro. I did notice the sheet format/size shows "value" on the templates that do work, and "34.000in and 22.000in" on my current templates that cause issues. Maybe somehow get my current templates to show "value" instead of "34.000x22.000"?

       

      This issue was brought out in https://forum.solidworks.com/thread/81579 on Jan 5, 2018 but was never resolved that i know of.

       

      The macro I am running is Reload Drawing Sheet Format that was discussed in the link above, only modified a little for my use. I did try it with a few of the other macros without modification and they all resulted with the same issue.

       

      Attached files (all files stripped down to blank sheets to try and rule out variables):

      "Reload Drawing Sheet Format first sheet.swp" (modified macro I run)

      "template update_working.slddrt" (sheet template that works when run through the macro)

      "template update_not working.slddrt"  (sheet template that creates issue when run through the macro)

      "template update_working.SLDDRW" (drawing with sheet template that works)

      "template update_not working.SLDDRW" (drawing with sheet template that creates issue)

      "drawing stripped.SLDDRW" (drawing with current template loaded)(used to test the macro)

      "AF D Size SW2017_.slddrt" (current template used)

       

      I am running SolidWorks 2017 SP5.

       

      I believe this macro were originally created by Deepak Gupta