I am beginner , how to extract value X Y Z of point p3 p4
(defun c:test ()
(vl-load-com)
(setq actdoc (vla-get-ActiveDocument (vlax-get-acad-object)))
(setq objm (vla-get-ModelSpace actdoc))
(setq obju (vla-get-Utility actdoc))
(setq oldhigh (getvar "Highlight") oldsnap (getvar "Osmode") oldblip (getvar "BlipMode") oldecho (getvar "Cmdecho") );setq
(setvar "Highlight" 0) (setvar "Osmode" 517) (setvar "Cmdecho" 0) (setvar "Blipmode" 0)
(setq p3 (vlax-3D-point '(0 0 0)))
(setq p4 (vlax-3D-point '(5000 2000 0)))
(setq dat (vlax-variant-value p4) ) - it doesn't work
(setq p1 '(0 0 0))
(setq p2 '(5000 2000 0))
(setq odD (- (nth 0 p2) (nth 0 p1)))
(setq odT (- (nth 1 p2) (nth 1 p1)))
)
Solved! Go to Solution.
Solved by pbejse. Go to Solution.
(vlax-safearray->list (vlax-variant-value p4) )
Dont undertand what you're trying to do though
Why create p4 from a point list to safearray the convert it back?
All right I will try to explain
Please help me how to find out, what function use: I would like to know the X Y Z of points: p3 and p4
(defun c:test ()
(vl-load-com)
(setq actdoc (vla-get-ActiveDocument (vlax-get-acad-object)))
(setq objm (vla-get-ModelSpace actdoc))
(setq obju (vla-get-Utility actdoc))
(setq oldhigh (getvar "Highlight") oldsnap (getvar "Osmode") oldblip (getvar "BlipMode") oldecho (getvar "Cmdecho") );setq
(setvar "Highlight" 0) (setvar "Osmode" 517) (setvar "Cmdecho" 0) (setvar "Blipmode" 0)
(setq p3 (vlax-3D-point (getpoint)) )
(setq p4 (vlax-3D-point (getpoint)) )
(setq p1 '(0 0 0))
(setq p2 '(5000 2000 0))
(setq odD (- (nth 0 p2) (nth 0 p1)))
(setq odT (- (nth 1 p2) (nth 1 p1)))
)