Brief introduction of technology of AutoCAD 2000 custom-built development reachs the application in project cartography

  • Time:
  • Click:115
  • source:TRIANA CNC Machining
Summary: Content of tool of the necessity of custom-built development of article introduction AutoCAD 2000, development, custom-built development and method, make AutoCAD user can custom-built the AutoCAD system that develops oneself, make a system more efficient thereby, its are in illustrate the application in project cartography. Keyword: AutoCAD 2000 custom-built development applies foreword to be in project CAD domain, all sorts of business emerge in endlessly with CAD system, the I of the Euclid system of company of the I/EMS system of company of the PE system of company of the Unigraphics system of company of the Catia system of the AutoCAD system that is like Autodesk company, CADDS system of Computervision company, Dassault company, EDS, HP, Intergraph, Matra Datavision, PRO/Engineer system of PTC company and SDRC company. The AutoCAD that develops by Autodesk company from 20 centuries outshine the rest all the time since 80 time. Make the CAD system of first selection of each engineering field, it is the system of the most popular PC AD on the market. The 2 million person that the whole world has 80 states is using the figure with AutoCAD various scale. 1998 AutoCAD in the market have rate amount to 79% , become in fact worldwide the computer drawing standard inside. The huge success of AutoCAD, above all profit from its open sex, make tripartite very easy develop all sorts of applicable special software, bring to the user standard, cheap, convenient, efficient wait for benefit, thereby farther occupational the market. The user carries the custom-built development of pair of AutoCAD systems, can combine oneself professional characteristic, what development belongs to him is special model CAD system. Current, the project cartography software that home develops uses AutoCAD to regard its as the software platform that prop up mostly, undertake 2 times develop and be becominged, for the project design and n/arc drafting industry created enormous economic benefits and social benefit. The necessity AutoCAD of 1 custom-built development is at present Windows95/98/nt/2000 environment issues application the CAD software with the most extensive, use maximum number. But what AutoCAD place offers is general general CAD function only, wait like modelling, editor, annotate. If do not use AutoCAD to develop a system, want to complete the design with specific and marked some, can appear relatively complex. For example, we should design engine of a piston, be versed in according to engine power on the offensive with respect to need computation gives piston diameter, call the plot command of AutoCAD again next, draw of brushstroke brushstroke ground gives the figure of engine. Such, after once be in,the design is finished, want to change the power of engine, need to repeat a moment ago entire content. If use AutoCAD to develop a system, criterion we can mix afore-mentioned computation plot adopts the program with advanced language corresponding work out, when need is designed, a command can run this program, computation and plot process are finished automatically. Clearly, this rose to design efficiency greatly not only, and through developing a system OK and custom-built piece certain specialization module, software of plot of large even design. Construction industry day of home the system of CAD system, big constant CAD of mechanical industry, all be right AutoCAD development is custom-built and of implementation. The custom-built development tool of the system of AutoCAD of commonly used tool of 2 custom-built development, call AutoCAD to develop a tool again. Call application of AutoCAD API (Application Programming Interface process designing interface sometimes) , it is the basic measure that turns AutoCAD environment client. In AutoCAD2000, the development tool that we use basically has: ObjectARX, AutoLISP, VisualLISP, Java, VisualBASIC and Delphi. 2.

1AutoLISP and VisualLISP AutoLISP are the explanation with the earliest AutoCAD API, it is not object-oriented language, basically use finish repeatability job automatically, undertake the client is changed development and menu of work out AutoCAD and increase an order for AutoCAD through simple mechanism. It is an independent course on logic, pass IPC (the communication between the process) as alternant as AutoCAD. AutoLISP study rises very simple, but develop large application program very hard with it, and formation program traversal speed is compared and character is the slowest. In AutoCAD R14, autodesk company offerred IsualLISP of a kind of new of tool of LISP process designing first, it is the development environment of object of elephant of a kind of face, be AutoLISP expand and outspread. In AutoCAD 2000, visualLISP got be strengtheninged further. Compile as a kind model API, completely as compatible as AutoLISP, provide all AutoLISP functions, user interface of the environment of much documentation design that at the same time it can visit AutoCAD2000, COM/ActiveX and incident responsor. 2.

2VisualBASIC, Delphi, Java AutoCAD rises from R14, the form that uses ActiveX Automation abounded the API of oneself, it spreads out monarch for the farther hair of AutoCAD new approach. The ActiveX Automation technology of Microsoft is API and a group of standards, the software that provides ActiveX Automation service can open its specific function through standard user interface. The process designing port that the ActiveX Automation in AutoCAD 2000 offers, can use at the applied process below Windows environment to operate the object in AutoCAD. Basically operate a function to have: User input clew, use first target, processing to choose collect, output graph, increase view, increase professional object to wait. The user can use ActiveX client programming language (wait like VisualBASIC, Delphi, Java) come custom-built AutoCAD. 2.

