Hello all,
I'm trying to develop a macro to automate sheet metal part drawings. I'm starting small and working my way in. Our drawing standards are such that bend notes are to be horizontal with no leaders; they're aligned with the bend line dimensions instead. I'm beginning with setting up a macro that will turn leaders on and turn vertical notes horizontal, then allow the designer to move the bend notes into place, then turn the leaders back off while adding our usually manual notes (we designate the press brake die by letter instead of using the bend radius)
I'm having trouble with step 1. Having the annotation object, I can't turn on a leader unless the bend note has been moved (Either manually or I tested it by getting/setting position and it works), and when I set the text format of the annotation it doesn't clear the "usedoc" format of the bend notes or make the format changes. Ultimately, from the annotation, I want to "getspecificannotation" to get the note object then use note.angle=0 but the angle can't change unless the annotation format is not set to use the document format. It'll work if I manually uncheck the "use document font" option, but if I try to set the format with the macro it doesn't work.
I think it's weird that the bend note annotation formats can't be set like other notes, and the leaders can't be turned on unless the note has been moved. I figure there must be something I'm overlooking or straight up doing wrong? Or do bend notes just function differently? I'm using SW2020 SP3.0
I've attached my macro so far. The current preconditions are to have the flat pattern view selected in a drawing doc, but ultimately I'd have the drawing doc and the views made as part of the macro.
Thank you
SolidworksApi/macros