Vla-put-extline2startpoint
- 構文
- (vla-put-extline2startpoint vla-object point)
- 機能
- 角度寸法の 第2寸法補助線の始点を指定する。
- 引数
-
- vla-object … VLAオブジェクト
- point … 第2寸法補助線の始点の 3D 座標
- 戻り値
- nil
- サンプル
(vl-load-com) (defun c:Example_ExtLine1-2StartPoint() ;; 角度寸法を作成して ExtLine1StartPoint ExtLine2StartPoint ;; の場所を変更するサンプル。 (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 extLineStartPoint1 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine1StartPoint dimObj)))) (setq extLineStartPoint2 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine2StartPoint dimObj)))) (alert (strcat "現在の ExtLine1StartPoint 値 " (rtos (nth 0 extLineStartPoint1) 2) ", " (rtos (nth 1 extLineStartPoint1) 2) ", " (rtos (nth 2 extLineStartPoint1) 2))) (alert (strcat "現在の ExtLine2StartPoint 値 " (rtos (nth 0 extLineStartPoint2) 2) ", " (rtos (nth 1 extLineStartPoint2) 2) ", " (rtos (nth 2 extLineStartPoint2) 2))) ;; 補助線1,2の始点を変更 (setq FirstPoint (vlax-3d-point 0 3 0)) (setq SecondPoint (vlax-3d-point 2 6 0)) (vla-put-ExtLine1StartPoint dimObj FirstPoint) (vla-put-ExtLine2StartPoint dimObj SecondPoint) (vla-Update dimObj) ;; 補助線1,2を返す ;; 返り値はバリアントな点に注意 (setq retPnt1 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine1StartPoint dimObj)))) (setq retPnt2 (vlax-safearray->list (vlax-variant-value (vla-get-ExtLine2StartPoint dimObj)))) (alert (strcat "新しい ExtLine1StartPoint 値 " (rtos (nth 0 retPnt1) 2) ", " (rtos (nth 1 retPnt1) 2) ", " (rtos (nth 2 retPnt1) 2))) (alert (strcat "新しい ExtLine2StartPoint 値 " (rtos (nth 0 retPnt2) 2) ", " (rtos (nth 1 retPnt2) 2) ", " (rtos (nth 2 retPnt2) 2))) )
関連事項