Vla-get-extline2point
- 構文
- (vla-get-extline2point vla-object)
- 機能
- 第2寸法補助線の起点を取得する。
- 引数
-
- vla-object … DimAligned、DimArcLength の VLAオブジェクト
- point … 第2寸法補助線の原点を表す 3D 座標
- 戻り値
- nil
- サンプル
(vl-load-com) (defun c:Example_ExtLine1-2Point() ;; 平行寸法を作成し、その寸法の ExtLine1Point と ExtLine2Point の ;; プロパティを変更するサンプル (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; 寸法の設定 (setq point1 (vlax-3d-point 5 5 0) point2 (vlax-3d-point 10 5 0) location (vlax-3d-point 5 7 0)) ;; 平行寸法オブジェクトをモデル空間に作成 (setq modelSpace (vla-get-ModelSpace doc)) (setq dimObj (vla-AddDimAligned modelSpace point1 point2 location)) (vla-ZoomAll acadObj) (setq extLine1Point (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine1Point dimObj)))) (setq extLine2Point (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine2Point dimObj)))) (alert (strcat "現在の ExtLine1Point 値 " (rtos (nth 0 extLine1Point) 2) ", " (rtos (nth 1 extLine1Point) 2) ", " (rtos (nth 2 extLine1Point) 2))) (alert (strcat "現在の ExtLine2Point 値 " (rtos (nth 0 extLine2Point) 2) ", " (rtos (nth 1 extLine2Point) 2) ", " (rtos (nth 2 extLine2Point) 2))) ;; 最初の寸法補助線の端点を変更 (setq point1 (vlax-3d-point 2 5 0)) (setq point2 (vlax-3d-point 12 5 0)) (vla-put-ExtLine1Point dimObj point1) (vla-put-ExtLine2Point dimObj point2) (vla-Update dimObj) ;; 最初の寸法補助線の端点を返す ;; 戻り値はバリアントであることに注意 (setq retPnt1 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine1Point dimObj)))) (setq retPnt2 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine2Point dimObj)))) (alert (strcat "新しい ExtLine1Point 値 " (rtos (nth 0 retPnt1) 2) ", " (rtos (nth 1 retPnt1) 2) ", " (rtos (nth 2 retPnt1) 2))) (alert (strcat "新しい ExtLine2Point 値 " (rtos (nth 0 retPnt2) 2) ", " (rtos (nth 1 retPnt2) 2) ", " (rtos (nth 2 retPnt2) 2))) )
関連事項