NX Open Visual Basic(VB)wizard
Creating a Visual Basic project using the NX Open VB wizard
The following topic describes how to develop an NX Open Visual Basic application using Microsoft Visual Studio.It is recommended that all NX Open Visual Basic program development on Windows be done from a Visual Basic project
Starting Visual Studio
You can start Visual Studio by "from an NX command prompt window. Studio will pick up the required NX environment variables necessary to compile and link a project.
Creating a Visual Basic project
Use the Visual Basic wizard whenever you need to create a new NX Open automation program in Visual Studio with the Visual Basic language.The wizard automatically adds the required references to NX Open libraries in the new project.
Using the NX Open VB wizard
To use the NX Open VB wizard:
Step1.Select the File→New→Project menu item to activate the New dialog box.
Step2.Under Project Types,expand Other languages and select Visual Basic.
Step3.Select NX#_VB from the list of Templates(where#is the NX version).
Step4.Enter a project name into the"Project name:"dynamic input box.By default this becomes the name portion of the program being built.For instance,a project
named"MyNXOpenApp"produces either a"MyNXOpenApp.dll"or
"".You can override this later,if necessary.
Step5.Click OK and follow the on-screen instructions to create your Visual Basic project. NX Open C#wizard
Creating a C#project using the NX Open C#wizard
The following topic describes how to develop an NX Open C#application using Microsoft Visual Studi
o.It is recommended that all NX Open C#program development on Windows be done from a Visual C#project
Starting Visual Studio
You can start Visual Studio by from the NX Command Prompt window. Visual Studio uses the required NX environment variables to compile and link a project.
Creating a Visual C#project
Use the C#wizard whenever you need to create a new NX Open automation program in Visual Studio with the C#language.The wizard automatically adds the required references to NX Open libraries in the new project.
Using the NX Open C#wizard
To use the NX Open C#wizard:
Step1.Choose File→New→Project menu item to activate the New dialog box.
Step2.Under Project Types,expand Other languages and select Visual C#.
Step3.From the Templates list.Select NX#_VCS(where#is the NX version).
Step4.In Project Name,enter a project name.
By default this becomes the name portion of the program being built.For example,
a project named MyNXOpenApp produces either a MyNXOpenApp.dll or
Step5.Click OK and follow the on-screen instructions to create your C#project.
Visual Studio Application Wizard Setup
Microsoft Visual Studio can be used to compile,link and debug programs on the Windows platform.There are currently three NX Wizards that have been integrated into Visual Studio and available for use with the Common API.They are:
visual basic pdfNX Open Wizard for use with C and C++programs(found under the VC directory)
NX Open VB Wizard for Visual Basic programs(found under the VB directory)
NX Open C#Wizard for C#programs(found under the VC#directory)
If Visual Studio has been installed on a workstation and then NX is installed locally(on the same workstation),the available NX Wizards will be installed automatically.Otherwise the following steps need to be taken to set up each of the NX Wizards on the local workstation.
Make sure the appropriate version Microsoft Visual Studio has been installed
Copy all files from the NX kit to the corresponding directories of the local Visual Studio installation.The kit is located in:
%UGII_BASE_DIR%\ugopen\vs_files\
To determine the correct location of the Visual Studio installation,look at the productdir registry key for each language.The key for C and C++is
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\version#\Setup\VC/productdir (where version#would be7.1,8.0,etc).For other languages replace the VC with either VB or VC#.
For each wizard,copy any files and/or folders under each subdirectory from the kit to the Visual Studi
o installation.This example is for the C language so substitute VB or VC# and the appropriate subdirectory for the other languages.Copy:
%UGII_BASE_DIR%\UGOPEN\vs_files\VC\VCWizards\
to
C:/program Files\Microsoft Visual Studio8\VC\VCWizards\ and
%UGII_BASE_DIR%\UGOPEN\vs_files\VC\vcprojects\
to
C:/program Files\Microsoft Visual Studio8\VC\vcprojects\ Repeat for each language.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。