How to Build VB examples
-----------------------------
1. Open Microsoft Visual Studio .Net 2003.
2. Create new project as :
1. File->New->Project.
2. Select Visual Basic Projects, Console Application, Enter
name as VB_NXOpen_UF_Examples(you can specify name of your choice).
3. Click on Ok.
3. Remove the AssemblyInfo.vb file from the project. Highlight it in the Solution Explorer
and use the 3rd mouse button and pull to Delete it. You will receive a pop-up
that says it will be permanently removed. Hit OK.
4. Remove Module1.vb. Follow the same steps followed for removing AssemblyInfo.vb(step 3).
5. Add references of following files :
1. NXOpen.dll
2. NXOpenUI.dll
3. NXOpen.Utilities.dll
4. NXOpen.UF.dll.
To do this, right click on "References" under the project in Solution
Explorer. Pick Add Reference->Browse->Go to %UGII_ROOT_DIR%\out\managed,
select DLL ( since here there are multiple dll, press CTRL Key and then
start selecting DLLs).
6. In the Solution Explorer highlight the project name and use the 3rd mouse
button and drag to Add. Choose Add Existing Item. Navigate to and add any
of the *.vb file. (Please Note each vb file is a example, so add one at a time)
7. Go to Project Menu -> Properties. If you see "Module1" in "Startup Project" push down list,
select "uf_curve_CreateArc". Click on Ok.
8. Go to Build Menu -> Build Solution or Ctrl + Shift + B or go to Solution Explorer, right
click on project name and select Build.
How to Run VB Examples
---------------------------
Once you have successfully finished with "How to Build VB examples" steps, it will
create executable called VB_NXOpen_UF_Examples.exe in bin of the project dir.
How to Run VB example in the interactive mode
---------------------------------------------
Here you have to choices : ( follow any one of these)
1. Thru Tools Menu :
1. Start NX.
2. Go to Tools Menu -> Journal -> Play.
3. You will lead to window called "Journal Manager".
4. Navigate to the location of the Vb file using Browse Button.
5. Click on Run Button.
2. Thru File Menu :
1. Start NX.
2. Go to File Menu -> Execute ->NX Open.
3. You will lead to window called "Execute User Function".
4. Navigate to the location of the exe file. It will be in the <Project Folder>\bin
directory under the directory named for VB project.
5. Select .exe filename and Click ok. |