How to check solid visibility in VB ?
How to check solid visibility in VB ?
(OP)
Hi,
In the below code, I didn't succeed to test the solid visibility. Something is wrong in the syntax NXOpen.SmartObject.VisibilityOption.Visible....
Thanks in advance to help me
For Each body In bodies
If body.name = solide1 Then
objects1(0) = body
If NXOpen.SmartObject.VisibilityOption.Visible(solide1) Then
'
s.DisplayManager.BlankObjects(objects1)
Else
'
s.DisplayManager.ShowObjects(objects1, DisplayManager.LayerSetting.ChangeLayerToSelectable)
End If
End If
Next body
In the below code, I didn't succeed to test the solid visibility. Something is wrong in the syntax NXOpen.SmartObject.VisibilityOption.Visible....
Thanks in advance to help me
For Each body In bodies
If body.name = solide1 Then
objects1(0) = body
If NXOpen.SmartObject.VisibilityOption.Visible(solide1) Then
'
s.DisplayManager.BlankObjects(objects1)
Else
'
s.DisplayManager.ShowObjects(objects1, DisplayManager.LayerSetting.ChangeLayerToSelectable)
End If
End If
Next body
Regards
Didier Psaltopoulos
http://www.psi-cad.fr





RE: How to check solid visibility in VB ?
www.nxjournaling.com
RE: How to check solid visibility in VB ?
Thanks
I found the solution with the following code
For Each body In bodies
If body.name = solide1 Then
objects1(0) = body
Dim disProps As UFObj.DispProps
ufs.Obj.AskDisplayProperties(objects1(0).Tag, disProps)
If disProps.blank_status = UFConstants.UF_OBJ_BLANKED Then
' la ligne ci-dessous sert à afficher
s.DisplayManager.ShowObjects(objects1, DisplayManager.LayerSetting.ChangeLayerToSelectable)
Else
' la ligne ci-dessous sert à cacher
s.DisplayManager.BlankObjects(objects1)
End If
End If
Next body
Regards
Didier Psaltopoulos
http://www.psi-cad.fr