Hello All
I have the lisp code below, which aligns a block in paper space (in this case a north point block) to the WCS (north) of the model space view.
I would like modifications to this but need help if anybody can help?
The modification i would like is for an error trap.
I would like it to loop if i miss or select anything but a viewport or the polyline boundary of the polygon viewport.
And also if i select anything but the block it errors.
Any help appreciated.
;;Wriiten by Mike Roberts
(defun c:RN()
(setq tw(entget(car(entsel" Select a Viewport:"))))
(setq new (cdr (assoc 0 tw)))
(cond
((= new "VIEWPORT")(setq rt(cdr(assoc 51 tw))))
((= new "LWPOLYLINE")(setq temp (entget(cdr (assoc 330 tw))))(setq rt(cdr(assoc 51 temp))))
)
(setq en(car(entsel" Select North Arrow: ")))
(setq elist(entget en))
(setq elist(subst (cons 50 rt)(assoc 50 elist) elist))
(entmod elist)
(princ)
)
Many thanks