SetInvisibleEdge Example |
Using Programming Languages other than VBA
Sub Example_SetInvisibleEdge() ' This example creates a 3D face in model space. ' It then toggles the visibility of the first edge. Dim faceObj As Acad3DFace Dim point1(0 To 2) As Double Dim point2(0 To 2) As Double Dim point3(0 To 2) As Double Dim point4(0 To 2) As Double ' Define the four coordinates of the face point1(0) = 1#: point1(1) = 1#: point1(2) = 0# point2(0) = 5#: point2(1) = 1#: 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) ZoomAll ' Find the current visibility status of the first edge of the face Dim visStatus As Boolean visStatus = faceObj.GetInvisibleEdge(0) MsgBox "The first face is currently " & IIf(faceObj.GetInvisibleEdge(0), "visible.", "invisible."), , "GetInvisibleEdge Example" ' Toggle the visibility of the first edge of the face faceObj.SetInvisibleEdge 0, Not (visStatus) ThisDrawing.Regen False MsgBox "The first face is now " & IIf(faceObj.GetInvisibleEdge(0), "visible.", "invisible."), , "GetInvisibleEdge Example" End Sub
Comments? |