3ADS, ARX, ADSRX and ObjectARXADS(AutoCAD Development System) are Autodesk company the environment of C language process designing that provides the earliest in AutoCAD R11. Besides the C function that can use a level, increased again special the function at undertaking operating to AutoCAD, formation executable file (EXE file) , after loading AutoCAD, can move. But, ADS and AutoLISP are same, internal composition is not object-oriented, to load of use AutoLISP interpreter and call, also be to carry IPC and AutoCAD news report. ARX (AutoCAD Runtime Extention) it is environment of a kind of when rise in the development on ADS foundation object-oriented C language process designing. By ADS the changes to ARX as the C change to C++ . ARX application process links a library for trends (DLL) , share AutoCAD address space, undertake be callinged directly to AutoCAD, the systematic expense that avoided IPC and the function that cause from this drop. It is offerred the earliest in AutoCAD R13, but in AutoCAD R14, ARX is very fast be replaced by place of ObjectARX of of environment of process designing of the 2nd acting object-oriented C++ , function of original ADS whole library is included to be in ObjectARX. Add up of function of ADS whole library is onefold library, formed ADSRX. In AutoCAD 2000, on traditional sense " ADS develops an environment " concept not answer existence, and a subclass that ADSRX regards ObjectARX as. ObjectARX is the integrated C/C++ development environment that included ADS, ARX and ADSRX. It introduced object-oriented process designing mechanism, in the ObjectARX 3 with AutoCAD 2000 form a complete set.

0 in, offer many kind of library, and the new function that provided function of compatible and original ADS, ADSRX. ObjectARX 3.

0 became AutoCAD 2000 the efficient development tool of custom-built development. 2.

A few kinds of 4 comparison that develop a tool are in the development tool of above, the API that uses IPC news report with the API comparing of AutoCAD communication directly wants on speed fast. Accordingly, the rate of ObjectARX is the rapiddest, autoLISP rate is the slowest. But go up in order stability, once the applied program that uses AutoLISP development fails, do not harm AutoCAD oneself process. And the AutoCAD address space that shares as a result of ObjectARX application process, once fail, autoCAD process also breaks down subsequently. ObjectARX application process expands in real time during move AutoCAD, share AutoCAD address space, function is extremely powerful, do as one wants even, so that a lot of module of AutoCAD oneself all are,make with ObjectARX. On technical difficulty, autoLISP and VisualBASIC all are explanation language, go to the lavatory to learn easily, development cycle is short. A lot of programmer are using them. Under photograph comparing, objectARX relies on C++ language, it must be compiled through strict pilot, link ability generating program, development staff must have talent of enough process designing experience to handle all sorts of issues in development. But, in development speed and function ask very tall application order is large perhaps CAD application software, should use ObjectARX. The content of custom-built development of the main content of 3 custom-built development and methodological AutoCAD2000 is very much, but the mainest is: Script file (SCR file) file of custom-built, menu AutoCAD jussive is custom-built, custom-built. 3.

1 script file (SCR file) custom-built AutoCAD offerred to call Script File (script file) tool, it allows different AutoCAD macro to rise, carry out according to the order of predefine. These commands can use editors of any a kind of character (wait like Notepade, notebook) write text document, its expand the name is.

SCR (be like PLOT1.

SCR) . Script file is carried out with the SCR command in AutoCAD. When the user is undertaking developing to AutoCAD, can use a kind of any advanced languages (be like: VC, VB, Delphi, Java) design user is alternant interface, undertake computational generating to what plot needs parameter, decide alignment of option of AutoCAD command, order, command to wait next, generate patulous name to be the AutoCAD script file of SCR finally. In AutoCAD with SCR the command carries out script file, the place that finish needs to operate. Script file has all functions of AutoCAD, include graphical first try to change, editor, revise, plot, output. But script file has a few restriction, it cannot use dialog box and bill of fare, should give out from inside script file open file, file to save file to disk, print when waiting for a command, autoCAD executive command commands a meaning mediumly all right and do not open a dialog box, cannot provide an user alternant function. Use script document custom-built AutoCAD, need (need only) be familiar with alignment of option of commonly used command of an advanced programming language and AutoCAD, order and command can. This method, not tall to requirement of process designing technology, simple and practical. It once regarded the most primitive custom-built development as the method, withhold all the time up to now. Carry out a proof, it can obtain very good satisfactory result. Current, still have a lot of application software still using this technology. The part that uses the file of a script that VC makes is below, can see CAD commands the use rule of alignment from which. ... ... ... LIMITS 0, 0 3775.

