×
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

Can a journal find a node or computer name?

Can a journal find a node or computer name?

Can a journal find a node or computer name?

(OP)
At work we all have individual computer node names. I would like to write a journal that can read a node name and then based on that write somebodies initials. Given the node name I can do the rest. I am sure that there is a way to find it because in the log file 5th line down there is a record of it. now looking at the log file, if it is possible to get the varible in the "Information listing created by " on the second line, then that woudl be good too.

RE: Can a journal find a node or computer name?

Try: Environment.UserName

www.nxjournaling.com

RE: Can a journal find a node or computer name?

(OP)
Yeah, that works. I found an example online on how to use it, but could not find anything in the nx.open api help file about system environment variables.

RE: Can a journal find a node or computer name?

Here is a sample jounal to get the value of a system environment variable.
There may be an easier way - I'm not the expert, I got this from a friend.

CODE -->

Option Strict Off

Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.UI
Imports NXOpen.Utilities

Module startup

   Public s As Session = Session.GetSession()
   Public ufs As UFSession = UFSession.GetUFSession()
   Public lw As ListingWindow = s.ListingWindow

   Sub Main()

      Dim licenseString As String = ""

      ufs.UF.TranslateVariable("UGS_LICENSE_SERVER", licenseString)

      MsgBox("The current License Server is: " & licenseString, _
                                          MsgBoxStyle.Information)

   End Sub

   Public Function GetUnloadOption(ByVal dummy As String) As Integer

      Return Session.LibraryUnloadOption.Immediately

   End Function

End Module 

Mark Rief
Product Manager
Siemens PLM

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