Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Macro CATIA] State of a drawing view

Status
Not open for further replies.

sigmacoder

Mechanical
Mar 16, 2013
30
MA
Hello,

How can i know if a drawing view is hidden or not using VBA Code?

thank you!
 
Replies continue below

Recommended for you

Code:
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

improve to your needs..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top