Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

NX Open with Visual Studio 2017 Professional

Creator
Creator

Hello,

I am using Siemens NX 12.0.2.9 and now I want to implement some stuff with NX open in MS Visual Studio 2017 Professional. As you can see in the screenshot, I already copied the vs-folders into my VS-directory (to have these NX12 Open templates available). I think this step is done.

NXOPEN-Template.pngTemplate in Visual Studio

But when I want to create a new project I get this error:

Error.pngError

I cannot find and helpful information in the world wide web, so I signed in to ask one simple question:

 

Does Siemens NX 12 / NX Open support MS Visual Studio 2017 professional?

 

I read another thread where somebody called "JimB" wrote that's just not working. The solution is: Take 2015.

https://community.plm.automation.siemens.com/t5/NX-Programming-Customization-Forum/How-to-configure-...

 

The message was marked as "the solution".

Since I am working with the latest development-tools cannot accept this "solution".


So, before I dig deeper into this I want to have this question answered.

Thanks in advance.

 

reagards,

DerSimulant

 

13 REPLIES 13

Re: NX Open with Visual Studio 2017 Professional

Siemens Phenom Siemens Phenom
Siemens Phenom

The official answer to your question is No. Siemens does not support VS 2017 with NX 12 (only VS 2015 is supported):

 

Compilers and environments to use for NX Open programs

 

Unofficially, you *should* be able to copy the wizard files into the installation of a later version of VS. As mentioned in the previous post that you referenced, when you do this, you need to edit the .vsz file (i.e. ...\VC#\CSharpProjects\NX12_VCS.vsz) and edit the VsWizardEngine version.

 

For example, ...\VC#\CSharpProjects\NX12_VCS.vsz is shipped with the following second line:

 

Wizard=VsWizard.VsWizardEngine.14.0

 

This aligns with Visual Studio 2015. To use with VS 2017, you probably need to edit the copy of this file that you placed into your Visual Studio 2017 installation and change the line to:

 
Wizard=VsWizard.VsWizardEngine.15.0

 

 

Re: NX Open with Visual Studio 2017 Professional

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

C/C++ code is pretty picky about the compiler version. I believe that .net code is more dependent on the .net framework installed rather than the particular IDE version. The supported versions can be found in the product notes for each version of NX:

https://docs.plm.automation.siemens.com/tdoc/nx/12/release_notes/#uid:index_xid920453:xid920496:xid3...

 

Based on your screenshot, it looks like you are using C#. As long as VS 2017 doesn't require/install a .net framework newer than 4.6, it should work ok for you. But you might want to stick with the 2015 version just to be safe.

Re: NX Open with Visual Studio 2017 Professional

Creator
Creator

Hello JimB,

 

thanks for your support!

 

(1) My vsz-file

00_vsz-file.png

 

(2) Edit

02_Edit_vsz-file.png

 

(3) PLAY  Smiley Happy

03_VS.png

 

Please mark this now as solved   Smiley Happy

Re: NX Open with Visual Studio 2017 Professional

Creator
Creator

Hello Mr. cowski1,

 

yes I'd like to create a C# - program. My first try is a .dll - file.

 

(1) I created a new OpenNX-Project via VisualStudio, built the whole thing and sucessfully got a .dll file:

05_Build.png


(2) Then I try to start this app via NX (file->execute->NXOpen):04_NX_error-in-main.png

 

Since this is not really helpful at all I took the time to analyse the sys-log file:

 

NXOpen.Utilities.MissingResourceException: Assembly has not been compiled with an NX resource bundle

Caught exception while running: Main
NXOpen.Utilities.NeedDOTNETAuthorLicenseException: Invalid NX signature found
   bei NXOpen.Utilities.BaseSession.InitLicense()
   bei NXOpen.Utilities.BaseSession.StaticInitialize()
   bei NXOpen.Session.GetSession()

 

Does maybe somebody know whats wrong?

 

regards

DerSimulant

Re: NX Open with Visual Studio 2017 Professional

Legend
Legend

You need an authoring license to run a compiled (but unsigned) NX Open program.

Regards,

 

Jan

Jan Böttcher

Re: NX Open with Visual Studio 2017 Professional

Creator
Creator
Hello Jan,
Thank you for your reply. Since I should be only a "normal Siemens NX + MCD - user" I think I don't have this authoring license. I have to ask our distribution office. I could'nt locate the licence file yet to check.
But I guess if we have to spend additional money (for this authoring license) then the whole project is dead.
I just wanted to play around to try out some things (but without the knowledge that there will be additional costs).
So I will mark this as solved and say goodbye to this "topic".

Re: NX Open with Visual Studio 2017 Professional

Legend
Legend

Yes, the authoring license is somewhat costly.

 

But many tasks you can achieve without it. NX can run a (uncompiled) c# source file as a so called  journal. There are some restrictions for journals with respect to the .net resources that can be used. But that is no serious problem for most of the tasks.

 

You can use VisualStudio and the wizzards to comfortably create your journals (intellisense etc). Since c# supports multiple classes in a single file you can even create complex solutions.

 

An other option may be Python that requires no compilation at all.

 

The real showstopper may be that you need another licence to create more complex NX style dialogs (don't know what solutions you want to develop).

 

Regards

Jan

Jan Böttcher

Re: NX Open with Visual Studio 2017 Professional

Creator
Creator

Hello, thank you very much for these helpful tipps.

I wanted to play around with NX and ABB Robotstudio.

My topic is virtual comissioning and I use therefore NX and MCD. I want to have severals PLCs simulated, HiL and SiL.

I import existing 3D-Models from Catia into NX and use MCD to simulate them. The connection of PLCs to NX is another big topic we are working on...

But now I focus on my robot. I have written a short C# Program where I can connect to a ABB Robot to set it's IOs. I used the PC SDK. I am not really interested in nice2see GUIs, but with partial classes I think I can to want I want to do.

Good hint, thx.

I know Python because I did my master thesis (NAO-Robot) with Python, but I feel much better with C#.

If my little projekt is a success, be sure I am going to ask my Siemens representative about the "authoring license".

 

One question: Not sure If you are familiar with C#, but do you think it's possible to use the PC SDK also in a journal or in other words: use my C# program in a journal?

 

regards

TheSim

 

 

 

 

 

Re: NX Open with Visual Studio 2017 Professional

Legend
Legend

 

One question: Not sure If you are familiar with C#, but do you think it's possible to use the PC SDK also in a journal or in other words: use my C# program in a journal?

 

regards

TheSim

 


Because you can't control the compilation/linking process of your c# journal you can't add your own resources/assemblies to the solution directly. So you have to use other means to load your PC SDK program or dll at runtime and interact with it. But c#/.net comes with everything you need for that.

 

 

Regards,

Jan

Jan Böttcher