I'm trying to place a couple custom alignment labels via lisp. The label basically labels a point with the station of two different, selected alignments ...this is the gist of my code:
(setq alignment1 (entsel))
(setq alignment2 (entsel))
(setq pt1 (getpoint))
(command "AddAlignOffLbl" alignment1 pt1 pt1 alignment2 "")
(vlax-put-Property(vlax-ename->vla-object(entlast)) 'LabelStyle "Style1")
My deal is this - if Style1 is "current" in the add label dialog box all is good, but if any other style is "current" it only passes the first alignment to the label and the label comes up with ??? in place of the second alignment. If I select the label and go to the properties palette, the second alignment is listed as "none" or something and I can select the desired alignment from within that pull down and it populates the label and all is good.
My question then is this - can I set the default or current label style via lisp in the beginning of my code so it places correctly when ran?
Thanks!