Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a journal find a node or computer name?

Status
Not open for further replies.

aluminum2

Aerospace
Apr 27, 2010
218
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.
 
Replies continue below

Recommended for you

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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor