Hello everyone,
With my limited knowledge of LISP, I am attempting to write a lisp that will change the orientation of what is displayed inside of a paperspace viewport. After a great amount of searching here, I finally discovered that the DVIEW --> TWist command does what I am looking for. Rotating the UCS around the Z axes, and then using plan +[ENTER] will zoom/extents everytime! My wish is to kep the viewport scale the same, only rotate the view. DVIEW seems to do this for me. Alright, enough history, here is where I am at...
I am able to get my code to run correctly, but if there is more than one viewport on the layout tab, it always seems to default to the last one that was active. So I have attemped to further modify my code to prompt me for which VP I want. So far, so good. It asks me, and I pick the one I want. here is where I am lost...
After I choose which VP I want, it is still defaulting to the last active viewport anyway!
Are there any LISP gurus out there that would be willing to help out a fellow AutoCAD user? Here is the code I have so far:
Also, how would I write this, to also prompt me for the angle when I select the viewport, rather than have one routine for each angle (as you can see, I am only rotating it to the 0 angle at the moment...)?Code:(defun c:r0 () (SETVAR "CMDECHO" 0) (SETQ SCMDE (GETVAR "CMDECHO")) (setq ss (car (entsel "\nSelect a object"))) (setq ss1 (entget ss)) (command "_.MSPACE") (command "dview" "" "tw" "0" "") (command "rea") (command "_.PSPACE") (princ))
Thanks in advance!
Don