Vla-get-anglevertex

提供: GizmoLabs - だいたい CAD LISP なサイト
移動先: 案内検索
構文
(vla-get-anglevertex vla-object )


機能
3 点角度寸法の角度の頂点を取得する。


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


戻り値
角度の頂点を表す 3D 座標。


サンプル
(vl-load-com)
(defun c:Example_AngleVertex()
    ;; Dim3PointAngular 図形をモデルに作成して頂点を取得するサンプル
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    ;; Dim3PointAngular 図形の設定
    (setq AngleVertex (vlax-3d-point 2 5 0)
          NewAngleVertex (vlax-3d-point 1 1 0)
          FirstPoint (vlax-3d-point 2 2 0)
          SecondPoint (vlax-3d-point 1 4 0)
          TextPoint (vlax-3d-point 6 6 0))

    ;; Dim3PointAngular 図形を作成
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq DimPointAngularObj (vla-AddDim3PointAngular modelSpace AngleVertex FirstPoint SecondPoint TextPoint))
    (vla-ZoomAll acadObj)

    ;; 頂点を表示
    (setq CurrentVertex (vla-get-AngleVertex DimPointAngularObj))
    (alert (strcat "現在の角度頂点設定 :\n"
                   (rtos (vlax-safearray-get-element (vlax-variant-value CurrentVertex) 0) 2) "\n"
                   (rtos (vlax-safearray-get-element (vlax-variant-value CurrentVertex) 1) 2) "\n"
                   (rtos (vlax-safearray-get-element (vlax-variant-value CurrentVertex) 2) 2)))

    ;; 変更
    (vla-put-AngleVertex DimPointAngularObj NewAngleVertex)
    (vla-Regen doc acAllViewports)
    
    ;; 頂点を表示
    (setq CurrentVertex (vla-get-AngleVertex DimPointAngularObj))
    (alert (strcat "新しい角度頂点:\n"
                   (rtos (vlax-safearray-get-element (vlax-variant-value CurrentVertex) 0) 2) "\n"
                   (rtos (vlax-safearray-get-element (vlax-variant-value CurrentVertex) 1) 2) "\n"
                   (rtos (vlax-safearray-get-element (vlax-variant-value CurrentVertex) 2) 2)))
)

関連事項