Vla-put-extline2endpoint
- 構文
- (vla-put-extline2endpoint vla-object point)
- 機能
- 第2寸法補助線の終点を指定する。
- 引数
-
- vla-object … Dim3PointAngular、DimAngular の VLAオブジェクト
- point … 第2寸法補助線の終点の 3D 座標
- 戻り値
- nil
- サンプル
(vl-load-com) (defun c:Example_ExtLine1-2endPoint() ;; 角度寸法を作成して ExtLine1endPoint ExtLine2endPoint ;; の場所を変更するサンプル。 (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; 寸法を作成 (setq AngleVertex (vlax-3d-point 0 5 0) FirstPoint (vlax-3d-point 1 7 0) SecondPoint (vlax-3d-point 1 3 0) TextPoint (vlax-3d-point 3 5 0)) ;; モデル空間に角度寸法を作成。 (setq modelSpace (vla-get-ModelSpace doc)) (setq dimObj (vla-AddDimAngular modelSpace AngleVertex FirstPoint SecondPoint TextPoint)) (vla-ZoomAll acadObj) (setq extLineendPoint1 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine1endPoint dimObj)))) (setq extLineendPoint2 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine2endPoint dimObj)))) (alert (strcat "現在の ExtLine1endPoint 値 " (rtos (nth 0 extLineendPoint1) 2) ", " (rtos (nth 1 extLineendPoint1) 2) ", " (rtos (nth 2 extLineendPoint1) 2))) (alert (strcat "現在の ExtLine2endPoint 値 " (rtos (nth 0 extLineendPoint2) 2) ", " (rtos (nth 1 extLineendPoint2) 2) ", " (rtos (nth 2 extLineendPoint2) 2))) ;; 補助線1,2の終点を変更 (setq FirstPoint (vlax-3d-point 10 3 0)) (setq SecondPoint (vlax-3d-point 12 6 0)) (vla-put-ExtLine1endPoint dimObj FirstPoint) (vla-put-ExtLine2endPoint dimObj SecondPoint) (vla-Update dimObj) ;; 補助線1,2値を変更 ;; 返り値はバリアントな点に注意 (setq retPnt1 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine1endPoint dimObj)))) (setq retPnt2 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine2endPoint dimObj)))) (alert (strcat "新しい ExtLine1endPoint 値 " (rtos (nth 0 retPnt1) 2) ", " (rtos (nth 1 retPnt1) 2) ", " (rtos (nth 2 retPnt1) 2))) (alert (strcat "新しい ExtLine2endPoint 値" (rtos (nth 0 retPnt2) 2) ", " (rtos (nth 1 retPnt2) 2) ", " (rtos (nth 2 retPnt2) 2))) )
関連事項