TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ronjonp on September 21, 2006, 11:05:43 AM
-
So why does:
(vla-get-arcsmoothness
(vla-get-activeviewport
(vla-get-ActiveDocument (vlax-get-Acad-Object))
)
)
Corresponds to what the drawings viewres is set currently set to but when you use:
(vla-put-arcsmoothness
(vla-get-activeviewport
(vla-get-ActiveDocument (vlax-get-Acad-Object))
)
5000
)
It changes the vla-get-arcsmoothness number but has no effect on the viewres number?
-
It is necessary to change customizations viewres and to make its current!
look
http://www.theswamp.org/index.php?topic=12382.msg153483#msg153483 (http://www.theswamp.org/index.php?topic=12382.msg153483#msg153483)
-
(vla-put-arcsmoothness
(setq v (vla-get-activeviewport
(setq doc(vla-get-ActiveDocument (vlax-get-Acad-Object)))
) ;_ vla-get-activeviewport
) ;_ setq
5000
) ;_ vla-put-arcsmoothness
(vla-put-ActiveViewport doc v)
-
Thank you :). This is what i came up with.
(defun setvres (/ doc actvp)
(setq doc (vla-get-ActiveDocument (vlax-get-Acad-Object))
actvp (vla-get-activeviewport doc)
)
(if (/= (vla-get-arcsmoothness actvp) 5000)
(vla-put-arcsmoothness actvp 5000)
)
(vla-put-activeviewport doc actvp)
(princ)
)
(setvres)