Showing results for 
Search instead for 
Do you mean 
Reply

NX Remoting Language Conflict

I am currently trying to make due with what is available to me currently. I am trying to set up NX remoting, and currently I have Visual Studios for C++. I know there is a remoting example in the installation directory that is written in C++.

 

Could I compile that into a .dll? Would that particular file work?

 

As for the client application, it is currently written in VBA.NET. I am wondering if the client calls the server, will there be any conflicts after they are compiled because they are both written in different languages?

7 REPLIES

Re: NX Remoting Language Conflict

 

I don't think that should cause you any trouble, as long as you are able to connect successfully.

 

We have example code for both the client and the server programs that is distributed with NX.

 

Look in

 

...\UGOPEN\SampleNXOpenApplications\.NET\RemotingExample

 

Those are C#.

 

We also have examples provided by GTAC on the Solution Center, if you would like to have both the client and the server in NXOpen VB.Net.

 

 

Re: NX Remoting Language Conflict

[ Edited ]

Okay, awesome thanks. By the way, how can I check if I have a .Net Authors License?

I did find a C++ example in the NXOpen file called RemoteUtilities. I think I am going to try and use that one. However, do you know how to compile it? I have never compiled a .dll before. I am using Visual Studios 2010 Express. When creating a project, what type of application should I choose?

Re: NX Remoting Language Conflict

 

Look in your license file for the string "dotnet_author".

 

Or build any simple NXOpen.Net program that calls GetSession() as a .DLL and try to run it from within NX using File -> Execute -> NXOpen.  If you don't have the license, it should choke when it hits GetSession().

 

 

Re: NX Remoting Language Conflict

Okay so I am working on compiling this .dll using code I found in the UGOPEN/NXOpen directory. It is labeled RemoteUtilities. However there are some errors that are preventing it from working.

 

I don't know C++ extensively at all, but at the top of the module these files are referenced.

 

 

#include <NXOpen/NXDeprecation.hxx>

#include <vector>

#include <NXOpen/NXString.hxx>

#include <NXOpen/Callback.hxx>

#include <NXOpen/TaggedObject.hxx>

#include <NXOpen/libnxopencpp_exports.hxx>

 

My guess is that I am supposed to fill in the missing directory so that the compiler can find these other files. I did that, and it turns out that the files referenced are not even included in NXOpen file. Or even the UGOPEN directory. Only one of them is, libnxopencpp_exports.hxx.

 

In the output window these are the only errors that are occuring when I try and compile the code. So if I can resolve this I think it will work.

 

Any ideas?

Re: NX Remoting Language Conflict

 

I am not sure I understand what you are trying to do.  The only RemoteUtilities file I can find in ugopen\NXOpen is RemoteUtilities.hxx.

 

That is a header file, so there is no code in it that you can run.  It is preprocessor directives and function prototypes.

 

Do you have an C++ code - a file with an extension of .cpp or .cxx ?

 

I am using NX9.0.3, and I do see all of the headers that you mentioned in NXOpen:

09/18/2013  06:37 AM             4,712 NXString.hxx

09/18/2013  06:35 AM            92,619 Callback.hxx

09/18/2013  06:37 AM             1,675 TaggedObject.hxx

09/18/2013  06:36 AM               624 NXDeprecation.hxx

 

 

Re: NX Remoting Language Conflict

Okay well I guess I don't know what I am doing then. I read in another post that a C++ remoting example was in that directory. So I thought that was it.

 

All that is in that directory are header files. I do not have any C++ code or files with a .cpp or .cxx extension.

 

Strangely enough I am using NX 10, and I do not find those header files in there. However I guess for what I am trying to do it does not matter.

 

I know there are other remoting examples, however I only have an IDE and compiler for C++, which I do not know very well. Besides getting another IDE are there other options to remoting with C++. I know that VC++ can take advantage of the .NET framework, which from what I read in the documentation, is what NX remoting relies on anyway.

 

Or should I just get another IDE for VB.NET?

Re: NX Remoting Language Conflict

 

We have remoting examples for .Net and for Java, but we do not have any for C++.  I do not know whether it is possible to do remoting from C++.

 

So if you have the dotnet_author license, you might want to consider getting the 2012 version of the Visual Studio - or at least Microsoft VB - for use with NX10.