Vla-put-visibilityedge3
- 構文
- (vla-put-visibilityedge3 vla-object bool)
- 機能
- 3D 面のエッジ 3 の表示/非表示を取得する。
- 引数
-
- vla-object … 3DFace のVLAオブジェクト
- bool … ブール型 :vlax-true = エッジは表示、:vlax-false = エッジは非表示。
- 戻り値
- nil
- Memo: GetInvisibleEdge および SetInvisibleEdge メソッドを使用してエッジの表示/非表示の値の取得や設定を行うこともできる。これらのメソッドはインデックスを使用してエッジを指定するので、面のすべてのエッジをON/OFFする場合に便利。
- サンプル
(vl-load-com) (defun c:Example_VisibilityEdge1() ;; 3D Face をモデル空間に作成してエッジの表示をコントロールするサンプル (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Define the four coordinates of the face (setq point1 (vlax-3d-point 0 0 0) point2 (vlax-3d-point 5 0 1) point3 (vlax-3d-point 5 5 1) point4 (vlax-3d-point 1 10 0)) ;; 3DFace を作成 (setq modelSpace (vla-get-ModelSpace doc)) (setq faceObj (vla-Add3DFace modelSpace point1 point2 point3 point4)) (vla-ZoomAll acadObj) ;; オブジェクトのエッジ状態を表示する (setq edge1Msg (if (= (vla-get-VisibilityEdge1 faceObj) :vlax-true) "3DFace の Edge1 は表示" "3DFace の Edge1 は非表示")) (setq edge2Msg (if (= (vla-get-VisibilityEdge2 faceObj) :vlax-true) "3DFace の Edge2 は表示" "3DFace の Edge2 は非表示")) (setq edge3Msg (if (= (vla-get-VisibilityEdge3 faceObj) :vlax-true) "3DFace の Edge3 は表示" "3DFace の Edge3 は非表示")) (setq edge4Msg (if (= (vla-get-VisibilityEdge4 faceObj) :vlax-true) "3DFace の Edge4 は表示" "3DFace の Edge4 は非表示")) (alert (strcat Edge1Msg "\n" Edge2Msg "\n" Edge3Msg "\n" Edge4Msg)) ;; エッジの表示を反転 (setq faceNum (vla-GetInteger (vla-get-Utility doc) "\nWhich edge of the 3DFace would you like to toggle the visibility of? (1 to 4)\n")) (cond ((= faceNum 1)(vla-put-VisibilityEdge1 faceObj (if (= (vla-get-VisibilityEdge1 faceObj) :vlax-true) :vlax-false :vlax-true))) ((= faceNum 2)(vla-put-VisibilityEdge2 faceObj (if (= (vla-get-VisibilityEdge2 faceObj) :vlax-true) :vlax-false :vlax-true))) ((= faceNum 3)(vla-put-VisibilityEdge3 faceObj (if (= (vla-get-VisibilityEdge3 faceObj) :vlax-true) :vlax-false :vlax-true))) ((= faceNum 4)(vla-put-VisibilityEdge4 faceObj (if (= (vla-get-VisibilityEdge4 faceObj) :vlax-true) :vlax-false :vlax-true))) (alert "You must enter the number of an edge (1-4)") ) ;; ビューのリフレッシュ (vla-Regen doc acAllViewports) ;; Return to display information about the edges (setq edge1Msg (if (= (vla-get-VisibilityEdge1 faceObj) :vlax-true) "Edge1 of the new 3DFace is now visible" "Edge1 of the new 3DFace is now not visible")) (setq edge2Msg (if (= (vla-get-VisibilityEdge2 faceObj) :vlax-true) "Edge2 of the new 3DFace is now visible" "Edge2 of the new 3DFace is now not visible")) (setq edge3Msg (if (= (vla-get-VisibilityEdge3 faceObj) :vlax-true) "Edge3 of the new 3DFace is now visible" "Edge3 of the new 3DFace is now not visible")) (setq edge4Msg (if (= (vla-get-VisibilityEdge4 faceObj) :vlax-true) "Edge4 of the new 3DFace is now visible" "Edge4 of the new 3DFace is now not visible")) (alert (strcat Edge1Msg "\n" Edge2Msg "\n" Edge3Msg "\n" Edge4Msg)) )
関連事項