Vla-get-majorradius
- 構文
- (vla-get-majoraxis vla-object)
- 機能
- 楕円の主軸の長さを取得する。
- 引数
-
- vla-object … EllipseのVLA オブジェクト
- 戻り値
- nil
- memo. 楕円の長い方の軸を主軸、短い方を副軸と呼ぶ。
- サンプル
(vl-load-com)
(defun c:Example_MajorRadius()
;; 楕円を作成してから主軸と複軸の長さを取得するサンプル
(setq doc (vla-get-ActiveDocument (vlax-get-acad-object))
;; Create an ellipse in model space
(setq center (vlax-3d-point 5 5 0)
majAxis (vlax-3d-point 10 20 0)
radRatio 0.3)
(setq modelSpace (vla-get-ModelSpace doc))
(setq ellObj (vla-AddEllipse modelSpace center majAxis radRatio))
(vla-ZoomAll (vlax-get-acad-object))
;; Display radius information
(alert (strcat "楕円の主軸は: " (rtos (vla-get-majorRadius ellObj) 2)
"\n楕円の複軸は: " (rtos (vla-get-minorRadius ellObj) 2)))
)
関連事項