0 Members and 1 Guest are viewing this topic.
How can I check if "test" exists?
Thanks ronjonpin the meantime I found a post by irneb (thanks too ! )http://forums.augi.com/archive/index.php/t-102823.htmlCode - Auto/Visual Lisp: [Select](setq root (entget (namedobjdict)))(setq ed (entget (cdr (cadr (member '(3 . "ACAD_PLOTSTYLENAME") root)))))(member (cons 3 "test") ed)
Quote from: Peter2 on May 27, 2015, 03:39:37 PMHow can I check if "test" exists?....[Edit] - D@mn ninjas
(vl-catch-all-apply 'setvar '(cplotstyle "test"))
Actually the "ACAD_PLOTSTYLENAME" dictionary does not list the styles in the STB file. It lists the styles that are in use in the drawing.
Try using:Code: [Select](vl-catch-all-apply 'setvar '(cplotstyle "test"))
Quote from: roy_043 on May 27, 2015, 05:52:43 PMActually the "ACAD_PLOTSTYLENAME" dictionary does not list the styles in the STB file. It lists the styles that are in use in the drawing.Yes, you're right. Searching the "available" plotstyles needs another solution.Quote from: roy_043 on May 28, 2015, 04:04:45 AMTry using:Code: [Select](vl-catch-all-apply 'setvar '(cplotstyle "test"))Yes, it works. Namely there is still an error-message created by Autocad (not Lisp), but the lisp continues to work.