2003) 11-0225-03ATP311 1 The Lulu AutoCad software has been widely used and popularized in China. Most engineers and technicians in the domestic machinery industry are able to use this software skillfully to design and transform hundreds of drawings into Computer files make it easier for engineers and technicians to manage equipment and maintain drawings. However, how to manage these drawing files more rationally and efficiently, and share these drawing resources in the workshops of enterprises and factories and ensure that they are not illegally deleted and modified becomes an urgent problem to be solved.
Due to the widespread application of AutoCad software in China, software products based on AutoCad's secondary development, software products that use scanners to automatically identify engineering drawings as AutoCad's computer drawing files, and software products that convert AutoCad files and vector graphics files are also emerging. These AutoCad's by-products also need a stable, efficient and supportive web application drawing database to enhance the software's convenience and practicality. However, application software based on drawing database is still rare in the market. The development of such software is of great significance.
On the other hand, fierce competition after the accession to the WTO has forced people to upgrade and upgrade many traditional industries, and strengthening information construction is an important part of this. Therefore, the main body of equipment management of factories and mines should gradually be transformed from a person to a computer. The informationization of equipment management is also an important part of the project. The computer database management technology and network technology are applied to the data management of engineering drawings and equipment. As an advanced and scientific management tool, it provides a quick search method to ensure data quality and safety, and can directly perform necessary common data statistics and analysis. Ultimately improve the efficiency of engineering and technical personnel in factories and mines.
2 System Design and Implementation 2.1 System Configuration and Development Tools At present, the MIS is mainly used for internal corporate management. Therefore, the network system adopts EtherNet LAN and adopts TCP/IP protocol. The network server uses two HPNetServerLXPm/200 as the domain master and domain backup SQL Server. It is placed in the center of the company's computer room and is responsible for the unified management of all company equipment and drawing data, and can guarantee data security in the event of computer physical equipment damage. Workstations use HP Pentium, distributed in the workshop, warehouse and related departments, connected through a hub and server to form a bus-type LAN.
2000Server, workstation operation database management. Client application development uses PowerBuilder 7.0, an object-oriented development tool with powerful database capabilities. It is a powerful development tool for developing client/server database applications.
2.2 Client/Server network architecture data processing A machine can be another system client, or another machine's server, or both, this idea is the real client/server client/server concept Essentially, this means that a machine needs to collaborate with other systems. It provides services as well as other systems. Hardware client/service computer engineering and applicator organization means that a task is matched between two or more machines, wherein the client C1ient) is used to run the application program providing the user interface and front-end processing, and the server Server provides Various resources and services available to clients. In the database system of the client/server structure, data processing tasks are divided between clients/servers. There are two types of division schemes. One common scheme is the client's responsibility for application processing. The database server is responsible for data access and transaction management.
Compared with the file server, the database server has obvious advantages. It is to separate the data processing tasks on the client and the database server, which is conducive to making full use of the computing resources in the network. Separate operations also greatly reduce the amount of traffic on the network. Only the query request is sent from the client to the server. Returning the client from the database is only the result of the query, unlike the file server, which needs to transfer the entire file.
In a client/server environment, applications that issue database queries can reside on different machines than the database. A client can communicate with the database server through the network, wherever it is, and it can issue queries and retrieve results. . A typical client is a cheaper personal computer or compatible, and a server is a machine with a great deal of processing power and capacity. In view of the fact that many users prefer to use a more general personal computer or a compatible computer as a server, so too many tasks should not be allocated to the server when dealing with things, so as to prevent the entire network from degrading due to heavy server burden, and to give full play to it. The role of client computers, the rational distribution of network resources, and the improvement of data processing efficiency are principles that should be strictly observed when applying client/server architectures.
3 System Management Process and Module Division 3.1 System Management Process As shown in the figure, the engineering personnel first import the drawing information (*.dwg file), equipment information, and floor plan information into a bmp file) and import it into the input module of the drawing and equipment management. In the database, it is a prerequisite for browsing, querying and maintaining equipment and drawings. Under the premise of ensuring the accuracy of the data, the technicians of each workshop can call up the drawings or check the basic information of the equipment on the drawings, maintenance records, etc. according to their actual needs. And also maintain the information of equipment and drawings to keep it in line with the actual situation.
System management process. 2.1 Drawing Management Subsystem This subsystem mainly includes four sub-modules: drawing storage, drawing browsing, drawing inquiries, and drawing maintenance.
1) Drawings warehousing: Convert the drawing files into BLOB variables by program into large binary fields of the database. In addition to importing the drawings under a certain folder into the library, the module can also search through the recursive algorithm and find all the drawing files in subfolders and import them into the library.
2) Drawing browse: Under the interface of the drawing management system, all the equipments in each workshop and each workshop are listed hierarchically in a tree directory. The user selects different equipment in different workshops. All the drawings corresponding to a certain device will be listed in the list box on the right side of the main window. To select a different drawing, you can see its thumbnail. Double-click the selected drawing to see the big picture display. The size of the drawings can be arbitrarily set, the maximum can not exceed ten times the size of the original figure. Thumbnails and large images can still be displayed without AutoCad software installed. If necessary, double-click the thumbnail to edit the drawing with AutoCad2000 software.
S) Drawing Inquiry: Including fuzzy query and precise query. When using a fuzzy query, the user can input two character strings and perform a fuzzy query by forming a query character according to the relationship of 'or' or 'and'. Since the name of the equipment drawing file for a chemical company is usually 1â€*+space+'device or part'), the exact query is then divided into two types, namely the exact matching of the drawing file name and the matching of only the drawing file name. The name of the device's "salty parts", so that the user only knows the device or part name without knowing the tag number, and the user does not want to find too many drawings through the fuzzy query. In this case, only the matching device name is used. The search method is a good choice.
4) Drawing Maintenance: Including the revision of the drawing name and the revision of the drawing.
3.2.2 Equipment Management Subsystem This subsystem mainly includes two small modules for equipment basic information management and equipment maintenance management.
1) Basic information management: The input and maintenance of the physical parameters of the equipment and the generation of equipment parameter reports. For different situations of different devices, the physical parameters of the device can be arbitrarily customized. When the device attribute is not customized, the attribute value of the device cannot be entered. After the customization is completed, only the customized device attributes can be assigned. Maintenance Management: This module mainly deals with the entry and maintenance of equipment maintenance information, as well as the statistics of maintenance records and the generation of equipment maintenance reports.
3.23 Floor Plan Management Subsystem This sub-system mainly deals with the layout of the shop floor plan, the layout of the shop floor plan, and the view of the workshop equipment parts drawing.
4 system security design 4.1 BLOB variable access in the database and the application of OLE technology Currently implement AutoCAD drawings mainly in three ways, first: the file file name string stored in the database, call the drawing when the The file pointed to by the string can be opened in the AutoCAD environment. This method is only applicable to stand-alone database applications. Second: Open the drawing file as read-only or read-write in a certain way, and read it into the BLOB variable. When calling a drawing, the BLOB variables in the database are written to a temporary file on the disk, and then the drawing file is opened by AutoCAD. Although this method can be used for web applications, it is very insecure. Once an illegal user finds a temporary file, he can get all the data of the drawing. Third: Using OLE technology, the OLE control's object properties are assigned to BLOB variables through OLE technology, and then imported into the database. The code for importing the drawing file information into the database is as follows: Electric Desalting Tank\L8219-4- Setup -8-3 Electrode sleeve. Dwg*) Take out the BOLB variable and display the code in the OLE control as follows: 4.2 Using the dynamic menu to control the user's authority It can be seen that the user in the system can be divided into four types. The ordinary user can browse the query drawing, view the device information and workshop floor plan. The layout. In addition to the above permissions, the system administrator can also import, edit, modify drawings, change device information and shop floor plans. Each of these two types of users is divided into two categories, shop floor users and non-workshop users. Workshop users can only refer to drawings, equipment and floor plans of the workshop equipment. Non-shop floor users can view drawings and equipment floor plans of all workshop equipment.
Because different menus handle different businesses, the use of control system menus can control user rights. Therefore, based on the above user classification, a user menu mapping table can be established, and the menu items corresponding to each of the four types of users can be stored in the database. When a user logs in to the system with an account, he or she can check its own rights. The steps to check are as follows: First, if the account is the super administrator account SYSTEM, the user's operating authority is not restricted; otherwise, the user enters the second place. step.
Second: Check the user account belongs to the category and the category belongs to the permissions, and automatically calculate the account has the permission collection set of permissions in the PB can be expressed as the account has the right to operate the menu items, text buttons, graphic buttons The string set of the class name may also be represented as a set of corresponding strings of operation rights not possessed by the account, and one of the two sets may be selected as appropriate.
Third: Since the designed menu system has only one main menu, it is possible to check whether the name of the menu item to control the right is in the set obtained in the second step, so that the usability can be set accordingly.
Fourth: create a 'function menu' in the main menu, the menu is fixed only a drop-down menu, specify a menu item for each module in the pull-down menu, and each menu corresponds to the graphic button on the toolbar , When entering a module by pressing a graphic button or switching the current module, check whether the controlled items in the current worksheet that require control permission include menu items, graphic buttons, etc.) are in the set of permissions owned by the account. The display is normal, otherwise it becomes gray or becomes invisible.
5 use OLE technology to achieve AutoCAD drawings zoom in and out Although you can use OLE controls to display AutoCAD drawings, but the length and width of AutoCAD drawings must be consistent with the length and width of the OLE control. In other words, if you want to enlarge the drawing, you must enlarge the OLE control, and the OLE control does not support the scroll bar. As a result, when the drawing is enlarged, the size of the OLE control will inevitably exceed the size of the window. To avoid this situation, you can use PB data window to achieve this function. The specific implementation is as follows: Step 2: Define the table containing the required BLOB fields as the data source of the data window object. Be sure to include the key field, but you cannot include the BLOB field in the data source.
Then click in the data window where you want to place this BLOB object.
Box, select the desired BLOB field.
Step 5: If necessary, change the default key PB in the KeyClause box to use this key phrase to generate a WHERE clause in the SELECT statement that is used to retrieve and modify the BOLB field in the database.
Step 6: Adjust the size of the BLOB column. In the program to control the size of the BLOB column, when the size of the BLOB column exceeds the size of the data window control, you can drag the data window control scroll bar to view the entire picture, without the need to change the size of the data window control.
6 Conclusion The system has been put into operation at the Urumqi Petrochemical Company, which provides the company's engineering and technical personnel maintenance drawings and maintenance equipment to provide a great convenience, so that the company's production and management efficiency has been improved. However, because the system uses OLE technology as an interface between software and AutoCad, it can only invoke some of the simple features of AutoCad. In order to migrate some of the complex features of AutoCad to such database applications, secondary development techniques of AutoCad should be used.