sigmacoder
Mechanical
Hello,
How can i know if a drawing view is hidden or not using VBA Code?
thank you!
How can i know if a drawing view is hidden or not using VBA Code?
thank you!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub Ask_Hidden()
Set drawingDocument1 = CATIA.ActiveDocument
Dim selection1 As Selection
Set selection1 = drawingDocument1.Selection
Set drawingSheets1 = drawingDocument1.Sheets
Set drawingSheet1 = drawingSheets1.Item("Sheet.1")
Set drawingViews1 = drawingSheet1.Views
For i = 3 To drawingViews1.Count
Set drawingView1 = drawingViews1.Item(i)
selection1.Clear
selection1.Add drawingView1
Dim showstate As CatVisPropertyShow
Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
visProperties1.GetShow showstate
Select Case showstate
Case catVisPropertyNoShowAttr
MsgBox "Hidden View"
Case catVisPropertyShowAttr
MsgBox "visible View"
End Select
Next
End Sub