Design and Development of Automatic Generic Cabling System Based on .NET

With the development of intelligent building, its infrastructure generic cabling technology was still in the manual stage. In this paper, we analyze the connection between generic cabling technology and CAD. Based on the framework of.NET, we carry on the secondary development of AutoCAD using visual programming language C# to develop the automatic generic cabling system. The system can meet standards of generic cabling project, and realize automatically system diagram design. The system can also generate automatically construction plan design, and complete material statistics, and project budget. It can not only ensure the generic cabling project strictly according to the standard construction, improve project quality and level, reduce the workload of the designer, but also greatly promote the development and application of generic cabling technology in intelligent building.


Introduction
With the development of intelligent buildings, generic cabling technology as its infrastructure is becoming important. Generic cabling technology is building's information transmission system, and it also is information superhighway in buildings. At present, the buildings use generic cabling [1] technology, but the specific design of system diagram, the specific design of construction plan, and material statistics about generic cabling system, these are still created by people, who are use AutoCAD, Visio, Excel or other software, according to their experience. When people design construction diagram and system diagram of generic cabling, they need to draw a variety of equipment, information points and write the number for these equipment. They also need to complete material statistics and project budget. The workload of whole process is very big, and very easy to get some errors, more seriously, an error may cause the work to start over. It's very inefficient. Therefore, a kind of software is urgently needed, that can automatically draw construction plan and system diagram of generic cabling, and that can automatically complete material statistics, according to building data.

Generic Cabling Technology
Different equipment, communication signals [2] through the same transmission medium are integrated into one system called generic cabling technology. It is a standard application system, which support transmission of voice data, network data, and graphic images. It is the infrastructure of intelligent buildings. In a modular way, the transmission of voice, data and image are unified and integrated into a standard system, which organically connects the whole buildings to provide information transmission. In the GB50311, specification for design of generic cabling system engineering, It provides the generic cabling engineering design consists of the following seven subsystems: Workspace subsystem,  figure 1.

The Secondary Development of AutoCAD
In the traditional generic cabling [3] engineering, the design of construction plan and system diagram is made by using the general drawing software such as AutoCAD and Microsoft Visio, which is drawn manually by the designer. The cabling path is also determined according to the designer's construction experience, and the material statistics is completed by the designer with the help of EXCEL. If the designer wants to modify a part of the design plan, such as statistical information points, the construction plan must be redrawn, the project budget also must be recalculated. This will not only lead to economic loss and time loss, but also lead to the extension of the project period. In engineering design, AutoCAD or Microsoft Visio is mainly used to complete the design of construction plan and system diagram. But this kind of software only has the basic drawing and the graph processing ability, it cannot meet the needs of all walks of life. So, people hope to make use of the open resources and standard interface provided by AutoCAD under the platform of AutoCAD, they can do the secondary development of AutoCAD according to their professional needs, and customize the system that belongs to their own industry.

Design of Generic Cabling System 1) Modular design
According to the provisions of GB50311 standard, generic cabling has seven subsystems. The composition and functions of seven subsystems are analyzed as follows: The workspace subsystem is the smallest unit and the most basic unit in generic cabling engineering. According to the area and purpose of workspace, people can determine the number of information points and the location [5] of cabling, then they can complete the statistics and budget of basic materials. In horizontal subsystem, people calculate the distance from the floor distribution frame to the information points of workspace. Next, according to the floor structure and the needs of users, people determine cabling materials, such as PVC groove, PVC pipe, and cabling methods, such as bridge. In management subsystem, mainly refers to the floor management room. According to the number of information points, people determine the number of network equipment, and then determine the floor management room area, network cabinet size. People can select the type and length of the cables, according to the user's request for the network transmission speed. Next people can determine the area and size of incoming line subsystem [6], according to the building area. They also calculate the size and number of network cabinet according to the number of equipment used in the building. According to the number and use of buildings, people select the location and size of buildings subsystem, and select the way of laying cable between buildings. Finally, it is concluded that the design and construction can be carried out independently among the subsystems of the generic cabling. As a result, the architecture of generic cabling is divided into seven modules, can realize the function of seven subsystems respectively, and generate the corresponding bill of materials and project budget in each subsystem section. It finish engineering construction drawing design in the end. The function structure of established generic cabling is shown in figure 2.

Figure 2.
Functional structure of network generic cabling system 2) Graphic object design Each part of generic cabling will be abstracted by using object-oriented technology , such as vertical cables, horizontal cables, all kinds of distribution frame, and information points. As objects, all the properties of each object, the operations on the properties of that object, and the rules of the operation are encapsulated in the object. An operation on an object can be some kind of rule inference or any other function call, such as access to a database. The whole access process or function call process is the passing of messages between objects, that is, the only way that objects can relate to each other is messaging or function calls. Because of the encapsulation of objects, the various types of calls do not interfere with each other. Since the concepts in a generic cabling engineering can be abstracted a graphical object, it can be given a variety of operations, such as moving, deleting, and adding. At the same time, designers can also assign attributes to these graphic objects, such as, PVC pipe can define its type, material number, unit, quote, material name, and so on. The process of defining the properties of an object is actually to set up the material information table of a generic cabling engineering, each of which is the value (field) recorded in the data table.
3) Database design In the actual generic cabling engineering, the database used is divided into static database and dynamic database. For example, "material inventory", "information socket", "room information", "cable information" and "equipment information" are static databases. It is a description of the state of generic cabling engineering. The dynamic database stores the result of data processing and the final result in the cabling process, which is a constantly changing process. Combining with the core idea of object-oriented, the graph database of generic cabling is constructed. The establishment of graphic database is an important part of the secondary development process of Auto CAD, which includes all objects of a design drawing. People will achieve the access to the graphics  The partial relation table is shown in table 1, table 2.

Realization of Automatic Generic Cabling System
In the design process of automatic generic cabling system, we have a modular design. That is to say, seven modules are designed according to the functions of seven subsystems. The equipment and cables involved in the cabling engineering are abstracted as objects, and store them in the database. So that the graphical objects can be defined, queried, updated, deleted and done other operations. Using object-oriented structured programming ideas, we develop automatic generic cabling system choosing visual programming language C# On Visual Studio.NET 2010 development platform. At the same time, we use visual language development tools based on Windows platform, the managed Object ARX [6] for AutoCAD secondary development interface class library. We also use access 2010 as the DBMS, AutoCAD2007 for automatic generic cabling system drawing tools.
In the secondary development of AutoCAD, acdbmgd.dll, acmgd.dll, and accui.dll must be introduced in order to use .net API encapsulated classes. First, we start Visual studio 2010, create a new project, and put the mouse over the project name, next, right-click "reference" → "add reference" → "browse", then find the above DLL file, add these components to the project. At this point, c # language and.net API are connected, next, we will write programs to realize the corresponding function of automatic generic cabling system using c # language on Visual Studio.NET 2010 development platform, and made them generate dynamic link library files. We can call that files in AutoCAD to gain system diagram and construction plan design, we also call Microsoft Excel to gain the bill of materials and project budget.

Testing
With the help of one teaching building cabling project, we complete the module testing and system testing of generic cabling project. The test results are basically consistent with the expected results. The test results meet the functional and performance requirements of the generic cabling project. At present, the cabling scheme is only set for the type of project, hat is to say, there are only three cabling schemes, which have great limitations and cannot completely meet the cabling needs in the actual project.
There are some problems, the location distribution of information points is relatively single, which is not humanized enough; the database stores a limited number of graphic elements that cannot fully represent all the devices in the generic cabling project. These problems, in the follow-up program development, we will be further solved. So, the function of automatic generic cabling system will gradually improve, and realize its social value.

Conclusion
In this paper, we design an automatic generic cabling system, which using object-oriented design idea, proposing modular design, having a relational database as the core, developing on AutoCAD. And with the help of one teaching building cabling project, this system realizes generic cabling system diagram, construction plan, image processing and statistical materials, and engineering budget. It guarantees generic cabling project to carry on according to the national standard. It also saves the designer's time and energy. The application of object-oriented technology and database technology in wiring generic cabling project is innovative and advanced, which is a trend in the practical application of generic cabling technology in the future.