Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

NXOpen dll or exe will not run in any other NX machines

Status
Not open for further replies.

bhavyarani

Mechanical
Joined
May 2, 2015
Messages
11
Location
IN
Hello All,

I have created some vb scripts using Visual Studio 2019 and NX is installed in same machine. Dll or Exe runs fine.
Same dll or exe if I share to other machines and test in NX it is not working.
I guess something to do with Setting. Can someone help me on this.

nx_r513ai.png
nx1_cxyf4u.png


Code for reference:
Imports NXOpen
Imports NXOpenUI
Imports NXOpen.Annotations


Public Class NXOpenWinForm
Dim nx As Session
Dim nxpart As Part
Dim nxUI As UI
Dim nxexpressions As ExpressionCollection
Dim nxexpression As Expression
Public Shared Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = Session.LibraryUnloadOption.Immediately
End Function
Private Sub NXOpenWinForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
nx = Session.GetSession()
nxUI = UI.GetUI()
nxpart = nx.Parts.Work
nxexpressions = nxpart.Expressions
nxexpression = nxpart.FindObject("Length")
TextBox1.Text = nxexpression.Value

nxexpression = nxpart.FindObject("Width")
TextBox2.Text = nxexpression.Value

nxexpression = nxpart.FindObject("Height")
TextBox3.Text = nxexpression.Value
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
nxexpression = nxpart.FindObject("Length")
nxexpressions.Edit(nxexpression, TextBox1.Text)

nxexpression = nxpart.FindObject("Width")
nxexpressions.Edit(nxexpression, TextBox2.Text)

nxexpression = nxpart.FindObject("Height")
nxexpressions.Edit(nxexpression, TextBox3.Text)

Dim umID As Session.UndoMarkId = Nothing
nx.UpdateManager.DoUpdate(umID)
End Sub
End Class




Thanks in advance
Bhavya
 
You might have a better chance of getting a useful response if you were to post this in the Siemens: UG/NX forum:


John R. Baker, P.E. (ret)
Irvine, CA
Siemens PLM:
UG/NX Museum:

The secret of life is not finding someone to live with
It's finding someone you can't live without
 
Thank you. I have posted in UG-NX forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top