AutoCAD development - use ObjectARX wizard to create an application (HelloWorld example)

AutoCAD2007+vs2005

First of all I go online to search download ARX development kit AutoCAD2007 in.

After extracting the following

After opening the following

FIG classmap folder frame .net C ++ classes and class, a DWG file.

Help file docs

inc referenced header files

lib reference library files

redistrib library files referenced by other

samples examples

utils other things

Open utils

The above are a few header and library files

ObjARXWiz this folder is the wizard (2012 version, there is no future, go to the official website to download separately, not together and Development Kit)

After opening the following

Simply double-click installation, directly next

Just enter the name here, next point

Here nothing is moving, directly next

Nothing to change the default path, directly next

Point next

Successful installation, close to switch off

The following open vs2005

Pop up a help, see a a toolbar, indicating that the wizard has successfully installed.

The following example started

Point New Project

Click OK, pop-up window

We direct point MFC that one, choose to use MFC, directly point to complete.

Double-click to enter the CPP

Click a toolbar button

pop-up dialogue box

Right click in the dialog box, new

Change the name to hello, and click OK

Entrusted to the bottom, you can see the new code

Here we are going to set up additional configuration files that relies on library

Click Project - Right - Properties

Point C / C ++ is provided comprising additional directory

Adding two header files

C / C ++ library that contains additional directory
C: \ ObjectARX 2007 \ utils \ BREP \ INC.
C: \ ObjectARX 2007 \ INC.

In the linker to set - Additional Library Directories

Linker - additional library directory
C: \ ObjectARX 2007 \ utils \ BREP \ lib
C: \ ObjectARX 2007 \ lib

Then click Apply - OK

The following compilation project a success.

Let's add a code AfxMessageBox (_T ( "123")); compile successfully

Click below to Debug - Start Debugging

Automatic pop-up interface CAD2007

我们输入ap,选择我们写好的ARX程序。点加载。然后关闭对话框

 

输入hello

弹出窗口

 到这里例子结束。

 

本人不会CAD二次开发,也是最近学习了各位大神的教程才学会一些简单的开发。

感谢开发者-小白鼠的CAD开发入门教程http://www.vmould.cn/ 和 QQ群:AutoCAD二次开发c#,arx,lsp193522571群文件的入门视频教程

 

Caesar卢尚宇

2019年8月10日

 

Guess you like

Origin www.cnblogs.com/nxopen2018/p/11332678.html