AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lisp to erase all viewports in a drawing

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
823 Views, 2 Replies

lisp to erase all viewports in a drawing

hello,

 

i am looking for a script that erases all viewports in a drawing....who can helpe-me?

 

thanks,

 

Nelson

2 REPLIES 2
Message 2 of 3
regisrohde
in reply to: Anonymous

(defun c:erasevp(/ vlist)


(progn
(setq listalayout (layoutlist))

(SETQ CONT 0)
(SETQ ELEMENTS (LENGTH listalayout))
(WHILE (/= ELEMENTS CONT)
(SETQ E1 (NTH CONT listalayout))
(command "-layout" "s" e1)

(setq vlist(ssget "_A" '((0 . "VIEWPORT"))))
(command "erase" vlist "")


(SETQ cont (+ CONT 1))
)
))

 Erese all viewports

Please mark this as the solution if it resolves your issue.Kudos gladly accepted.
Regis Rohde
Message 3 of 3
regisrohde
in reply to: regisrohde

(defun c:eraselt(/ vlist)


(progn
(setq listalayout (layoutlist))

(SETQ CONT 0)
(SETQ ELEMENTS (LENGTH listalayout))
(WHILE (/= ELEMENTS CONT)
(SETQ E1 (NTH CONT listalayout))
(command "-layout" "d" e1)

 

(SETQ cont (+ CONT 1))
)
))

Please mark this as the solution if it resolves your issue.Kudos gladly accepted.
Regis Rohde

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report