Adding annoallvisible to an existing lisp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an existing list used to move, create and edit the layouts. When copying layouts, the "show annotative objects" in the new layout turns off. I know the command to turn it on but I can't figure out how to add it to my lisp.
The command is ANNOALLVISIBLE and it needs to be set to 1. Can someone please help me add this in?
This is the copy layout portion of the lisp:
(defun _CopyTab ( idx lst / upp oldname oldlay newname i objlst newlay newblk )
(setq upp (mapcar 'strcase lst))
(foreach x idx
(setq oldname (nth x lst)
oldlay (vla-item aclay oldname)
newname (strcat oldname " (2)")
i 2
objlst nil
)
(while (member (strcase newname) upp)
(setq newname (strcat oldname " (" (itoa (setq i (1+ i))) ")"))
)
(setq newlay (vla-add aclay newname)
newblk (vla-get-block newlay)
lst (append lst (list newname))
)
(vla-copyfrom newlay oldlay)
(if
(vlax-for o (vla-get-block oldlay)
(setq objlst (cons o objlst))
)
(vla-copyobjects acdoc
(vlax-make-variant
(vlax-safearray-fill
(vlax-make-safearray vlax-vbobject (cons 0 (1- (length objlst)))) (reverse objlst)
)
)
newblk
)
)
)
lst
)