「Vla-get-arcpoint」の版間の差分

提供:GizmoLabs - だいたい CAD LISP なサイト
(ページの作成:「{{AutoLISP}} ; 構文 : (vla-get-arcpoint ''vla-object'') ; 機能 : 弧状寸法の円弧上の点を取得する。 ; 引数 :* vla-object … DimArcLength の VLA...」)
 
編集の要約なし
19行目: 19行目:
<pre class="brush:autolisp;">
<pre class="brush:autolisp;">
(vl-load-com)
(vl-load-com)
(defun c:Example_AddDimArc()
(defun c:Example_get_arcpoint()
     ;; This example creates an arc and arc length dimension in model space.
     ;; 円弧と円弧寸法を作成して円弧寸法の点を返す
     (setq cadObj (vlax-get-acad-object))
     (setq cadObj (vlax-get-acad-object))
     (setq doc (vla-get-ActiveDocument cadObj))
     (setq doc (vla-get-ActiveDocument cadObj))

2015年5月4日 (月) 13:27時点における版

構文
(vla-get-arcpoint vla-object)


機能
弧状寸法の円弧上の点を取得する。


引数
  • vla-object … DimArcLength の VLA オブジェクト


戻り値
円弧上の座標


サンプル
(vl-load-com)
(defun c:Example_get_arcpoint()
    ;; 円弧と円弧寸法を作成して円弧寸法の点を返す
    (setq cadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument cadObj))
  
    (setq modelSpace (vla-get-ModelSpace doc))

    ;; 円弧を作成
    (setq center (vlax-3d-point 0 0 0))
    (setq arc (vla-AddArc modelSpace center 10 (/ PI 3) (/ (* PI 3) 4)))
    
    ;; 寸法を定義
    (setq arcPoint (vlax-3d-point 0 15 0)
          startPoint (vla-get-StartPoint arc)
          endPoint (vla-get-EndPoint arc))
  
    ;; 弧長寸法をモデルに作成
    (setq dimArcLength (vla-AddDimArc modelSpace center startPoint endPoint arcPoint))
    (vla-ZoomExtents cadObj)

    (vlax-safearray->list 
        (vlax-variant-value 
          (vla-get-arcpoint dimArcLength)))
)



関連事項