Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK 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
May 2, 2015
11
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
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor