Jump to content

Recommended Posts

Posted

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

Posted
You cannot use the entmod function to modify a viewport entity.

..............

Posted

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 ???

Posted

(vla-put-CustomScale (vlax-ename->vla-object ent) <scale>)

 

:)

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...