×
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

Coding Journal UF type commands

Coding Journal UF type commands

Coding Journal UF type commands

(OP)
I have been attempting to use the UF_DISP_set_display command to turn off the display while journals run, but I cannot get it to work.

I have tried calling

SetDisplay(UF_DISP_SUPPRESS_DISPLAY)

I get:
Name 'UF_DISP_SUPPRESS_DISPLAY' is not declared

I have tried
Dim display_code As Integer
display_code=UF_DISP_SUPPRESS_DISPLAY
SetDisplay(display_code)

I get:
Name 'UF_DISP_SUPPRESS_DISPLAY' is not declared
Reference to a non-shared member requires an object reference.

I have tried
SetDisplay(display_code)

I get:
Name 'display_code' is not declared.

I know I am missing something incredibly basic but I'm not sure what it is or where I should look. I have been all over the NXOpen reference documentation trying to figure this out but I am missing something fundamental.

Thanks in advance for your help.

RE: Coding Journal UF type commands

UF_DISP_SUPPRESS_DISPLAY is a constant declared in the API. I assume you have added Imports NXOpen.UF at the beginning of your code. If so, you can reference the constant like this:

CODE

UFConstants.UF_DISP_SUPPRESS_DISPLAY 

www.nxjournaling.com

RE: Coding Journal UF type commands

(OP)
I have referenced the following at the beginning of the code:
Imports NXOpen.UF
Imports NXOpen.UF.UFDisp

with the following code:
Dim display_code As Integer
display_code = UFConstants.UF_DISP_SUPPRESS_DISPLAY
SetDisplay( display_code )

I get the error:
Reference to a non-shared member requires an object reference.

I got the same error when trying to use the UFConstants line directly instead of using display code.

I have checked to make sure our license allows us access to gateway.

Thanks for the help Cowski.

RE: Coding Journal UF type commands

Do you have a reference to the UFSession?

CODE

Dim ufs As UFSession = UFSession.GetUFSession

ufs.Disp.SetDisplay(UFConstants.UF_DISP_SUPPRESS_DISPLAY)
'do stuff

'unsuppress display
ufs.Disp.SetDisplay(UFConstants.UF_DISP_UNSUPPRESS_DISPLAY) 

www.nxjournaling.com

RE: Coding Journal UF type commands

(OP)
The program works.

Awesome Cowski as always your advice is excelent.

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