Fall in AutoCAD environment with the interconnection technology between the database

  • Time:
  • Click:100
The article elaborated the summary to be in system of hydraulic pressure CAD, 2 times in the light of AutoCAD R13 For Windows development environment falls, use its technology of in-house ASI interface undertakes programming, implementation and Visual Foxpro 3.

0 between the method that undertakes data is exchanged. Keyword: Data of interface of AutoCAD2 second development exchanges 1 foreword data to exchange the core technology that is CAD, can say to do not have the effective exchange of data, do not have the sufficient play of CAD advantage. When undertaking CAD software is developed 2 times below AutoCAD environment, how to realize the effective exchange of the data between each module, solve the interface problem between of all kinds and different software and the connection that how realize data of graphical substance and blame graph substance, it is the crucial problem that development CAD system solves 2. The article is emphasized discussed environment of AutoCAD R13 C4 For Windows to fall with Visual Foxpro 3.

0 between the programming of ASI (AutoCAD SQL Interface) that the data that have exchanges method, specific in the CAD software of hydraulic pressure system applying. The visit of the development of 2   AutoCAD and database resembles other popularity software is same, autodesk company provided the mechanism that contacts each other with exterior database in AutoCAD R13 interior. AutoCAD itself contains ASI(AutoCAD SQL Interface) , ASE(AutoCAD SQL Extension) and driver of DBMS(Database Manager System) a few parts. If the sketch map that undertakes data is exchanged between AutoCAD and database file pursues be shown. Data exchanges ASI of sketch map   to follow ANSI/ISOSQL standard between AutoCAD and database file, it is the function part that is used at visitting exterior database from inside AutoCAD. Use a program with what ASI builds, the development that all can carry AutoCAD uses a system; The ADS that C language develops, visual C++4.

The AutoLISP language join that the ARX of 0 development or its interior place take oneself arrives in AutoCAD system, the database that can support next is opposite to differ in different database driver at the same time undertakes those who occupy counting access exchange. ASE is volume of a group of orders, in can receiving SQL AtuoCAD system repeatedly. Pledge actually even if use the applied program of the ADS/ARX that ASI builds. Use ASE can is opposite in AutoCAD interior the record of the data file in exterior database and field undertake inquire and be modificationed waiting operating, can mix data correlation to graphical substance blame graph is hypostatic (parameter of the dimension in be like dumb graph is replaced and list) on, realize the two-way inquiry between graph and data, can come true to dog in the trends in the graph indication data. AutoCAD itself includes driver of a group of databases, among them each driver supports him place connective a kind of exterior DBMS. Use a program with what ADS/ARX or AutoLISP build among them, need not consider DBMS appropriative code to use a program, it is to use ASI process designing to still use ASE to command process designing, follow general SQL standard actually character. The development language that AutoCAD supports has Turbo C, visual Basic 5.

0, visual C/C++4. 0 have AutoLISP language with interior, among them C, VB creates the function of ADS through building, what VC generates is ARX function, with connection of AutoCAD information photograph. ASE regards AutoCAD as a group of internal orders, means of usable process designing is carried out. ASE visits the core of the database to have the capacity of directer visit database as AutoCAD, allow to apply a program to be opposite a variety of DBMS, the many databases inside DBMS, the much Zhangbiao inside the library undertakes data is visited. ASE and ASI but the basis needs alone or use at the same time. ASE method is showing it is casing of attribute, editor, list, easy to be based on the functional respect such as inquiry to appear implementation, but to complex applied process, be about to use ASI means process designing to realize a function. The use of method of 3   ASI 3.

The file of the ASI process designing of the supportive file of 1   ASI and support of place of AutoCAD R13 For Windows of development environment   is deposited in default in catalog of ASE of \ of WIN of \ ACAD \ . Have ASI target library (the file is suffixal for.

LIB) is like Asiatm80.

Lib;ASI head file (Asi.

The current definition that H contains ASI) , (Asierr.

H is included return make mistake the meaning that code is worth) , (Asiappl.

The head document that H contains main AutoCAD SQL structure to inquire a language) , (Asisdata.

H contains the user interface of C++ to define) . Use a program with what ASI weaves, practicable compiles implement have: Borland C/C++4. 0, Microsoft C/C++7. 0, Microsoft Visual C++4.

0 above version. 3.

The ● of 2   of implementation process measure that use ASI and database to handle interactively connect database: Pass Asi - Initsql, ads - Initdrv, asi - the DBMS driver that Connect assigns to ASI respectively undertakes initialization, log onto appoints database. ● opens a news report sentence handle: This can be passed call Asi - Compile function will come true. In ASI program, every SQL statement carries a news report sentence the handle will undertake handling. ● compiles SQL statement: Through calling Asi - Compile function will come true. ● carries out SQL statement: With Asi - Iexecute function carries out SQL statement. ● inquires and process data: Inquire a result line by line, choose current travel, undertake data processing. Needs function has: Asi - the current travel that Fetch obtains cursor to be in; Asi - Coldsc obtains specification; Asi - Delete deletes current travel; Asi - Update changes to go currently, wait for function. ● closes news report sentence handle: With Asi - a power that Chandle function shuts a statement to handle, release a handle. ● disconnects the join with the database: Call Asi - Disconnect function, disconnect entry database; Call Asi - Temdrv function, stop driver; Call Asi - Temrsql function, stop program interface. Afore-mentioned each process can use ASI make mistake code processing function undertakes wrong information processing, with Asi - Err obtains to make mistake code, with Asi - Errmsg function obtains to make mistake information. 4 example show to this exemple gives out by Visual Foxpro3.

Below 0 environments, the package of software of hydraulic pressure system that builds designs SXFLIB of medium file of sequence valve database.

DBF, its data structure expresses place to show as follows. X-F*10D3-P-*10 of sequence valve of Name   TypeDiameterPressureFluxScale.

020.

040.

00.

2X-F*10D3-AB/BA-*10 of 5 sequence valve.

020.

040.

01.

XA-F*10D3-B-*10 of 0 one-way sequence valve.

020.

040.

00.

XA-F*10D3-B(A)-*10 of 7 one-way sequence valve.

020.

040.

00.

5   weave ASI uses a program, what implementation needs a function: (Ins of 1) work out - Rowvalue command, in the record that implementation makes the data on AutoCAD graph and name one mark insert a database. (Get of 2) work out - Rowvalue command, implementation reads access to occupy from inside travel of database make choice of, show in the dialog box of software come, the scale picture that provides by data place gives a figure. (Fetch of 3) work out - Dallue command, implementation is read from inside the database take all records, show inside the list casing of the dialog box come, so that the user is called, in inserting a graph. Because AutoCAD can pass ASI/ASE, DBMS to visit a database, make a lot of design train of thought that use a project are widened greatly so, saved the architect's working hours, improved work efficiency, reduced devoted cost, be helpful for the implementation of compositive system. CNC Milling