2, Arx two times development create the first application

Source: Internet
Author: User

First, this lesson

Arx two times development create the first application

Second, the knowledge point that the SectionTo explains

1, manually create the application of ARX steps.

2. TheApplication Wizard steps to create a ARX application.

Three Specific Content

1, requirements: Create a hello World application, in autocad hello World ".

2, manually create a arx application: c++ development arx application, actually we arx application is a dynamic link library, its suffix is useless dll program, arx program in AUTOCAD Called when Loaded, with autocad Span style= The code of "Font-family: Song Body" itself is independent of each other.

Sets the compiler's parameters, including how the code is generated.

Set the parameters of the connector, including the name of the output file, add the link library file, and so on.

Create a new DLL file, referencing the ARX API 's header files and library files, and then setting compiler parameters and connector parameters. Change the suffix of the generated file to ". DLL"file. Create two functions in the code to initialize and unload the ARX program respectively. void Initapp (); void Unloadapp ();

See fee courses for details Free Audition part of C + + ARX development.

3. The wizard creates a ARX application:

(1)objectarx application: Called in AUTOCAD .

(2)objectdbx application: Called in all realdwg host programs (including AUTOCAD ), You can create such programs when customizing entity development.

(3)Console Program: A development approach to the emergence of a higher version of AUTOCAD . ( A new development method that appears after AUTOCAD2013), placing the AUTOCAD Console application on the server side (e.g., server-side auto-printing), The feature is that no interaction is required and the speed of operation is fast.

4, the wizard automatically help us generate some header files and source files. where acrxEntryPoint.cpp is The entry point of the ARX program.

(1) functions that are executed when the ARX module is loaded

Virtual Acrx::appretcode on_kinitappmsg (void *pkt) {

Acrx::appretcode retCode =acrxarxapp::on_kinitappmsg (PKT);

The code that usually needs to be added, where it can be put into the software lock detection code.

return (RetCode);


(2) functions performed when the ARX module is unloaded

Virtual Acrx::appretcode on_kunloadappmsg (void *pkt) {

Acrx::appretcode retCode =acrxarxapp::on_kunloadappmsg (PKT);

return (RetCode);


5, the wizard also created a template for the command, we can define the command we want to define according to the template: mycommand.

(1) first place modification

Aced_arxcommand_entry_auto (Carxproject2app, YUNYOUMYGROUP,COMMANDABC, COMMANDABC, ACRX_CMD_MODAL, NULL)

(2) Change of second place

static void Yunyoumygroupcommandabc () {


6, in the command to achieve a HelloWorld printing.

static void Yunyoumygroupcommandabc () {acutprintf (TEXT ("Hello world! "));}

Four Summary

1. To manually create the application of Arx, please refer to the audition section of the fee course.

2. The Application Wizard steps to create a ARX application.

3, How to Add command and command implementation function in Arx.

4. Create the first application Hello world.

2, Arx two times development create the first application

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.