I am new about using snap and using the NX journal editor and try to learn from the beginning,
I find a code which is very simple and which is in directory of [...NX 9.0]\UGOPEN\SNAP\Examples ,
The code is like this;
"Option Explicit Off
Imports Snap, Snap.Create
but after click the "Play" icon
i get the error message which's name is "Journal Compile Errors" and in the message "Line 7:'Infowindow' is not declared. It may be inaccessible due to its protection level." is written...
after search this error message in the internet , i find some topics about this error message ;
*Missing references (Select the references [...NX] \ UGII \ managed )
But i can't fix the problem , i can't find snap references etc.
Can anyone help me about this issue and give me some info about this error message; why it is happened and how i can fix it , what i need to do or arrange in the NX, to fix this error message.
My guess is that you don't have a SNAP Author license. If I run the journal, I see the following in my syslog (note the 3rd last line: "Snap Author license found, adding reference to Snap.dll"):
&MACRO ASK_ITEM 1 (1 STRN 5707) = "D:\apps\Siemens\NX\9.0\UGOPEN\SNAP\Examples\GS Guide\Chapter 2\02_1_HelloWorld.vb" ! &MACRO FOCUS CHANGE IN 1 Using D:\apps\Siemens\NX\9.0\ugii\managed\ManagedLoader.
dll to load managed DLL Trying to load D:\apps\Siemens\NX\9.0\ugii\managed\ManagedLoader. dll ManagedLoader.Load: D:\apps\Siemens\NX\9.0\ugii\managed\NXOpen.Utiliti es.dll Name:ctx://Journal5d1dc5f6 There are no context policies. AppBase: D:\apps\Siemens\NX\9.0\ugii\managed\ Loaded assembly: NXOpen.Utilities, Version=188.8.131.52, Culture=neutral, PublicKeyToken=null from C:\Users\tsbernar\AppData\Local\assembly\dl3\L8C0K P80.RTV\2XBTMPXP.7AX\3746afa4\00255d24_68dfce01\NX Open.Utilities.dll Loaded assembly: System.Windows.Forms, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b77a5c561934e089 from C:\windows\Microsoft.Net\assembly\GAC_MSIL\System. Windows.Forms\v4.0_220.127.116.11__b77a5c561934e089\Syste m.Windows.Forms.dll Loaded assembly: System.Drawing, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a from C:\windows\Microsoft.Net\assembly\GAC_MSIL\System. Drawing\v4.0_22.214.171.124__b03f5f7f11d50a3a\System.Draw ing.dll Adding D:\apps\Siemens\NX\9.0\ugii\managed\\NXOpen.Utilit ies.dll as a reference item Adding D:\apps\Siemens\NX\9.0\ugii\managed\\NXOpen.dll as a reference item Adding D:\apps\Siemens\NX\9.0\ugii\managed\\NXOpen.UF.dll as a reference item Adding D:\apps\Siemens\NX\9.0\ugii\managed\\MiniSnap.dll as a reference item Evaluating whether to add Snap library: Snap Author license found, adding reference to Snap.dll Adding D:\apps\Siemens\NX\9.0\ugii\managed\\Snap.dll as a reference item Adding D:\apps\Siemens\NX\9.0\ugii\managed\\NXOpenUI.dll as a reference item
This exact scenario is covered in the SNAP Getting Started guide - for NX10, it is on page 114.
This is an excellent tutorial, and we suggest reading through it if you are getting started with SNAP, or even if you are getting started with NXOpen - there is a wealth of foundational material that will help you with either.
You can try using MiniSnap.dll instead of Snap.dll. It allows limited access to some basic SNAP functionality when you don't have a SNAP license.
Yes, as Steve said, work through the tutorials in the first few chapters of the "Getting Started with SNAP" guide. It's written for people exactly like you
In particular, it tells you how to use "MiniSnap", in case you don't have a SNAP license.
Also, it has a "Troubleshooting" chapter which tells you the possible causes of various errors (including the one you ran into). And, if you just follow the tutorial, you probably won't run into any errors, anyway.
First of all, thanks everyone who answer my question because of their interset and advice....
I find the tutorial which you mentioned and do it step by step...
Still can't start the code , i think i don't have author license...
After run the code (i write the code visual study 2012), i get this error message fom nx, below error message isn't mentioned in the tutorial so before decide to that "i have no author license for nx_snap", i want to be a sure....
I also to check that if the problem is missing references or broken references, these two issue seems "OK"
So after this, Can i say that , i have no license for doing this??? So i need to use "MiniSnap", i want to be sure before decide....
Take the first "Hello World" example from chapter 2 of the tutorial.
Change the second line of code from "Imports Snap, Snap.Create" to "Imports MiniSnap, MiniSnap.Create".
Run this code in the Journal Editor. If it works, then your problem is that you don't have a Snap Author license.
As you dont have SNAP autorised licence the error is showing.
In the second line you should be replacing Snap with Minisnap.
Then try running code
for your refrence do as below.