×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to check solid visibility in VB ?

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

Regards
Didier Psaltopoulos
http://www.psi-cad.fr

RE: How to check solid visibility in VB ?

The visibility option as shown in your code above only applies to smart objects, not all graphical objects in the display. There are a number of factors that affect object visibility within a part, the 2 main ones are the hidden status (.IsBlanked) and the object's layer visibility. The .AskVisibleObjects method is also useful; it is made for drafting views, but also gives some information on modeling views.

www.nxjournaling.com

RE: How to check solid visibility in VB ?

(OP)
Hi Cowski,

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close