8, 3110ZOOM AUNITS 2 0 1 0 0 YBLIPMODE OFFLAYER N 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 UNITS 2 0 1 0 0 YSTYLE HZ Complex, HZDX 0 1 0 N N NTRACE 6 250, 50 3425.

8, 503425.

8, 2760 250, 2760 250, 50TEXT 300, LINE1637 of atelier of software of earth of cliff of Rongjun of 70 40 0.

9, 2450 @400, 0TEXT 390, : of name of project of 2500 40 0? ?3 of  of    .

2ACAD.

Custom-built AutoCAD software contains PGP document ACAD of program parameter file.

PGP, this file cent is 3 parts: Alias of annotate, exterior command, command. The annotate in the file can include any numerary annotate travel, and can appear in the file anyplace. Each annotate is used all right (; ) begin. When any sentences that use semicolon front are being carried out by oversight. ACAD.

PGP allows an user to use an operating system to command directly from inside graphical editor. For example: Want to delete a file, need to input DEL (COMMAND all right in the command only: DEL) , need the file name that delete according to clew input next. ACAD.

PGP defined alias of jussive of a few AutoCAD. For example, LINE jussive alias is L. If input L (COMMAND all right in the command: L) , autoCAD will regard it as LINE command. User him basis uses need, custom-built ACAD.

PGP file, command of augment operating system and AutoCAD command alias. 3.

3Custom-built AutoCAD software offerred ACAD menu document the powerful tool of a custom-built AutoCAD. AutoCAD software contains the name is ACDA.

The file of standard bill of fare of MNU. When the AutoCAD that start, ACDA.

MNU menu file lades automatically. AutoCAD order is included in menu file, the user can be revised, arrange these commonly used orders. It allows an user to delete not commonly used command, define new order, through editing ACDA.

MNU menu file perhaps writes new menu document to come true. Can write an alone menu document with using a program for each. The MENU of use AutoCAD commands, can carry these menu along with fashionable dress. The patulous name of menu file is MNU, can have an edition with any text editors. In menu file menu of OK and custom-built screen, next pulling the content such as menu, toolbar, quick menu, context menu, image menu. In user development process, can consult ACAD of file of standard bill of fare.

MNU writes document of his special bill of fare. 3.

4 custom-built AutoCAD command a basis the user is specific and professional the problem of the domain, use afore-mentioned development tools to pass process designing, custom-built module of oneself AutoCAD special function. 3.

4.

1Tool of development of AutoLISP, VisualLISP uses AutoLISP or the applied order that development of VisualLISP development tool gives, its expand the name is LSP. There can be in document of program of a LISP or many function definition. Should move among them a function, define the LISP program document of this function to must be laded. With below the command lades document of program of a LISP: Command: (Load " [Path]file Name " ) among them: Command... ... AutoCAD commands clew accord with. Load... ... ... transfer into document of program of a LISP. File Name... ... the method of LISP program document and file name. Lade after LISP program document, function name can be inputted below command travel condition, the place that finish requires specific operation. 3.

4.

2The applied program that ObjectARX develops a tool to use ObjectARX to develop a tool to be developed, its expand the name is ARX. One can be registered in document of an ObjectARX program or many AutoCAD command. Want to run among them AutoCAD command, define document of program of this jussive ObjectARX to must be laded. With below the command lades document of an ObjectARX program: Command: (Arxload " [Path]file Name " ) among them: Command... ... AutoCAD commands clew accord with. Arxload... ... ... transfer into document of an ObjectARX program. File Name... ... the method of ObjectARX program document and file name. Other tool of a few kinds of development is custom-built AutoCAD jussive method basically as similar as afore-mentioned methods, detailed content, can refer to concerned book, the article no longer give uncecessary details. 4, applied citing author adopts scale the example of profile of a simple barrel-drain, the introduction is in VisualC++6.

Below 0 environments, found be based on MFC (Microsoft Foundation Class) user interface, build the course of process of an ObjectARX application. This program registered an AutoCAD to command 4.

1ObjectARX software is obtained do not issue along with AutoCAD 2000 with installation ObjectARX software dish issue together, and will offer by the product supplier of Autodesk, the user can be in the network address of Autodesk to download freely (Http: / / Www.

Autodesk.

Com) . Download hind gets an ObjectARX.

