Autodesk's latest. NET Tutorial (2) (VB. NET)

Source: Internet
Author: User
 
Chapter 2. NET AutoCAD wizard and simple user input
In the first chapter, we use the class library template, so we have to manually add the acdbmdg. dll and acmgd. dll references. In this chapter, we will use the AutoCAD-hosted C # application wizard to create a. NET project, which will automatically add the above two references. Before starting this chapter, you must first install the ObjectARX Wizard (utilsObjARXWizArxWizards. msi in the ObjectARX2006 development kit ).
 
 
 
1) start Visual Studio. NET and select "File> New> Project" (File> New> Project ). In the Create Project dialog box, select Visual Basic Project as the Project type, and then select the "AutoCAD Managed VB Project Application" template. Enter "Lab2" in the project name box and select the project storage location. Click OK. The "AutoCAD Managed VB Application Wizard" dialog box appears. Because we do not need to use Unmanaged code, do not select the "Enable Unmanaged Debugging" item. "Registered Developer Symbol" will use the value you entered when installing the ObjectARX wizard. Click finish to create a project.
2) Let's take a look at the project generated by the wizard. In the solution browser, you will see that acdbmgd and acmgd have been referenced. In the Class. vb file, the "Autodesk. AutoCAD. Runtime" namespace has been imported, and the project uses the name of "Registered Developer Symbol" to name the default public Class. The Wizard also adds a CommandMethod attribute and a function for the class, which is used for AutoCAD commands.
3) in the previous chapter, we use an instance object of the "Autodesk. AutoCAD. EditorInput. Editor" class to output text on the AutoCAD command line. In this chapter, we will use this class to prompt you to select a vertex in the AutoCAD graph, and then display the x, y, and z values of the selected vertex. As in the previous chapter, import the Autodesk. AutoCAD. ApplicationServices and Autodesk. AutoCAD. EditorInput namespaces.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.