Hello everyone!
I got some really great help from the folks here, the other day, and now unfortunately I am back.
I got some code from one of the members here, and it does what I would like it to do. It does not however, have any built-in error handling abilities.
What I would like, is for this routine to prompt me for a viewport, and allow me to rotate what I am seeing. It does that now. Here is the code I have so far:
I would like it to tell me:Code:(defun c:rvp (/ ss VpId ss1) (SETVAR "CMDECHO" 0) (SETQ SCMDE (GETVAR "CMDECHO")) (setq ss (car (entsel "\nSelect viewport to rotate view: "))) (setq VpId (cdr (assoc 69 (entget ss)))) (setq ss1 (entget ss)) (command "_.MSPACE") (setvar "cvport" VpId) (command "_.dview" "" "tw" (getreal "\n Enter angle desired: ") "") (command "_.regenall") (command "_.PSPACE") (princ))
(alert "ERROR -- Command unavailable in view-locked viewport!")
If the viewport I select has the display properties locked. Likewise, if I select any other type of entity, I would like it to go something like this:
(alert "ERROR -- Entity selected is not a viewport!")
I have been trying for the past couple of days toget this to work, without sucess. Would any of you be willing to help me out?
Don