Jorn Bjarning

Hide bend line without warning

Discussion created by Jorn Bjarning on Apr 21, 2017


I just want to share a little experience which might be of value to others. For a customer I have made a macro years ago which hides bend-line sketches in all drawing views. Until now they have used SW2014 and it worked like a charm. The customer is now upgrading to SW2017 so I was testing the macro here.

In the macro I traverse the feature tree in each view, identifies and selects the bend-line sketch and then uses the ModelDoc2::BlankSketch to hide the sketch. In SW2017 you get the warning: "If you hide bend lines in a flat pattern view..."


SOLIDWORKS - If you hide bend lines.bmp


In SW2014 I didn't get this message when running the macro so it wasn't a problem until now. It will be annoying for the users so I dug into it to get rid of this warning. First I tried to select each note and hide them before using BlankSketch - same result. Then I stumbled across IView::ShowSheetMetalBendNotes which hides all bend notes. When using this first BlankSketch activates without the warning. Voila!