TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Coder on April 19, 2012, 02:16:47 AM
-
Hello everybody .
How to do a named view with lisp without using command call ?
Many thanks
-
Explore properties and methods for Views collection.
-
Thank you Stefan .
I tried to change the center point and the start with the end points of the view , but I could not . :oops:
Can you please take a look .... ?
(setq v (vla-item (vla-get-views (vla-get-ActiveDocument (vlax-get-acad-object))) "MyView"))
(vla-put-center v (vlax-3d-point '(10.0 10.0))) ;;; this is return error
(vla-put-startpoint v (vlax-3d-point '(10.0 10.0))) ;;; this is return error
(vla-put-endpoint v (vlax-3d-point '(50.0 50.0))) ;;; this is return error
-
Center point is a 2d coordinate
View object doesn't have StartPoint and EndPoint properties. Do you mean Height and Width?
If you are looking for a view delimited by '(10 10) and '(50 50) corners, try
-
Very nice , thanks a lot Stefan :-)
One last question please .
why this did not work ?
(vla-put-center v (vlax-3d-point '(25.0 25.0 0.0)))
-
small tip. center of view is not in center if view is rotated.
http://www.theswamp.org/index.php?topic=38126.msg431906#msg431906
k.
-
vlax-3d-point create a 3d coordinate and Center property require a 2D coordinate
-
vlax-3d-point create a 3d coordinate and Center property require a 2D coordinate
That's great Stefan . it is a very kind of you to spend that time for me with the clear explanations .
Many thanks :-)