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!

Catia VBA - how to determine if an object is hidden

Status
Not open for further replies.

woehrk

Mechanical
Nov 21, 2014
1
US
What I would like to do: determine if an object is "hidden" or not.

I cannot seem to find the correct property for an object that specifies whether or not it is "hidden". As you can see below, there is a property available under .Application.Visible but that value is always true...

Is there a "visibility" property for objects that can be used? For example if I search in catia, specifying the attribute of visibility = hidden, this performs exactly as I desire.

code:

Dim part As part
Set part = partDocument.part
Dim myBodiesList As hybridBodies
Set myBodiesList = part.hybridBodies

For Each myBody In myBodiesList
If myBody.hybridBodies.Count = 0 Then
Set myShapesList = myBody.HybridShapes
GetShapes myShapesList
ElseIf myBody.Application.Visible Then
GetMyHybridBodies_PutInList myBody
End If
Next myBody
 
Replies continue below

Recommended for you

you can use Selection.VisProperties.GetShow to get the status of show/noshow

Eric N.
indocti discant et ament meminisse periti
 

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

______

Alex ,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top