Hi!
not found the entry point in this simple example
what did I do wrong?
journal is compiled in the NX_fit.dll:
Option Strict Off
Imports System
Imports System.Collections.Generic
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Annotations
Imports NXOpen.Assemblies
Module NXJournal
Public theSession As Session = Session.GetSession()
Public ufs As UFSession = UFSession.GetUFSession()
Sub Main ()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display
fit()
End Sub
Sub fit ()
Dim workPart As NXOpen.Part = theSession.Parts.Work
workPart.ModelingViews.WorkView.Fit()
End Sub
End Module
journal of the caller of this dll:
Option Strict Off
Imports System
Imports System.Collections.Generic
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Annotations
Imports NXOpen.Assemblies
Module NXJournal
Public theSession As Session = Session.GetSession()
Public ufs As UFSession = UFSession.GetUFSession()
Declare Sub fit Lib "D:\macro\NX_fit.dll"
Sub Main ()
Call fit
End sub
End Module
re: call dll
Do you have an author license?
Have both journals been compiled and signed?
Could you clarify? I do not
Could you clarify? I do not understand..
re: author license
To take full advantage of the NXOpen API, you will need to buy an "author license" from Siemens. Along with the author license, you will get a unique "signature" value that you use to "sign" your code. You cannot run code that has been compiled to a dll file if it does not have a valid signature value or you do not have an author license.
Below is a link to a thread with some more information about the author license.
http://nxjournaling.com/content/nx-open-author
Hi NXJournaling!
Hi NXJournaling!
I tried two ways:
1. Calling compiled DLL from compiled DLL.
2. Calling compiled DLL from the uncompiled journal.
I have an author license, but i did not sign my DLL's. I can compile and run unsigned DLL through Ctrl+U, and they work fine. The only problem with the call. As far as I understood, the signing is needed to run the dll without the author's license, so in my case it can not cause my mistake "not found entry point".
That's one of the reasons why I need to run a second dll from MainDLL:
As for the management of NX GUI option "http://www.nxjournaling.com/content/point-face-attachment-activate"
I must to use a macro, but using undocumented features "MACRO_playback_from_usertool Lib "libugui" can run only one macro, and only at the end of the application, I had an idea to use the next scheme:
MainDLL when is necessary is calling DLL1 which play Macro1, DLL2 which play Macro2, etc.
I also tried this:
Session.Execute ( _libName As String, _ClassName As String, _methodName As String, _inputArgs As Object() _) As Object
but i dont understand, what i must specify in "_inputArgs As Object()", what kind of objects are needed for procedure like
workPart.ModelingViews.WorkView.Fit()?
P.S. I use "Fit" as simple example for my tests