Exe file, this file makes an appointment with 19MB, it is the compression that one each solution presses file. The ObjectARX that download gets is doubleclicked in Windows environment.

Exe file, the list that can automatic solution reduces this file to appoint to the user (default is C: ) . After solution is pressed, run the installation program Setup that it offers.

Exe, install it designation catalog (default is C: ObjectARX 2000) . After installation, objectARX 3.

0 occupy space of 52MB hard disk about. 4.

The Microsoft Visual C++6 of · of AutoCAD 2000 of · of Windows 9X/NT4/2000 of · of soft hardware environment of software of 2 moving ObjectARX.

0 or because taller version opens the applied order that issue to want to move below AutoCAD 2000 environment, because this runs place of ObjectARX application process to need hardware environment to be the same as AutoCAD 2000, lowermost configuration is: Fictitious memory of 60MB of · of space of freedom of hard disk of 150MB of · of memory of 32MB of · of · Pentium 90 CPU 4.

The 3 basic course · that establish ObjectARX application program install · of environment of Visual C++ work to edit applied process in Visual C++ according to the requirement of ObjectARX (include the file such as CPP, DEF, RC) · compiles a link to generate the DLL file · that is patulous name with ARX to enter AutoCAD 2000, lade the extract in source program giving out below the AutoCAD 2000 exterior command that ObjectARX application process runs in source program to define to memory · : ... ... / / This Is Command PSGvoid Zrjzrjpsg()// draws barrel-drain {// TODO: Implement The CommandCPsg Dlg;ads_point Pt, pt1, pt2, pt3, pt4, pt5, pt6;char S[40];if(dlg.

DoModal()==IDOK){AcedGetPoint(NULL, "Choose scale barrel-drain place: ", pt);pt1[X]=pt[X]+dlg.

M_fH*dlg.

M_iScale/dlg.

M_fScale;pt1[Y]=pt[Y];pt1[Z]=pt[Z]=0;pt2[X]=pt1[X]+(dlg.

M_fL1-dlg.

M_fL2)*dlg.

M_iScale/(2*dlg.

M_fScale);pt2[Y]=pt1[Y]-dlg.

M_fH*dlg.

M_iScale/dlg.

M_fScale;pt2[Z]=pt1[Z]=0;pt3[X]=pt2[X]+dlg.

M_fL2*dlg.

M_iScale/dlg.

M_fScale;pt3[Y]=pt2[Y];pt3[Z]=pt2[Z]=0;pt4[X]=pt1[X]+dlg.

M_fL1*dlg.

M_iScale/dlg.

M_fScale;pt4[Y]=pt1[Y];pt4[Z]=pt1[Z]=0;pt5[X]=pt4[X]+dlg.

M_fH*dlg.

M_iScale/dlg.

M_fScale;pt5[Y]=pt4[Y];pt5[Z]=pt4[Z]=0;pt6[X]=(pt2[X]+pt3[X])/2;pt6[Y]=pt2[Y]-20*dlg.

M_iScale;pt6[Z]=pt2[Z]=0;sprintf(s, "%2.

0f" , dlg.

M_fHeight);acedCommand(RTSTR, "LINE" , RTPOINT, pt, RTPOINT, pt1, RTPOINT, pt2, RTPOINT, pt3, RTPOINT, pt4, RTPOINT, pt5, RTSTR, "" , 0);acedCommand(RTSTR, "LINE" , RTPOINT, pt4, RTPOINT, pt5, RTSTR, "" , 0);acedCommand(RTSTR, "TEXT" , RTSTR, "J" , RTSTR, "C" , RTPOINT, pt6, RTSTR, s, RTSTR, "0" , RTSTR, dlg.

M_sText, 0); } Else Ads_printf(" cancels scale barrel-drain "); } ... ... compile a link to make the DLL file that is patulous name with ARX, enter AutoCAD 2000, lade ObjectARX uses a program to memory, the AutoCAD 2000 exterior command of the definition in moving in source program " Psg " , it is normal to move, the result is satisfactory. 5 conclusion from go up the necessity that can see AutoCAD 2000 custom-built development and advantage, the user is OK the circumstance according to oneself, choose suitable development tool, carry the custom-built development to AutoCAD, development gives the AutoCAD system that belongs to his, make a system more efficient thereby movement, develop bigger economic benefits. As the ceaseless development of computer technology, of technical personnel quality rise ceaselessly, technology of AutoCAD custom-built development will get in the application in project cartography faster better progress. CNC Milling