AddXLine 方法 (ActiveX)
创建一条 xline(一条无限线),穿过两个指定点。 支持的平台:仅限 Windows 签名VBA: RetVal = object.AddXline(Point1, Point2) 言论没有其他评论。 例子VBA: 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 可视化 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, 2024-12-15 22:04
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.