kasra Posted April 21, 2010 Posted April 21, 2010 Hi. I wrote a lisp routine for changing viewport scale in paper space. but it dosen't work properly. I can't understand what is wrong in my routine... please check my routine and tell why it dosen't work. thanks. (SETQ VIEWPRTSEL (SSGET "_C" '(0.0 0.0 0.0) '(420.158 297.032 0.0) '((0 . "VIEWPORT"))) VIEWPRT1 (SSNAME VIEWPRTSEL 0) VIEWPRT2 (ENTGET VIEWPRT1) VIEWPRT3 (CDR VIEWPRT2) VIEWPRT41 (CDR (ASSOC 41 VIEWPRT2)) OLDVIEWPRT45L (ASSOC 45 VIEWPRT2) VIEWPRT45 (CDR OLDVIEWPRT45L) );_SETQ (IF (/= VIEWPRT45 VIEWPRT41) (PROGN (SETQ NEWVIEWPRT45 (* VIEWPRT41 SCALE)) (SETQ NEWVIEWPRT45L (CONS 45 NEWVIEWPRT45)) (SETQ VIEWPRT2 (SUBST NEWVIEWPRT45L OLDVIEWPRT45L VIEWPRT2)) (ENTMOD VIEWPRT2) );_PROGN );_IF Quote
Lee Mac Posted April 21, 2010 Posted April 21, 2010 You cannot use the entmod function to modify a viewport entity. .............. Quote
kasra Posted April 21, 2010 Author Posted April 21, 2010 I found that this code return custom scale of viewprot. (vla-get-customscale (vlax-ename->vla-object ent)) by which one i can change custom scale ??? Quote
Lee Mac Posted April 21, 2010 Posted April 21, 2010 (vla-put-CustomScale (vlax-ename->vla-object ent) <scale>) Quote
kasra Posted April 21, 2010 Author Posted April 21, 2010 Thanks a lot. As i told befor, i'm new in lisp and un-familiar with activex functions. So i appreciate you for helping me. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.