3 Replies Latest reply on Dec 23, 2016 11:22 AM by Deepak Gupta

    Slot hole tag moves on sheet format update

    Steven Barry

      I recently made a macro to update my sheet format template, and I noticed a peculiar bug.  When I use this macro on a drawing that has slots that are labeled with hole tags, at least one of the slot hole tags will jump to a random spot.  I have seen this kind of behavior before with slot tags, but it happens nearly every time when I use this macro.  It doesn't seem to do this when I update the sheet format manually.

       

      I should note this only happens in SW 2015.  I tested in 2016 and 2017 and it seems to work no problem.

       

      A little excerpt of code from my macro:

       

      bret = swDraw.SetupSheet6(shtname, props(0), swDwgTemplates_e.swDwgTemplateAsize, _

          props(2), props(3), props(4), "", props(5), props(6), _

          viewname, True, 0.0127, 0.0127, 0.0127, 0.0127, 2, 2)

       

      bret = swDraw.SetupSheet6(shtname, props(0), props(1), props(2), _

          props(3), props(4), tmpname2, props(5), props(6), _

          viewname, True, 0.0127, 0.0127, 0.0127, 0.0127, 2, 2)

       

      I'm basically switching to a standard template and then back to the template I want (kind of needed to do this since the ISheet.ReloadTemplate method isn't in the 2015 version).

      Is there anything immediately incorrect about these lines of code, or can anyone replicate the weird behavior of hole tags?