3D 面のエッジ 3 の表示/非表示を指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: ブール型
GetInvisibleEdge および SetInvisibleEdge メソッドを使用してエッジの表示/非表示の値の取得や設定を行うこともできます。これらのメソッドはインデックスを使用してエッジを指定するので、面のすべてのエッジを繰り返す場合に便利です。
VBA:
Sub Example_VisibilityEdge3() ' This example creates a 3D Face in model space and allows the user to ' control the visibility of the edges Dim faceObj As Acad3DFace Dim point1(0 To 2) As Double, point2(0 To 2) As Double, _ point3(0 To 2) As Double, point4(0 To 2) As Double Dim Edge1Msg As String, Edge2Msg As String, _ Edge3Msg As String, Edge4Msg As String ' Define the four coordinates of the face point1(0) = 0: point1(1) = 0: point1(2) = 0 point2(0) = 5: point2(1) = 0: point2(2) = 1 point3(0) = 1: point3(1) = 10: point3(2) = 0 point4(0) = 5: point4(1) = 5: point4(2) = 1 ' Create the 3DFace object in model space Set faceObj = ThisDrawing.ModelSpace.Add3DFace(point1, point2, point3, point4) ThisDrawing.Application.ZoomAll ' Display information about the visibility of the edges for this object DisplayEdgeInformation: Edge1Msg = IIf(faceObj.VisibilityEdge1, "Edge1 of the new 3DFace is visible", "Edge1 of the new 3DFace is not visible") Edge2Msg = IIf(faceObj.VisibilityEdge2, "Edge2 of the new 3DFace is visible", "Edge2 of the new 3DFace is not visible") Edge3Msg = IIf(faceObj.VisibilityEdge3, "Edge3 of the new 3DFace is visible", "Edge3 of the new 3DFace is not visible") Edge4Msg = IIf(faceObj.VisibilityEdge4, "Edge4 of the new 3DFace is visible", "Edge4 of the new 3DFace is not visible") MsgBox Edge1Msg & vbCrLf & _ Edge2Msg & vbCrLf & _ Edge3Msg & vbCrLf & _ Edge4Msg ' Allow user to toggle the visibility of one of the edges Select Case InputBox("Which edge of the 3DFace would you like to toggle the visibility of?", "Toggle Edge Visibility", 1) Case "1": faceObj.VisibilityEdge1 = Not (faceObj.VisibilityEdge1) Case "2": faceObj.VisibilityEdge2 = Not (faceObj.VisibilityEdge2) Case "3": faceObj.VisibilityEdge3 = Not (faceObj.VisibilityEdge3) Case "4": faceObj.VisibilityEdge4 = Not (faceObj.VisibilityEdge4) Case "": Exit Sub Case Else: MsgBox "You must enter the number of an edge (1-4)", vbInformation End Select ' Refresh view ThisDrawing.Regen acAllViewports ' Return to display information about the edges GoTo DisplayEdgeInformation End Sub
Visual LISP:
(vl-load-com) (defun c:Example_VisibilityEdge3() ;; This example creates a 3D Face in model space and allows the user to ;; control the visibility of the edges (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)) ;; Create the 3DFace object in model space (setq modelSpace (vla-get-ModelSpace doc)) (setq faceObj (vla-Add3DFace modelSpace point1 point2 point3 point4)) (vla-ZoomAll acadObj) ;; Display information about the visibility of the edges for this object (setq edge1Msg (if (= (vla-get-VisibilityEdge1 faceObj) :vlax-true) "Edge1 of the new 3DFace is visible" "Edge1 of the new 3DFace is not visible")) (setq edge2Msg (if (= (vla-get-VisibilityEdge2 faceObj) :vlax-true) "Edge2 of the new 3DFace is visible" "Edge2 of the new 3DFace is not visible")) (setq edge3Msg (if (= (vla-get-VisibilityEdge3 faceObj) :vlax-true) "Edge3 of the new 3DFace is visible" "Edge3 of the new 3DFace is not visible")) (setq edge4Msg (if (= (vla-get-VisibilityEdge4 faceObj) :vlax-true) "Edge4 of the new 3DFace is visible" "Edge4 of the new 3DFace is not visible")) (alert (strcat Edge1Msg "\n" Edge2Msg "\n" Edge3Msg "\n" Edge4Msg)) ;; Allow user to toggle the visibility of one of the edges (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)") ) ;; Refresh view (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)) )