Creates a ray passing
through two unique points.
Signature
VBA: RetVal =
object.AddRay(Point1, Point2)
VL : RetVal = (vla-AddRay
object Point1 Point2)
(vla-addRay mspace (vlax-3d-point
apt) (vlax-3d-point pt))
-
Object :
ModelSpace Collection, PaperSpace Collection, Block
The object or objects this method applies to.
-
Point1 : Variant
(three-element array of doubles); input-only
The 3D WCS coordinates specifying the finite start point of the ray.
-
Point2 : Variant
(three-element array of doubles); input-only
The 3D WCS coordinates specifying a point through which the ray will
pass. The ray extends from Point1, through Point2 to infinity.
-
RetVal : Ray
object
The newly created Ray object.
Example :
(defun c:al-addray ()
(vl-load-com)
(setq mspace (vla-get-modelspace
(vla-get-activedocument
(vlax-get-acad-object))))
(setq apt (getpoint "\nSpecify First Point: "))
(setq pt (getpoint "\nSpecify Second Point: " apt))
(setq myray (vla-addRay mspace (vlax-3d-point apt)
(vlax-3d-point pt)))
(princ)
);defun
|
|