AddPoint 方法 (ActiveX)
在给定位置创建 Point 对象。 支持的平台:仅限 Windows 签名VBA: RetVal = object.AddPoint(Point) 言论没有其他评论。 例子VBA: Sub Example_AddPoint() ' This example creates a point in model space. Dim pointObj As AcadPoint Dim location(0 To 2) As Double ' Define the location of the point location(0) = 5#: location(1) = 5#: location(2) = 0# ' Create the point Set pointObj = ThisDrawing.ModelSpace.AddPoint(location) ZoomAll End Sub 可视化 LISP: (vl-load-com) (defun c:Example_AddPoint() ;; This example creates a point in model space. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Define the location of the point (setq location (vlax-3d-point 5 5 0)) ;; Create the point (setq modelSpace (vla-get-ModelSpace doc)) (setq pointObj (vla-AddPoint modelSpace location)) (vla-ZoomAll acadObj) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-19 06:48
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.