创建穿过两个唯一点的光线。 支持的平台:仅窗口 签名工 务 局: RetVal = object.AddRay(Point1, Point2) 言论没有额外的评论。 例子工 务 局: Sub Example_AddRay() ' This example creates a ray in model space. Dim rayObj As AcadRay Dim basePoint(0 To 2) As Double Dim SecondPoint(0 To 2) As Double ' Define the ray basePoint(0) = 3#: basePoint(1) = 3#: basePoint(2) = 0# SecondPoint(0) = 4#: SecondPoint(1) = 4#: SecondPoint(2) = 0# ' Creates a Ray object in model space Set rayObj = ThisDrawing.ModelSpace.AddRay(basePoint, SecondPoint) ZoomAll End Sub Visual LISP: (vl-load-com) (defun c:Example_AddRay() ;; This example creates a ray in model space. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Define the ray (setq basePoint (vlax-3d-point 3 3 0) secondPoint (vlax-3d-point 4 4 0)) ;; Creates a Ray object in model space (setq modelSpace (vla-get-ModelSpace doc)) (setq rayObj (vla-AddRay modelSpace basePoint secondPoint)) (vla-ZoomAll acadObj) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:22
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.