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