Close
About
FAQ
Home
Collections
Login
USC Login
Register
0
Selected
Invert selection
Deselect all
Deselect all
Click here to refresh results
Click here to refresh results
USC
/
Digital Library
/
University of Southern California Dissertations and Theses
/
MM Electrical Tool: a tool for generating electrical single line diagrams in BIM
(USC Thesis Other)
MM Electrical Tool: a tool for generating electrical single line diagrams in BIM
PDF
Download
Share
Open document
Flip pages
Contact Us
Contact Us
Copy asset link
Request this asset
Transcript (if available)
Content
i MM Electrical Tool: A tool for generating electrical single line diagrams in BIM By Mingming Zhou Presented to the FACULTY OF THE SCHOOL OF ARCHITECTURE UNIVERSITY OF SOUTHERN CALIFORNIA In partial fulfillment of the Requirements of degree MASTER OF BUILDING SCIENCE May 2019 ii ACKNOWLEDGEMENTS Thanks to Professor Karen Kensek who always support me during my 2-year study at USC. At the beginning, I’m confused about my thesis goal, Karen helps me to define several research directions and let me to consider about each direction to find my thesis theme. Then, she keeps revising my thesis patiently. Many thanks to Professor Mohammed Beshir who gives me a lots of brilliant suggestions to improve my thesis in very patient way. Many thanks to professor Kyle Konis, he gave me many brilliant ideas on improve my application usage. I would also like to thank to Mr. Chee who offers the technical support and keeps encouraging me. Thanks for his lots of valuable advice, I learnt a lot from his comments. iii COMMITTEE MEMBERS Chair: Karen M. Kensek, LEED AP BD+C Professor of Practice USC School of Architecture kensek@usc.edu (213) 740-2081 Second Committee Member: Mohammed Beshir Professor of Electrical Engineering-System Practice USC School of Viterbi beshir@usc.edu (213) 740-6433 Third Committee Member: Kyle Konis, PhD, AIA Assistant Professor USC School of Architecture kkonis@usc.edu Fourth Committee Member: Aaron Chee, PE, LEED AP BD+C Studio Leader/Electrical Engineer P2S Inc. aaron.chee@p2sinc.com (562) 642-4874 iv ABSTRACT As a digital depiction of construction requirements, Building Information Modeling (BIM) is being implemented in the Architecture and Mechanical, Electrical, and Plumbing (MEP) design process in order to achieve highly efficient design and documentation. Although successful in some respects, BIM is still not being used to its full advantages for electrical design. Electrical engineers still spend time manually doing work that could be automated within BIM. A comprehensive user-friendly tool with features such as automatic generation of single line diagrams would be useful. Visual Studio with .NET 3.5 Framework was used to develop the user interface for MM Electrical Tool. WPF (Windows Presentation Foundation), which is a graphical user interface framework, is used with the .NET 3.5 Framework. A WPF framework allows developer to create a plugin with a wide usage of graphical user interface elements, such as text boxes, labels, and other elements. Therefore, the WPF framework helps developer to generate a data input interface for users. As a prototype tool, the MM Electrical Tool uses model data from a floor plan and manually entered data in forms for automatic Single Line Diagram (SLD) design generation. These parameters are loaded into a database to store and manipulate the data. Based on the US National Electrical Code and Title 24, an electrical single line diagram is determined. MM Electrical Tool automatically generates single line diagram with cable sizing, voltage drop, and circuit breaker sizing in 2D view. In its final form, it is a set of Autodesk Revit add-ins that are run in Autodesk Revit. MM Electrical Tool was developed as a plug-in for Revit as at 2D level for electrical system design. It jumped the costly and unnecessary modeling process, because electrical engineers do not have to do the load analysis at first and draw the results in Revit manually. MM Electrical Tool allows designers produce single line diagram automatically in Autodesk Revit. MM Electrical Tool makes BIM electrical system design easier and more accurate. Future enhancements include the automatic generation of panel board schedules with cable sizing, voltage drop, and circuit breaker sizing. KEY WORDS: electrical engineering, BIM, Revit add-ins, single line diagram HYPOTHESIS An integrated tool can have automatic generation of wiring electrical devices to create a single line diagram. RESEARCH OBJECTIVES Develop the MM Electrical Tool that can show a single line diagram with the cable sizing, voltage drop in Revit. Build a panel board schedule including voltage drop, circuit breaker sizing and room number in Revit. Construct wiring method between a lighting and power outlet in BIM model. Generate an electrical system report as an Excel document. v TABLE OF CONTENTS ACKNOWLEDGEMENTS ....................................................................................................................................... ii COMMITTEE MEMBERS ...................................................................................................................................... iii ABSTRACT ................................................................................................................................................................iv TABLE OF CONTENTS ............................................................................................................................................ v 1. Introduction ............................................................................................................................................................. 1 1.1 Building Electrical Engineering ...................................................................................................... 1 1.1.1 Components of a Power System .................................................................................................. 1 1.1.2 Single Line Diagram ................................................................................................................... 2 1.2 BIM-based Electrical Design Coordination ................................................................................... 5 1.2.1 Building Information Modeling .................................................................................................. 5 1.2.2 BIM Based Electrical System Design and Applications ............................................................. 7 1.3 Programming in BIM Application .................................................................................................. 8 1.3.1 Revit API Development .............................................................................................................. 8 1.3.2 Visual Studio C# Development ................................................................................................... 8 1.4 Summary ........................................................................................................................................... 9 2. Background and Literature Review ..................................................................................................................... 10 2.1 Current Building Electrical Engineering ..................................................................................... 10 2.1.1 Estimated Total Building Electrical Power Load ...................................................................... 11 2.1.2 Determine Electrical Services ................................................................................................... 12 2.1.3 Responsible for Location and Size of Equipment Space........................................................... 12 2.1.4 All Devices and Equipment Circuited to Panels ....................................................................... 13 2.1.5 Checks Work ............................................................................................................................. 15 2.1.6 Cooperate with Interior Designers ............................................................................................ 15 2.1.7 Code Requirements ................................................................................................................... 15 2.2 BIM-Based Electrical Design Coordination ................................................................................. 16 2.2.1 The development of BIM .......................................................................................................... 16 2.2.2 Requirements of BIM Based Electrical System Design and Application ................................. 18 2.2.2 How BIM Interacts With Other Tools ....................................................................................... 18 2.3 BIM Electrical Engineering Tools ................................................................................................. 21 2.3.1 ETAP ......................................................................................................................................... 23 2.3.2 Ecodial Plugin ........................................................................................................................... 25 2.3.3 RushForth .................................................................................................................................. 29 2.3.4 The Drawback of Existing Add-ins ........................................................................................... 31 2.4 Summary ......................................................................................................................................... 31 3. Methodology ........................................................................................................................................................... 32 3.1 MM Electrical Tool ........................................................................................................................ 32 3.2 Application Design .......................................................................................................................... 33 3.2.1 Add-in Design ........................................................................................................................... 34 3.2.2 User Interface Design ................................................................................................................ 34 3.2.3 SLD Generation Design ............................................................................................................ 38 3.3 Summary ......................................................................................................................................... 42 4. Methodology-Calculation ...................................................................................................................................... 43 4.1 Total Load Calculation and Transformer Selection .................................................................... 44 4.2 Electrical Switchboard and Panelboard Selection ....................................................................... 46 4.3 Cable Size Selection and Voltage Drop Calculation .................................................................... 48 vi 4.3.1 Data Gathering .......................................................................................................................... 49 4.3.2 Base Current Rating .................................................................................................................. 49 4.3.3 Cable Impedances ..................................................................................................................... 50 4.3.4 Maximum Permissible Voltage Drop ........................................................................................ 50 4.3.5 Short Circuit Temperature Rise ................................................................................................. 50 4.4 Breaker Selection ............................................................................................................................ 51 4.5 Ground Protection Design- Grounding System ........................................................................... 53 4.5.1 TT System ................................................................................................................................. 53 4.5.2 TN System ................................................................................................................................. 53 4.5.3 TN-C ......................................................................................................................................... 54 4.5.4 TN-C-S ...................................................................................................................................... 54 4.5.5 IT System .................................................................................................................................. 55 4.6 Summary ......................................................................................................................................... 56 5. Running the Application ....................................................................................................................................... 57 5.1 Plug-in Package Built – Getting MM Electrical Tool Ready to Use .......................................... 57 5.2 Loading in Revit.............................................................................................................................. 58 5.3 The Data Input ................................................................................................................................ 61 5.4 Running Drawing .Dll In Revit...................................................................................................... 63 5.5 Summary ......................................................................................................................................... 65 6. Discussion, Future Work, and Conclusion .......................................................................................................... 66 6.1 Discussion ........................................................................................................................................ 66 6.2 Fixing Current Problems and Adding Features .......................................................................... 68 6.2.1 Fixing Current Problems ........................................................................................................... 68 6.2.2 Features ..................................................................................................................................... 68 6.3 Additional Future Work ................................................................................................................ 69 6.3.1 Validation and Survey ............................................................................................................... 69 6.3.2 Offer Other Versions to Benefit More Users ............................................................................ 69 6.3.3 Use the Building Information Model More Extensively ........................................................... 69 6.4 Conclusion ....................................................................................................................................... 69 REFERENCES .......................................................................................................................................................... 71 APPENDIX A: Interface Coding Part ..................................................................................................................... 73 APPENDIX B: SLD Outline Generation Coding Part ........................................................................................... 76 APPENDIX C: SLD Transformer Generation Coding Part.................................................................................. 79 APPENDIX D: SLD Panel Board Generation Coding Part .................................................................................. 81 APPENDIX E: SLD Breaker Generation Coding Part .......................................................................................... 85 APPENDIX F: SLD Grounding System Generation Coding Part ........................................................................ 88 APPENDIX G: SLD Cable Generation Coding Part ............................................................................................. 89 1 1. Introduction Building electrical engineers use building information modeling (BIM) for both design before the building exists and maintenance and operations when the completed building is occupied. With the current development of BIM software programs, most large MEP (mechanical, electrical, plumping) companies are willing to use the software for projects; this is very important because the architecture firms and construction companies are also using it. However, in some respects, BIM for power system and electrical design is still underutilized with engineers still using 2D techniques in software like AutoCAD (and sometimes even hand drawings). Other disciplines have made the transformation from 2D CAD (computer aided drafting) to 3D BIM. Electrical engineers are doing that also, but have missed some opportunities possible with BIM technology. 1.1 Building Electrical Engineering When engineers use AutoCAD, a 2D CAD (computer-aided drafting) system, instead of hand drafting for design, it is a notable change. However, this migration still has some limitations for gains in efficiency. For example, it does create efficiency for engineers who try to make panelboard schedules using AutoCAD instead of hand drafting. When drawing by hand, the calculation process and schedules have to be finished manually. AutoCAD has some tools for calculations that save time. However, power loads still need to be set from reference equipment schedules on various drawings on the panel or distribution board schedule manually. Both hand drafting and AutoCAD depend on 2D views that present the power distribution and electrical devices positions. By understanding the components of a power system and the use of a single line diagram (SLD), one can consider using BIM instead of 2D CAD or manual drafting for the creating of the SLD 1.1.1 Components of a Power System A power system can deal with all the three electrical energy aspects: generation, transmission, and distribution. The power system (“grid) is a most complex and large man made system. Electrical power is somewhat like the air people breathe: it is thought about only when it is missing (Avinash K. Sinha, 2006). Power system offers a vital service to the society (Tang, Qu, Wu, & Zhou, 2010). A power system consists of starting with the source of different fuel. It can be the potential energy of water, mechanical energy stored in coal, solar or wind energy, or even nuclear energy. This is sent to an energy conversion device from where it gets converted into electrical energy. Once fuel gets converted into electrical energy, it is transmitted and distributed by means of wires, that is transmission lines and distribution lines and goes up to the energy conversion devices, which are at the consumer premises. When people want to switch on a bulb to get light, the power comes from some source of fuel that is used in a power plant, which is converted into electrical energy, then transmitted by means of transmission lines up to house (Sinha, 2006). Storage devices can be used to store excess energy. However, the amount of energy needed to deal with is very large, and the amount of storage is almost minimum. Some of the storage devices that used be large energy storage, can be there is super conducting magnetic energy storage. Those devices have large super conducting coil in which people can store energy as a magnetic energy. In most of the houses, especially in cities another place, un-interrupted power supply (UPS) as an electrical power battery provides DC power to devices when there is a power cut (Sinha, 2006) (Fig. 1-1). 2 Figure 1-1: Power System Outline 1.1.2 Single Line Diagram Power systems are extremely complicated electrical networks. Power system networks are 3 phases, which means each power circuit consists of three conductors. All the devices are installed in all the 3 phases. A complete conventional diagram showing all the connections is very complicated. It is also impractical to draw, because it will be very difficult to read this diagram and understand the connections between various components. A single line diagram (SLD) is a concise way of communicating the basic arrangement of power system components. SLD represents graphical power system network and shows the basic interconnections of various components. SLD uses single line to represent all the 3 phases that all are having same similar currents and voltages. Since, a single line diagram uses only one line to represent all the 3 phases, SLDs are also called one-line diagrams. These diagrams show the relative electrical interconnections of various components. Such as generators, transformers, transmission and distribution lines, loads, circuit breakers, and all these components which go in to make the power system network (Fig. 1-2). Figure 1-2: Single Line Diagram and zoom in of SLD TOWER 3 Single line diagrams are graphical representations; there are some symbols requiring to be developed for the various power system components, although there is no universally accepted set of symbols (Table 1-1). Table 1-1 Symbols of Single Line Diagram (Avinash K. Sinha, 2006) Name Symbol Name Symbol Two winding power transformer Fuse Ammeter Voltmeter Power circuit breaker Air circuit breaker There phase star connection with neutral ungrounded Ground/Ground In addition to the symbols for current transformers, potential transformers, disconnect, isolators (circuit breakers), fuses, reactors, and lighting arresters, SLD includes the concept of a bus-bar. Bus-bar are nodes in the electrical circuit. Bus-bars are required in a power system diagram, because electrical engineers cannot join various lines, which may be very thick lines, just by connecting at one point. For transmission line single lines, a long bar is used instead. Bus- bars are used or represented as short thick lines which is used perpendicular to the transmission lines. When transmission single line shows different lines connected at a bus-bar, what designer has is the lines normally will be shown as the horizontal lines. Then the bus-bar will be a vertical line, somewhat thicker than the transmission lines. An example of a 3 phase generator single line diagram shows generators and bus bars (Fig. 1-3). A double circuit transmission line begins with two step-up transformers. Then through two step-down transformers to a low voltage bus-bar to which load is connected. The example goes through generator symbol and a circuit with for protection of the generator at first. Then, circuit breakers to circuit breakers on the primary side of the transformer. On the low voltage side, there is two transformers. And then on the secondary side or the high voltage side again, these two transformers are connected with two breakers. Load happens on low voltage bus (Avinash K. Sinha, 2006). A substation has 2 bus-bars and 4 transmission lines which is 1, 2, 3 and 4 connected to these two bus-bars. 4 Figure 1-3: Single Bus-Bar Arrangement and Double Bus-Bar Arrangement. (Circuit Globe, 2017, retrieved from: https://circuitglobe.com/electrical-bus-bar-and-its-types.html on Jan. 31, 2018) For a building SLD design, electrical engineers need to distribute power that from power station to the feeders (Fig. 1-4). Distribution system usually begins with transformers that decreases voltage of power into 480V which can be used by motor appliances directly. Then, switch boards are taken for controlling off and on for each feeder distribution path. Switch boards could turn off specific feeder when accidents, such as overload and short circuit, happen to avoid unforeseen series of damages. Current flows through busbar or cable to the feeders. At the terminal part, additional transformer could be used to decrease 480V into 208/120V, because most electrical devices work under 208/120V. Figure 1-4: Electrical power distribution system. (Lu Huang, 2018) 5 1.2 BIM-based Electrical Design Coordination Generally, MEP designs are unique to each individual building project. With the rapid development of technology, electrical infrastructure design is increasingly complex. There are new systems such as smart technologies, European Installation Bus (EIB) lighting, and building management system (BMS) added in electrical system. Engineers are increasing aware of the significant of energy saving and sustainable concepts that demands an accurate and fast calculation approach. Meanwhile, collecting huge data and dealing with them are a time-consuming and tedious process. Therefore, BIM provides a key to overcome these problems during the analysis and electrical system design. The traditional method offers manual or automatic platforms method for electrical system design. During the design process for traditional method, ETAP (a software program) is used for design studies, but the information is then transferred manually to other software like Revit. A newer approach starts with the design in Revit, where the creation of the single line drawing and panel board schedule are partially automated. BIM (using Revit) holds the integrated information in one single platform. This is a platform that can finish calculation and drawing plans together (Fig. 1- 5). Figure 1-5: Difference between traditional and BIM based electrical system design 1.2.1 Building Information Modeling Building information models are 3D models that contain information about parametric objects. There are many BIM software programs including Digital Project, ArchiCAD, and Revit. They share many common features. As Revit is used extensively in the US, it will be used as the “typical” BIM software program. Autodesk Revit modeling is made up of real-world elements like walls, windows, columns and doors. The user can develop different views of the building model, including callouts, plans and sections. All views are created from the original 3D model so that one view’s element is changed, the same element in all other views can be changed automatically. When using Autodesk Revit to generate BIM models, users needn’t to update multiple details and drawings based on a change is added in the model (Fig. 1-6). 6 Figure 1-6: Building Information Modeling with Revit showing how the 3d model can be used to create 2D drawings and schedules Building information modeling is critical and has made revolutionary changes in building system and infrastructure development in the civil and construction engineering industries over the last decades (Eastman, 2011). BIM offers the opportunity to easily digitally coordinate the entire construction and design team, which had been a complex process in the past (Mitcham 2018). In the view of the importance of BIM, it brings advanced technological method to building design practice in 1980s and 1990s. BIM affords the possibility to designer for testing many more parameters of a project based on the initial sizing step by using sophisticated computer technology (Andrews 2018). Another advantage of BIM is that it allows three-dimensional geometry to be generated based on real-time databases when comparing with computer-aided drafting (Mitcham 2018). When only focusing on the purely technological perspective of CAD and BIM, it is essential not to consider CAD only with 2D and BIM the same as a 3D modeling software. Most CAD software also has the ability to show 3D view (Dastbaz, Gorse, and Moncaster n.d.). The key is that CAD is usually a static file that has no relationship with the other files about one project (Ziel, Haus, and Tulke 2008). However, a building’s model is presented by geometrical shapes and lines in CAD, and the elements can be showed in specifications (Dastbaz, Gorse, and Moncaster n.d.). For example, when an architect describes a wall’s definition in a building information model, it includes width, height, non-bearing and bearing principle, fire rating, interior or exterior, new materials such as boards and bricks or demolished. BIM provides both the 3D geometry of the object and its parameters (Ziel, Haus, and Tulke 2008). Some 3D software programs only have the 3D geometry, not the data about the components. Those are not considered BIM software. Currently, there are more and more various tools created by the construction software companies to help engineering activities during previous planning and design process. Most of those tools are considered as a simulation and analysis software to various specialists. They can guide on physical, mathematical, or mechanical models of conditions. (Engineering 2016). As a BIM software, Revit has a lots of features for building information modeling. Based on intelligent model design process, it supports a multidiscipline collaborative among plan, design, construct, and manage building and infrastructure. For example work sharing is a method of cooperation method that lets multiple group designers draw on the same project at the same time (Fig. 1-7). 7 Figure 1-7: Team members share a central model Revit comes with tools and symbols that are useful to an electrical engineer. In addition, Revit has an API (application programmer interface) that allows users to create their own tools either through programming languages and Dynamo, a visual programming language. Engineers and architects have written many add-ins that improve the working efficiency of the software. Some examples written with Dynamo were for the following applications: cooling load, heating load, supply air flow, and occupancy were calculated and assigned in Revit automatically (ARUP); the required airflow in a specified MEP space was retrieved and this value distributes on every air terminal enclosed in this space (Bouygues Immoblier), objects re-assigned to the proper level (Ingenieursburo Linssen B.V.), creation of escape routes (Autodesk); and many others (Kensek, et. al. 2017). 1.2.2 BIM Based Electrical System Design and Applications There are many potential applications of BIM based electrical modelling for electrical system design, analysis, power system planning, and smart building environments (Table 1-2). Table 1-2: Potential applications of BIM based electrical modelling (Farooq, Dastbaz, Gorse, and Moncaster n.d.) Category Applications Electrical System Design Modeling and design calculations of lighting, power and cable routing systems, panelboard design and balancing, protection, 3D visualization and renderings, quantity take off and cost estimation, prefabrication detailing, safety analysis, improved design communication, layout planning. Analysis Clash detection, circuit continuity checking, costing, LEED, daylight analysis sustainability, RE Potential, whole building energy analysis. Power System Planning Concept of parametric city energy modeling and (smart) microgrid/ electrical network planning. Smart built environment Smart objects; behavioral analysis, real time monitoring and operation and maintenance, post occupancy evaluation. Real time visualization. 8 In city electrical energy simulation and electrical system optimization fields, there are only a few studies associating with semantic information system and BIM design. A building power supply and distribution system is a group of electrical parameters interacted to run specific operation system. Coordination and estimation and manipulations can be run before the beginning of the actual construction. It is efficient for engineers to have enough time to solve problems before the project starts by using the BIM model (Farooq and Sharma 2017). Therefore, BIM is not only a tool making repetitive time-consuming tasks easier, but also has the ability to be easier coordination with team and ease of find appropriate project’s information. 1.3 Programming in BIM Application Autodesk Revit is a widely used building information modeling software in architecture and engineering design in many firms all over the world. It is one of the first BIM software to allow the writing of plug-ins and scripts in order to enlarge the program’s function (Garagnani and Manferdini 2013). There are some issues when people try to use plugins. Some of the plugins are expensive and difficult to create. The development process of a plugin can be time- consuming with the complex three-dimensional models; however, some architects and engineers are finding that even simple tools can help streamline their workflow. It is important to select an appropriate platform to create a plugin. 1.3.1 Revit API Development The Revit Application programming interface (API) is a macro platform that is part of the Revit software package. It puts programming functions and the BIM parametric modelling together (Table 1-3). Programmer uses computational logic and algorithms to generate manipulate Revit elements and interactively design. Revit provides the platform with the database and basic view platform. It can parametrically represent the element for a project and creates the relationship between different elements automatically. After coding, the application can reduce the time-consuming operation and realize automatic processing with specific requirements. Furthermore, it is friendly for novices to program by using existing libraries and algorithms (Yang, Koehl, and Grussenmeyer 2017). Table 1-3: Revit API development (Yang, Koehl, and Grussenmeyer 2017) Revit software API Programming functions Merits Platform Viewing platform Information storage and management 3D block representation Automatic relationship building Reduced manual operation Automatic and batch processing Specific functions Calling existing algorithms External library Limits Low efficiency Accurate position information Reality-based segmentation Information storage Relationship management Parametric modification 1.3.2 Visual Studio C# Development Visual Studio C# as another useful tool to help programmers to generate Revit plugins. Visual Studio C# offers a rich and powerful .NET Application Program Interface (API) with some friendly and free tools to develop a program. For example, it is easy to program in Visual Studio and load the plugin in the Revit. The only thing users need to do is to build a manifest document as a bridge to connect Visual Studio application with Revit template. Revit SDK is the Revit API document, which provides the API class name and function method. After loading the Revit class and Revit commands, users can also use Revit SDK in Visual Studio C#. Visual Studio C# allows programmers to debug their code by opening Revit during real-time interactive process after loading AddinManager in Visual Studio C#. Therefore, users can develop a plugin using Visual Studio C# and automatically generate the geometric modelling in Revit platform as a separated and executive application. The generated application is identified and curried out in the unique BIM environment. The package of this application can send to anyone to install on their computers (Fig. 1-8). 9 Figure 1-8: Visual Studio C# Development 1.4 Summary The electrical design process still depends on manual work or use of 2D CAD for essentially manually drawing using a computer. As the construction process is more complicated and difficult when building projects get larger in scale, it is even more critical to use BIM in the electrical engineering process. BIM can help improve response for the rising complexity of electrical design and power system. However, when BIM is being used, it is not always part of a streamline, automated workflow. As a BIM tool, Revit also offer Revit API--a programming tool for creating plugins. It should be possible to automatically generate single line diagrams using C# coding to create a plug-in for Revit for making this task more accurate and efficient. Future work could include generation of a panel board schedule with breaker sizing and feeder schedule with cable sizing and voltage drop. 10 2. Background and Literature Review The early design process has an important role for achieving well building design and construction target. There are amount of effective decisions making during this stage (Azhar et al. 2009). Many parameters such as building power distribution system, building mechanical system, building orientation, building mass, thermal insulation, surface area- to-volume ratio, natural ventilation, natural lighting can impact the building performance (Smeds and Wall 2007). These factors have the possibility to significantly reduce the building energy requirements and improve design correction. For instance, optimizing a building electrical engineering system at the design stage can decrease the project costs and improve the power system’s safety. In order to improve a building design at the pre design process to make use of all those possible savings, it is important to analyze the contribution of each aspect before deciding the best system for model. However, traditional architecture design workflows do not have enough chances to evaluate design system at the pre-design process. Engineering industries have realized the advantage of using the repetitive design process to evaluate and test many design methods at the earliest processes that leads them to develop a new tool called BIM. BIM as a landmark of processes, policies and tools has the possibility to support repetitive design to optimize building performance (Sakikhales and Stravoravdis 2015). 2.1 Current Building Electrical Engineering In the first decade of the 21 st century, all countries dependency on a power system that transports electrical power from generators to users. Though, some countries separate electrical system into several distribution parts. The higher voltage equipment and the increasing size of power plants was companied by integration of generating facilities. By using integration system, the total reserve capacity required could be reduced to meet equipment-forced outages. It is possible to decrease service interruptions in order to make a most economical utilization. This interconnection system (generally called “grid”) has played a very important role in most country and it already becomes a major factor in the level of economic and well-being activity in one country. All power systems are alternating current, there exists a frequency of either 50 Hz or 69Hz. (50 Hz is mainly used in Asia (partly), Europe, Africa, India and Australia, and 60 Hz is mainly used in parts of Japan and South and North America.) (State n.d.) The integration grid was accompanied by using sophisticated power analysis tools such as ETAP. Predesign analysis of the integration system was applied for goals of safety and economy. The appearance of the load analysis by computers guided the dawn of power systems engineering, it is exciting for designers to design the best power system to achieve the load requirements safely, reliably, and economically. Electrical engineers follow a process in developing their design ideas for different projects (Fig. 2-1). Figure 2-1: Electrical Design Process 11 2.1.1 Estimated Total Building Electrical Power Load Designers start the process of designing electrical systems by estimating the total building electrical power load. Then they plan the space is required for electrical equipment such as transformer room, conduit chases and electrical closets. The amount of energy that a building is suggested to consume is offered by Planning of Electric Power Distribution Technical Principles (Table. 2-1). Table 2-1: power demand for a building(Siemens AG 2016) A building energy consumption analysis determines whether the building design will meet the target electrical energy budget. If not, the engineer must modify the electrical loads and reconsider the projected system criteria. The engineer will incorporate energy conservation devices and techniques and draw up energy use guidelines to be applied when the building is occupied. These techniques depend on the day-to-day voluntary actions of the building’s occupants which are hard to determine during the planning phase. 12 2.1.2 Determine Electrical Services Once the electrical load is estimated, the engineer and the utility determine the point at which the electrical service will enter the building and the meter location (Fig. 2-2). They also will decide on the type of service run, service voltage and the building utility voltage with the client. The engineer looks at how all areas of the building will be used and the type and rating of the client’s equipment including specific electrical ratings and service connection requirements. The electrical engineer gets the electrical rating of all of the equipment from the HVAC plumbing elevator interior design and kitchen consultants. This communication often takes place at conferences during which the electrical consultant makes recommendations to the other specialists. Regarding the comparative costs and characteristics of equipment options. Figure 2-2: Building Electrical Devices List and Electrical Switchboard’s Location 2.1.3 Responsible for Location and Size of Equipment Space The electrical engineer is responsible for determining the location and estimated size of all required electrical equipment spaces including switchboard room’s emergency equipment spaces and electrical closets. Panel boards are usually located in closets but may be in corridor walls or other locations. The architect must reserve spaces for electrical equipment. For example, the suspended ceiling below is within the panelboard’s dedicated equipment space. This is permitted as long as the suspended ceiling has removable panels (Fig. 2-3). 13 Figure 2-3: Suspend Ceilings for Electrical Devices. (Admin, 2019, retrieved from: https://www.pearlywhisper.com/overhead_electrical_service_drop_clearance.php on Jan. 31, 2018) 2.1.4 All Devices and Equipment Circuited to Panels Next all lighting electrical devices and power equipment is circuited to appropriate panels. The engineer will detail the number of circuit needed to carry the electrical load, the types and sizes of electrical cables and materials and electrical equipment and their placement through the building (Fig. 2-4). 14 Figure 2-4: How Equipment Circuit to Panelboard. (Evilone17, 2018) Panel schedules are prepared that list all of the circuits for each panel including those for emergency equipment (Fig. 2-5). Panel loads are computed that show how much power is circuited through that panel. The engineer prepares riser diagrams that show how wiring is run vertically and designs the panel switchboards and service equipment after computing the wiring sizes and protective equipment ratings. 15 Figure 2-5: Panelboard Schedule. Data from Revit 2018 Interface 2.1.5 Checks Work The engineer checks the work. Then the engineer coordinates the electrical design with the other consultants and the architectural plans and continues to make changes as needed. Electrical engineer uses the interior design drawings to help design the electrical system in new buildings. The location and size of equipment rooms including switching rooms and electrical closets should be coordinated with the electrical engineer. 2.1.6 Cooperate with Interior Designers Interior designers are also responsible for showing electrical system on their drawings. The electrical engineer uses the interior design drawings to help design the electrical system. In new buildings, the location and size of equipment rooms including switching rooms and electrical closets should be coordinated with the electrical engineer. The interior designer should be familiar with the location and size of the electrical panels and with building system that affect the type of wiring used, such as plenum mechanical systems must know the locations of existing or planned outlets switches dedicated outlets and ground fault circuit interrupters must coordinate lighting fixtures wiring equipment and emergency electrical systems with the interior design. They need to coordinate the location of equipment rooms, should be aware of the presence of an uninterrupted power supply or standby power supply (Jasim Farooq, Paawan Sharma and Sreerama Kumar, 2017). 2.1.7 Code Requirements The interior designer does not usually need to be completely familiar with electrical code requirements. But there are several areas that may affect interior design work. Building codes set limits on the total amount of energy used by the building including equipment and lighting. The NEC is also known as the National Fire Protection Association 70 (NFPA 70). It is revised every three years. The NEC sets the minimum standards for all electrical design for 16 construction. Interior designers rarely use the NEC. Because it is the responsibility of the electrical engineer to design the electrical system. On smaller projects, a licensed electrical contractor will know the codes. However, since interior designers typically will specify the location of electrical outlets and fixtures with assistance from architects. They need to know basic code requirements. For example, the NEC includes restrictions on the proximity of electrical components and plumbing. Standards for electrical and communications systems are set by the following: American National Standards Institute (ANSI), National Electrical Manufacturers Association (INEMA), Underwriters Laboratories (UL), the Americans with Disabilities Act (ADA) specifies mounting heights for outlets and fixtures in handicapped accessible spaces (RedVectorOnline, 2017). Chapter 5 shows how electrical engineers design SLD based those electrical code requirements. 2.2 BIM-Based Electrical Design Coordination Building electrical system realize different specific operations by interconnected a bunch of electrical components. Before the actual building begins, electrical engineers can estimate, coordinate and manipulate the BIM virtual model by using BIM technologies currently. Building minutiae are integral to the virtual model that allows electrical room and substation to be scaled precisely. Main advantages of BIM in electrical system are solve repetitive time- consuming works, faster carry out design iteration tasks, logically linked model information, easier cooperation and precisely locate appropriate information (Farooq and Sharma 2017). Currently, MEP engineers are specific to each single project. The BIM development is necessary for them to handle huge data and get right result (Jasim Farooq, Paawan Sharma1 and Sreerama Kumar, 2017). According to the report, 33% greenhouse gas emissions and energy consumption are created by the building sector (Unep Dtie, 2009). A BIM and Geographical Information System (GIS) based on electrical power system data platform is a good method for life cycle power grid data integration. This is a solution develops an integration of design, planning, operation, construction, marketing and maintenance information models related to electrical power system (G. Yang, H. Zheng, H. Ouyang, J. Zhao, T. Li and J. Zhou, 2013.). 2.2.1 The development of BIM BIM software such as Autodesk Revit has identified environments for structural, architectural, plumbing, electrical and mechanical objects that can be all interconnect into a single document. Especially on larger projects, BIM promises the efficiency of this arrangement. Designers can get larger amounts of information to have the ability to make informed decisions. A simple case study is shown done in Autodesk Revit for an indoor MEP system design and analysis (Fig. 2-6). Figure 2-6: An overview of model’s substation. (Jasim Farooq, Paawan Sharma1 and Sreerama Kumar, 2017) A lighting design case study for an office space with a dimension of 12.14ft x 13ft x9.8ft inside the building is evaluated (Jasim Farooq, Paawan Sharma1 and Sreerama Kumar, 2017). Based on the lighting code, offices 17 illuminance requirement level is 500 Lux. Work plane is 0.8 m that from floor level for this office space. The space is drawn in Autodesk Revit with doors, furniture, wall and windows. The wall’s type is basic wall. Lighting fixture is the surface mounted fluorescent luminaire and hosted on the ceiling. Elum as an add-in application for Autodesk Revit is used to do lighting analysis. The tool’s developer uses pseudo coloring to show lighting intensity for each range illuminance area below the interior design drawing (Fig. 2-7).The tool uses different values to summarize a lighting design project, such as maximum, mean and minimum values for illuminance. Therefore, its uniformity is obtainable easily. In the similar interface of Autodesk Revit, it is potential to evaluate multiple rooms and show the results by creating a flexible schedule based on the consumer’s requirements. The latest version of Autodesk Revit add-in lighting analysis applications are improved with professional computational calculation. Figure 2-7: Pseudocolor display of calculated illuminance using Elum tools for an office room. (Jasim Farooq, Paawan Sharma1 and Sreerama Kumar, 2017) Interface check application is another very useful tool in Autodesk Revit for the cooperation of MEP systems including false ceiling, finding design error, and detecting clashes between components. After finishing checking process, the clashes between corresponding category parameters are offered and significant corrections are done. For example, when a lighting fixture overlapped with a heating, ventilation and air conditioning (HVAC) duct, there is a warning message could be generated automatically (Fig. 2-8). This is an automatically detected process by the tool when users run an interface check application and clash report offers the ID number of overlapping elements. After clicking ‘show’ button, it is going to show the precisely location of the clash elements. 18 Figure 2-8: An instance of overlapping detection using Revit clash detection tool. (Jasim Farooq, Paawan Sharma1 and Sreerama Kumar, 2017) 2.2.2 Requirements of BIM Based Electrical System Design and Application A BIM should contain realistic wall, furniture and windows details, ceiling details etc. Additional items need to be added for electrical engineering requirements, for example, power outlets, electrical outlets. Currently, BIM managers are becoming prequalification of architecture, engineering and construction (AEC) for competition (Jasim Farooq, Paawan Sharma1 and Sreerama Kumar, 2017). The major requirement of BIM project in electrical engineering design is the database information system that supports 3D model of power, lighting, low current and cable routing system. The main BIM project based electrical system design and application includes electrical, mechanical, and plumbing coordination, daylight analysis, renewable energy potential assessment, circuit checking and integrated energy analysis (Autodesk Revit Online, 2017). Electrical power system can also be developed by building information system linking realistic visualization of power distribution systems which is similar with lighting applications. It is possible for electrical designers to prepare systems for conduits with fittings, cable tray bus duct and draw in scale with an automatically routing option. By operate of data and logical concept, a panel board schedule is linked with system’s corresponding loads. In electrical BIM application, it can include functions that automatic circuit capacity calculation, panel board auto balance, identification of components. BIM based building project with electrical settings such as electrical distribution system, voltage, and wire type during developed, drafting and calculation gets easier. 2.2.2 How BIM Interacts With Other Tools A plugin is one software’s application that can be installed on a program to improve its own capabilities. For example, if users want to watch a video source on a website, it is necessary to add a plugin to play it because the browser doesn’t have the related tools it needs. An Revit API application is created as a Revit external plug-in for retrieving model’s information from a BIM model, such as total lighting fixture’s number, total kVA, kW of all lighting fixtures and power factor for an electrical model and so on (Fig. 2-9). 19 Figure 2-9: Existing Featured Revit API The Autodesk Revit API can only be used in Autodesk Revit. It cannot load into other software. There are two types of DLLs file that programming developer can code with the Autodesk Revit API and one type of tool can cooperate with BIM system. DLL stands for “Dynamic Link Library.” A DLL (.dll) document has a library of requirements and other database information can be available for a software program. When the program is launched, the necessary .dll document can be linked to the program (Christensson, P. 2006). 1. External Commands Autodesk Revit enables developers to add new commands to the task interface of Autodesk Revit. Those commands are easy control orders to realize drawing functions, such as copy and paste one group furniture. They have access to using selected elements and Autodesk Revit database. Autodesk Revit commands appear under the ‘External Tools’ after click the Add-ins tab (Fig.2-10). Figure 2-10: External Commands added to Revit 2. External applications Autodesk Revit also allows developers to add new applications. After Autodesk Revit startup and shutdown, these Revit API applications can be invoked. Developers can create new symbols in the Add-Ins tab (Fig.2-11). Developers can also make handlers that is able to trigger to actions occurring in the Revit interface. 20 Figure 2-11: External applications added to Revit 3. Revit Extension addins Revit extension is an API interface that lets developers create applications for Autodesk Revit, which is similar to IExternalCommand but more complex. Revit Extension offers a higher level development environment based on resources. As a Revit extension addin, it can create and display dialog box automatically. It has its own libraries with geometry and units. A Revit extension addin has a standard mechanism for cooperating with Revit application objects. As previously mentioned, Dynamo is a visual programming application that lead to be accessible to programmers and non-programmers alike that allows users to access the Revit API.. Electrical engineer can use Dynamo to manage specialty equipment in a Revit project. During the design phases of a project, the equipment to be installed in the project is constantly changing when project has different or add equipment. This can change the infrastructure necessary to support that equipment. For electrical engineer, this means changes in power requirements need to be constantly checked. Dynamo can be used to manage this problem. This script uses three sources of information. A spreadsheet from the specialty equipment consultant that lists all the equipment (Fig 2-12). Fig 2-12: list all the equipment in Revit (Brett Young, 2017) A Revit file from the same electrical consultant that places this equipment in a model and the electrical model. This Dynamo script looks at this information and places new receptacles with the appropriate power requirements when there’s add equipment (Fig 2-13). 21 Fig 2-13: change equipment parameters (Brett Young, 2017) The script reads in the three sources of information does the comparison and then adds the receptacles. This script currently adds the receptacles over the equipment it serves and allow the user to locate the receptacle on the wall. It can also note that the receptacle and the equipment reference each other with a parameter name and the load on the receptacle is input from the specialty equipment consultant spreadsheet. Using this method, users can refresh model and keep it current with the right electrical equipment loads in just a few moments using Dynamo (Fig. 2-14). Figure 2-14: Case Study for Dynamo in Electrical Engineering (Brett Young, 2017) In summary, Revit offers two major ways to write scripts and plug-ins through text based programming and visual programming (Dynamo). The Revit API through the text based programming offers more features. 2.3 BIM Electrical Engineering Tools BIM electrical engineering tools allows users to do electrical design and calculation inside BIM software. Those tools let designers do some parts of design process efficiently to reduce design time (Table 2-2). This part is mainly introducing this three classical tools of BIM associated with electrical engineering: ETAP, Ecodial Plugin, and Rush Forth. Table 2-2: BIM Electrical Engineering Tools Name Website Brief Description SLD Panel Board Schedul e 3D Wiring External Comman d External Applicatio n Revit Extensio n ETAP https://etap.com / Power System Modeling, √ × × × √ 22 Analysis and Optimization Ecodial Plugin https://apps.aut odesk.com/AC D/en/Detail/Ind ex?id=5519941 493406648013 &appLang=en& os=Win32_64 Power System Calculation and Designs √ × × × × √ Rush Forth http://www.rush forthprojects.co m/ Link Revit to Excel; Manage shared parameters; Extract Excel data or draw table formatting as drafting view; Facilitate 3D section creation; Automate project view and sheet setup × √ × × × √ Automa tic Conduit https://apps.aut odesk.com/RV T/en/Detail/Ind ex?id=2279463 784541960192 &appLang=en& os=Win64 Creating power circuits and connecting fixtures with conduits instead of Autodesk Revit default 2D wire × × √ × × √ Panel Schedul e to Excel https://apps.aut odesk.com/RV T/en/Detail/Ind ex?id=6000083 299624335217 &appLang=en& os=Win64 Exporting electrical panel schedules to anExcel workbook × √ × × √ × MagiCl oud https://apps.aut odesk.com/RV T/en/Detail/Ind ex?id=2213357 945951438805 &appLang=en& os=Win64 Online tools for selecting and configuring manufacturer- specific MEP products × × × × √ × Light Distribu tion https://apps.aut odesk.com/RV T/en/Detail/Ind ex?id=6201292 267814405089 &appLang=en& os=Win64 Distribute Lighting Fixtures and devices (including communication devices) in × × × × √ × 23 rooms and automatically align the distribution FilterO K PRO https://apps.aut odesk.com/RV T/en/Detail/Ind ex?id=5268926 521477150714 &appLang=en& os=Win64 Helping users to find the necessary elements in a model according to certain parameters. × × × × √ × Greenle e BendW orks https://apps.aut odesk.com/RV T/en/Detail/Ind ex?id=2898702 232604983810 &appLang=en& os=Win64 Error Checking, Material Optimization, Bill of Material Accuracy , Automated Calculations for Bending Operator × × × × √ × Placing Light https://apps.aut odesk.com/RV T/en/Detail/Ind ex?id=5964052 945335203541 &appLang=en& os=Win64 Inserting the light and distributing it in standard distribution “X- 2X-X” "Y-2Y- Y". × × × × √ × 2.3.1 ETAP ETAP is a professional software for power system modeling, analysis and optimization. It includes electrical single- line diagram function. The ETAP single-line diagram is an interface for generating and managing the building electrical system database used for schematic system visualization (Fig. 2-15). ETAP’s one-line diagram offers complete bus-breaker connection. As a visual network topology, it provides users a visual simulation of building electrical systems. The advantage of method is that it applies ground-breaking technology which is never be used before in a power system software (ETAP Online, 2018). Users can model, manage, and monitor the electrical system as well as implement simulation screens and analyze outcomes and manner. The feature of ETAP single-line diagram includes building intelligent graphics, data block templates for visualizing user-defined properties and results, bus-branch and bus-breaker representation of electrical systems, integrated 1-phase, 3-phase, and DC system, automatic display of energized and de-energized parameters using dynamic continuity check, theme manger with phase, voltage, standard, area, and Grounding/ grounding colors (ETAP Online, 2018). 24 Figure 2-15: SLD from ETAP (Indiamart Online, 2014) ETAP has a method to build SLD automatically in the tool that can drastically decrease the time it takes to build the model. Instead of dragging and manually connecting the components, users just need to click them in the correct order and it will automatically build for users on the interface. Users start by dropping in the utility (Fig. 2-16). Figure 2-16: Add Utility in the Interface Then clicking on bus, transformer, bus again, and drop few loads in the parameter manager panel, the model was built for users on the interface (Fig. 2-17) 25 Figure 2-17: The Case Study of SLD Generation for ETAP There is drawback in ETAP. ETAP single-line diagram can exchange data from Revit to ETAP by using the data already exists in the Autodesk Revit. In that way, it can automatically generate electrical models in ETAP to present calculations and checks. However, the drawback is that after getting the analysis result, electrical engineers still need to draw the single-line diagram in Revit, it is time-consuming (ETAP Online, 2018). 2.3.2 Ecodial Plugin Ecodial Plugin allows users to do electrical design and calculation inside AutoCAD:: it can calculate electrical installation (cable) sizing in accordance with IEC standard, it has short circuit calculation according to IEC standard, it can automatic size and select the circuit breakers with limitation, and it has SLD and calculation results’ outputs (Fig. 2-18). By using Ecodial plugin, designers’ electrical design and calculation job will be more efficient without the repetition to switch between electrical design tools to rework on the SLD due to different design requirements and interface. Just with single click determine cable sizing, voltage drop, short circuit calculation results with automatic sizing, and selection and coordination of circuit breakers (Ecodial Plugin, 2018). 26 Figure 2-18: SLD Generation As soon as users install the plugin, they will have Ecodial Tab appearing in the AutoCAD menu. Click to view Ecodial Plugin Ribbon (Fig. 2-19). Figure 2-19: Ecodial Plugin Ribbon 27 Clicking on New button to open a new project at first. Then, in the New Project interface, users need to enter the file name and enter the project name (Fig. 2-20). Figure 2-20: Create a New Project Then, users need to click the Parameters button to set project parameters, such as network frequency, device selection, cable selection and so on (fig. 2-21). 28 Figure 2-21: Setting Up Project Parameters Then, there are four steps to generate a SLD in AutoCAD. 1. Users need to import Excel file that contains model’s information into AutoCAD, it includes type of load, active power, utilization factor, connection type, cable insulation, length, protection type. 2. Clicking and placing the BLOCKS from SLD palette and selecting electrical devices. 3. Clicking on smart draw and creating a brief SLD easily. 4. Clicking on Net Genie to create the SLD perfectly (Fig. 2-22). After getting the SLD, it allows users to stretch, edit, modify, copy and delete components. But, this tool can only load into AutoCAD; it cannot be loaded in the Autodesk Revit. 29 Figure 2-22: Four Steps to Generate A SLD by Ecodial Plugin 2.3.3 RushForth Rush Forth is a tool for engineers, architects, fabricators, contractors, content providers, or any other Revit users. There are many functions in Rush Forth. Rush Forth can link Revit to Excel and extract Excel data by using formatting table. It can manage shared parameters, facilitate 3D section creation, and automate project view and sheet setup. Taking tagging light fixture as an example, RushForth can start with none selected lighting fixture to tag one lighting fixture by one lighting fixture, or select different lighting fixtures. And then users need to select the interface button for the different types of tags in order to create the certain lighting fixture tag. Therefore, Rushforth could put tags on all selected light fixtures and automatically generate and adjust the orientation of the fixtures’ tags based on lighting fixtures orientation and placement. (RushForth Online, 2013) Electrical fixture circuit tagging function is similar with lighting fixture tagging function. At first, users need to select different electrical devices. And then, start the RushForth tool (Fig. 2-23). Figure 2-23: Tool’s electrical fixture circuit tagger function start interface in RushForth (RushForth Online, 2013) Then, the tool has its own default space for an electrical receptacle and the default spacing is approximate. Users can adjust tag for different electrical devices based on different various sizes (Fig. 2-24). Users need to click button “place tags” to set all the selected fixtures’ tags with circuit number. Users can also select all created tag and select one tag to change the tag’s type. 30 RushForth can merge or move circuits. First, users need to select different elements which are connected to different circuits when start the merge circuits function’s interface (Fig. 2-x). Then, users need to choose one of selected circuits and click the “Merge” button to move all the selected devices to the selected circuits. Or users can also choose the button “select new panel for all” to move the indicated circuits and all the connected elements to one new panel. Figure 2-24: The interface of Tool’s selected circuits function in RushForth (RushForth Online, 2013) All of those three handlers are coming from different manufacturers. What is interesting to notice is that if users put them on the schedule, parameters can be edited from the library. But if users try to type information in these parameters that on these other families, they’re not compatible with the standard library. Therefore, if designers use the parameter scheduler from a schedule, it will automatically jump to the project schedules review tab and jump to the schedule that users are looking at (Fig. 2-25). It can show missing parameters in some of the families. Users can click each air handler to check its manufacture’s name. So, after clicking “add missing parameters to families” button, it will automatically process the families in the project. And adding any missing parameters that are found in the air handling unit schedule. 31 Figure 2-25: Parameter manger in RushForth (RushForth Online, 2013) 2.3.4 The Drawback of Existing Add-ins There are many advantages for current add-ins to improve designers working efficiency. However, it is necessary to develop an integrated tool that uses the model data from floor plan and manually entered data in forms for automatic design generation. ETAP single-line diagram can use the data that already exists in the Autodesk Revit and exchange those data from Revit to ETAP. In that way, it can automatically generate electrical models in ETAP to present calculations and checks the mistakes. However, electrical engineers still need to draw the single-line diagram in Revit after getting the analysis result. This whole designing process is time-consuming (ETAP Online, 2018). Ecodial Plugin allows users to do electrical design and calculation inside AutoCAD. But it can only generate automatic size and select the circuit breakers with discrimination in the AutoCAD. Besides, Ecodial Plugin doesn’t have the function to generate the SLD in AutoCAD. Rush Forth can link Revit to Excel, manage shared parameters, facilitate 3D section creation, extract excel data or create table formatting to offer drafting view and automate project view and sheet setup. All of Rush Forth functions are for information exchange and presentation in different software, it is not accessible for electrical power distribution calculation and design. In a design of organizationally and large complex project, the building information model can link to each part and continuously update during design process when a multitude of consultants are joined with the system’s optimization. When doing costing and estimation for a project, BIM intelligent tools can execute automatically like pivot table of Excel. Therefore, it is possible for designers to design complex electrical power system automatically by connecting BIM information together with the help of API tools. 2.4 Summary Chapter two provided detail information about existing research of BIM, especially for electrical engineering. First, there is a description of current building electrical engineering. It described a design process of electrical engineers’ design ideas for different projects: estimated total building electrical power load, determine electrical services, responsible for location and size of equipment space, all devices and equipment circuited to panels, checks work, cooperate with interior designers, code requirements. Then, many professional attitudes of BIM-based electrical design coordination were presented. BIM in the context of electrical engineering was explained in addition to how BIM interacts with other design tools. In a design of organizationally and large complex project, BIM works on refining the system. The BIM system can link to each part and continuously update during design process when a multitude of consultants are joined with the system’s optimization. Therefore, it is possible for managers to analysis complex electrical system by connecting BIM and analysis application with the help of API tools. The last part of the chapter is a discussion of existing BIM electrical engineering tools. It includes detailed explanation of three BIM electrical engineering tools: ETAP, Ecodial Plugin and RushForth. 32 3. Methodology Visual Studio and Autodesk Revit are the two main software programs that were used for developing MM Electrical Tool. Firstly, .NET Framework is used to generate the application’s interface that allows users can import building’s basic information. Then, SQL stores those data and developer uses data to program logical coding. After finishing the programming process, the application was developed. The algorithms will be described in Chapter 4. This chapters discusses the main parts of MM Electrical tool and how to a user would load the application into Autodesk Revit to realize several functions (Fig. 3-1). Fig.3-1: Methodology Diagram of MM Electrical Tool 3.1 MM Electrical Tool MM Electrical Tool is an application including three parts: data import, data calculation and single line diagram generation (Fig. 3-2). Visual Studio C# is a main software to realize data import and data calculation. MM Electrical Tool is made up of several parts (Fig. 3-2). First, there is a graphical user interface for data import. There are four parameters that MM Electrical Tool wants to get from users (building area, building function, number of floors, and each building floor’s area). After getting building total area and building function, the building total load can be calculate for pre-design process. The primary feeder’s devices size can be selected based on building total load. The number of total building floors and each floor total area can use to decide branch feeder devices size. A case study is described in Chapter 4. 33 Figure 3-2: MM Electrical Tool’s Detail Methodology Diagram Then, objects to talk to a database, the database itself, and an installer. After building an interface, MM Electrical Tool includes an SQL database to store the application data in an organized, interrelated way. Data in a SQL database lives in tables. It can be looked like a spreadsheet. It organizes building information into columns and rows. The columns are the data categories, like a room’s ID, and each row is the data for the room’s detail information, like a room’s function and area. The next step is building calculation program to overwrite the data in SQL database. After successful test, MM Electrical Tool is needed to turn into public application in order to upload the application into Revit. Visual Studio C# packages the application and then show a folder that has Setup.exe in it. The last step is install it in the Revit and run the function of the application. 3.2 Application Design An integrated prototype tool, MM Electrical Tool, was developed that used the model data from floor plan and manually entered data in forms for automatic design generation. Based on the US National Electrical Code and Title 24, electrical single line diagram is determined. MM Electrical Tool automatically generates single line diagram with cable sizing, voltage drop, and circuit breaker sizing in 2D version for Revit. Visual Studio with .NET 3.5 Framework was used to develop the user interface. Users import detail information for the electrical model and let MM Electrical Tool know the basic model parameters. These parameters are loaded into SQL which as a database to restore and manipulate data. Then, MM Electrical Tool as an API was integrated into BIM software and extended to 2D single line diagram. To do this, the MM Electrical Tool has three design parts: add-in sample design, interface design and SLD design (Fig. 3-3). Based on different requirements, there are two methods of add-in designing: external commands and external application. Considering data input order, interface design includes two inputs: basic building basic data and area of each floor. The last part is SLD generation design. Because this part is complicated, it is separated into five detail design parts: SLD outline generation, SLD outline generation, SLD panel board generation, SLD cable label generation, SLD voltage label generation. 34 Figure 3-3: MM Electrical Tool’s Design Workflow 3.2.1 Add-in Design There are two methods for users to load tools: external commands and external application. External commands take the tool as a part of Revit. After using class library to generate .dll programming file that Revit can identify and only load .dll file when opening Revit software (Fig. 3-4). External application takes the tool as an application with its own panel and symbol. When users open Revit software and load the external application at first time, the external application appears like Revit other functions automatically in the future. Figure 3-4: MM Electrical Tool’s Add-in Design 3.2.2 User Interface Design MM Electrical Tool graphical user interface was created in Visual Studio (Fig. 3-5). MM Electrical Tool’s interface is developed by .NET 3.5 Framework that including the picturebox object, toolbar object and data entry objects. Figure 3-5: Interface design of MM Electrical Tool 35 In Visual Studio, there are different types of projects to choose from to develop the tool. The windows form application was chosen, and a new project named (Fig. 3-6). After saving the project, the IDE will create Form1.cs, Program.cs and Designer.cs file. All those files are added to the Solution Explorer window. Form1.cs file contains the C# code that control the behavior of the form. Program.cs has the code that includes the main code to start up the program and displays the form. Form1.Designer.cs curbs the form of interface and all the objects exist at Form1.Design.cs file. Figure 3-6: Building a new project In the Solution Explorer window on the right side of the Visual Studio interface window, right click on “Reference” button and click “Add Reference”. Then, developer clicked the Browse tab and in the “Add Reference” dialog and browse to the Revit installation folder (Fig. 3-7.a). The three reference files from this folder needed to be added. Selecting RevitAPI.dll, RevitAPIUI.dll and Revit DBAPI.dll. Then those three interface DLL documents are used in the project that created already. All the Revit APIs need to be exposed by these reference files and Visual Studio C# can use all of those APIs from those reference files (Fig. 3-7.b). Figure 3-7 (a): Add Autodesk Revit Reference in Visual Studio 36 Figure 3-7 (b): Add Autodesk Revit Reference in Visual Studio For MM Electrical Tool, it has manual transaction mode. A transaction attribute shows the way the transaction need to work. It can be either automatic or manual. In the Autodesk Revit API, transactions are objects that capture the changes to the Revit model. Those changes happened in Revit model can only be presented when there is an active transaction to do. The value of Transactionmode.Manual for the TransactionAttribute asks that Autodesk Revit cannot generate a transaction automatically. For manual mode, developers are responsible for naming, creating, aborting or committing transactions (Fig. 3-8). The first step was interface designing. A SLD diagram generation system asks users to input four parameters of the building: building’s function, building’s total area, building’s total floors and each floor’s total area. The tool is designed an interface that allows users to input these four parameters. Therefore, in program.cs file, developer need to add a class for interface running (REVIT_FAMILY .WPF_Classes.WPF wpf = new REVIT_FAMILY.WPF_Classes.WPF();). 37 Figure 3-8: MM Electrical Tool’s Interface Main Class Code Because the interface includes the data input part, it is necessary to have labels to guide users to put what kind of data in the right position. And it needs to include text box to allow users input data. After finishing all data input process, it needs to have a button to end and save the data into database (Fig. 3-9). Figure 3-9: MM Electrical Tool’s Interface Form Class Code 38 SQL Application Use is used to define the data table, and the data it will store (Fig. 3-10). For database, MM Electrical Tool figures out each type of data when user input from interface. There are many data types: int, bit, nvarchar, datetime and so on. Based on different type of data, database has its own way to sort of those data and calculation them for single line diagram generation using. Figure 3-10: Database design 3.2.3 SLD Generation Design A SLD shows an electrical engineer’s building power distribution process. It includes transformer selection, cable size selection, panelboard size selection, voltage drop calculation and so on (Fig. 3-11). Considering the complication of logical coding, The SLD generation separates into five parts based on different sections of the design process: outline generation, transformer generation, panel board generator, cable label generation, and voltage label generation. More detail about these algorithms are descripted in Chapter 4. 39 Figure 3-11: Single Line Diagram 1. SLD outline generation Users are asked to input how many floors of the building, and then MM electrical tool can generate an outline of SLD that looks like a horizontal tree. The main branch is for guiding transformation location. Each second branch is for guiding each floor’s panelboard location. In the end of each second branch, it shows the floor’s number (Fig. 3- x). There are four coding parts for generating a SLD outline. First of all, it is necessary to create a main program to include all program methods that works for generating a SLD outline. Second part is using Line generation method to introduce the line’s type and color. Third part is creating a geometry plane in Revit application memory that works for locating lines in certain geometry plan. The last section is creating a sketch plan in current active documents that works for locating the certain geometry plan in the current document (Fig. 3-12). 40 Figure 3-12: The Outline of SLD Generation 2. SLD transformer generation After getting the outline of SLD, it is necessary to selection an appropriate transformer based on a building’s total area. The transformer is located at the main branch of outline of SLD, the label of this transformer shows next to the transformer (Fig. 3-13). The coding part of SLD transformer generation will be described in Chapter 4. Figure 3-13: Transformer Design 3. SLD panel board generation The building’s power has three classes: general power usage, lighting power usage, and mechanical power usage. There are three different types of panelboard based on different requirements of power using. When generating the SLD, the three different panelboard can be generated automatically for each floor (Fig. 3-14). The coding part of SLD panel board generation will be described in Chapter 4. 41 Figure 3-14: Panelboard Generation 4. SLD cable label generation In power distribution system, cable take an important role to connect different electrical devices with each and offer power as a bridge. Based on each floor’s total area, the power load for each floor is different and cable size is different. After putting panelboards in the diagram, cables are drawing to connect them and the label of each cable’s size can show next to it (Fig. 3-15). The coding part of SLD cable label generation will be described in Chapter 4. Figure 3-15: Cable Label Generation. 5. SLD voltage label generation Current, voltage and voltage drop can be explained as a garden hose. Voltage looks like the pump pressure offered to the hose. Current looks like water running through the water pipe. Voltage drop is determined by the size and type of the electrical wire resistance that looks like the resistance of a water pipe is determined by the size and type of the water pipe. When cables carry current, the inherent resistance has a big impact on power efficiency. Voltage drop happens all or part of a branch circuit because of the inherent resistance. It can be considered as total voltage loss. Excessive voltage drop can lead to motors to run hotter and break, heaters to heat inefficient, and lights to flicker or burn dimly. Therefore, the voltage drop label of each circuit shows next to circuits (Fig. 3-16). The coding part of SLD voltage label generation will be described in Chapter 4. 42 Figure 3-16: Voltage Drop Label Generation 3.3 Summary MM Electrical Tool is a tool based on electrical engineering standard to generate SLD automatically (Fig. 3-117). It was developed with Visual Studio C# and Autodesk Revit 2018. It can be loaded into Autodesk Revit and run, store values, and create a single line diagram. The calculations to create the SLID based on the user input will be described thoroughly in Chapter 4. Figure 3-17: MM Electrical Tool’s SLD Generation 43 4. Methodology-Calculation A single line diagram is the blueprint for power distribution analysis. It is the first step for preparing an electrical design plan, allowing engineers to become thoroughly familiar with the electrical system layout and design in building facility. Whether a house has a new or existing facility, the single line diagram is the vital roadmap for all future testing, service, and maintenance activities. Therefore, the single line diagram is a balance document for building facility and offers a snapshot of building facility at a moment in time. The single line diagram needs to be changed as building facility changes to make sure that electrical system is adequately protected. To make all the changes recorded in a common file, creating the electrical system feasibly understandable for any technical person, it is necessary to generate a single line diagram. An up-to-date single line diagram is significant for a variety of service conditions including short circuit calculations, load flow studies, coordination studies, safety evaluation studies, electrical safety procedures, all other engineering studies, and efficient maintenance. Chapter 4 illustrates MM Electrical Tool’s methodology of calculation parts. A typical package of single line diagram includes the main feeder and branches. The main feeder has a utility transformer that will be provided by the local electrical utility and main switchboard that is the distribution panel. Branches include the panelboard that is used for power distribution in each floor, incoming lines showing voltage and size, incoming main breaker, power transformers, relays, feeder breakers, all main cable with their associated isolating switches, a load schedule for each distribution panels and switch board, all connected load with their individual load capacity and all spare switches (Fig 4-1). Figure 4-1: logical workflow of single line diagram The logical methodology order is total load calculation, transformer selection, electrical switchboard selection, panelboard selection, cable size selection, voltage drop calculation, breaker selection and ground protection design (Fig. 4-2). All of formulas working for those calculations come from: National Electrical Code, Electric Power Distribution handbook and Open Electrical, which is a free online resource for power systems engineers. 44 Figure 4-2: Workflow of Chapter 4 4.1 Total Load Calculation and Transformer Selection An electrical transformer is a device that is used to change voltage output. It can convert voltage either up or down. But the transformer would not change the available power in the circuit and would not change the frequency, for example engineers cannot try to put 50 Hertz in and expect 60 Hertz out of a transformer. And transformers only work on alternating current (AC) (Fig. 4-3). Figure 4-3: Transformer and Symbol The selection of a transformer depends on the expected maximum demand (connected load) and the power simultaneity factor. Based on the standard of power distribution system for building, the SLD shows the total load requirement and each floor’s load requirement for the building. Considering a building’s function, there are different requirements of average power demand and simultaneity factor for a building (Table 4-1). Total of Excepted Maximum Building Load Requirement: 𝑃 𝑀𝑎𝑥 .𝑙𝑜 𝑎𝑑 = 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑝𝑜𝑤𝑒𝑟 𝑑𝑒𝑚𝑎𝑛𝑑 × 𝑇𝑜𝑡𝑎𝑙 𝐵𝑢𝑖𝑙𝑑𝑖𝑛𝑔 𝐴𝑟𝑒𝑎 (From Open Electrical Online) Load requirement in kVA at simultaneity factor: 𝑃 𝑏𝑢𝑖𝑙𝑑𝑖𝑛𝑔 .𝑙𝑜𝑎𝑑 = 𝑃 𝑀𝑎𝑥 .𝑙𝑜𝑎𝑑 × 𝑆𝑖𝑚𝑢𝑙𝑡𝑎𝑛𝑒𝑖𝑡𝑦 𝑓𝑎𝑐𝑡𝑜𝑟 (From Open Electrical Online) Table 4-1: power demand for a building(Siemens AG 2016) 45 Based on the total load requirement which is𝑷 𝒃𝒖𝒊𝒍𝒅𝒊𝒏𝒈 .𝒍𝒐𝒂𝒅 , a transformer size can be selected for SLD. For example, suppose a commercial building had an total building area of 300 m 2 , average power demand is 30 W/m 2 , then total of excepted maximum building load requirement would be 𝑃 𝑀𝑎𝑥 .𝑙𝑜𝑎𝑑 = 300 𝑚 2 × 30 W 𝑚 2 = 9,000𝑊 . Load requirement in kVA at simultaneity factor would be 𝑃 𝑏𝑢𝑖𝑙𝑑𝑖𝑛𝑔 .𝑙𝑜𝑎𝑑 = 9,000𝑊 × 0.4 = 3.6𝑘𝑉𝐴 . Transformer’s size would be 3.6kVA. When realizing transformer selection in MM Electrical Tool, there are two sections for coding parts (Fig. 4-4). The first coding section’s function is finding the correct transformer family and loading the certain transformer in Revit. The second coding section is working for locating the certain transformer in the right location in Revit. 46 Figure 4-4: The Coding Part of Transformer Generation 4.2 Electrical Switchboard and Panelboard Selection During power distribution design process, the electrical switchboard is mainly used for directing power from supply sources to smaller regions of custom electricity usage. A switchboard is an assembly device of several panels that each of which includes switches that let electricity to be redirected. In the U.S. National Electrical Code (NEC), the definition of a switchboard is a large single panel enclosed frame or the gathering of panels on which are mounted on the wall face back or both switches over currents, instruments and usually protective devices. Therefore, the function of a switchboard is to offer the separation of the large current supplied to the switchboard into smaller current for the second power distribution. Switchboards also need to meter various current and offer switching current protection. Generally, it may distribute electricity to control equipment, panelboards, and ultimately to division system power loads. There would be one or more than one bus bars in a switchboard (Fig. 4-5). Figure 4-5: Panelboard and Symbol To calculate the main switchboard size, electrical engineers use a watt/ft ² to estimate (Table 4-2). For large buildings, there is usually one main panelboard for each floor; one can also use decide the size of each floor’s panelboard based on each floors total load. 47 Table 4-2: Nominal Watts per S.F. for Electric System for Various Building Types (Electrical Costs with Rsmeans Data, 2019) When realizing panel board selection in MM Electrical Tool, there are two sections for panel board coding parts (Fig. 4-6). The first coding section’s function is finding the appropriate size of panel board family and loading in Revit. The second coding section is working for locating the certain panel board in the right location in Revit. 48 Figure 4-6: The Coding Part of Panel Board Generation 4.3 Cable Size Selection and Voltage Drop Calculation The basic characteristics of the cable’s physical construction includes conductor material, conductors shape, conductor type, conductor surface coating, insulation type and number of cores (Fig. 4-7). Figure 4-7: Cable Construction and Symbol Cable sizing selection methods are different based on different electrical design standards, and some electrical standards focus on certain limitations over others. The MM Electrical Tool designs SLD only based on the NEC code. It is necessary to select proper size of an electrical cable to make sure the cable can operate continuously under full load without being damaged, withstand the worst short circuits currents flowing through the cable, provide the load with a suitable voltage and ensure operation of protective devices during an ground fault. All cable sizing selection methods less or more follow the similar basic six steps (Open Electrical Online, 2017): 1. Gather data about the cable, the load that it will carry, its installation conditions, etc. 2. Determine the minimum cable size based on continuous current carrying capacity. 3. Determine the minimum cable size based on voltage drop considerations. 4. Determine the minimum cable size based on short circuit temperature rise. 49 5. Determine the minimum cable size based on ground fault loop impedance. 6. Select the cable based on the largest of the sizes calculated in step 2, 3, 4 and 5. 4.3.1 Data Gathering The first step is to get the relevant data that is foundational information to use for the cable sizing calculation. Load is one important element to decide the cable size. There are many things that can influence the load in one cable (Open Electrical Online, 2017): 1. Load type: motor feeder. 2. Three phase, single phase, or DC. 3. Source voltage. 4. The full load current is measured in amperes (A). 5. Full load power factor 6. The units for locked rotor or load starting current are amperes (A). 7. Starting power factor. 8. The distance of cable run from source to load. This parameter is important; the length should be as close as possible to the actual route of the cable and include enough contingency for voltage drop/rises. 4.3.2 Base Current Rating The component parts that make up the cable (e.g. conductors, bedding, sheath, insulation, etc.) must be capable of withstanding the temperature rise and heat generated from the cable. The current carrying capacity of a cable is the maximum current that can flow continuously though a cable without damaging the cable’s insulation and other components. It is sometimes also referred to as the continuous current rating or ampacity of a cable. Cables with larger conductor cross-sectional areas have lower resistive losses and are able to dissipate the heat better than smaller cables. Therefore, a 16 mm 2 cable will have a higher current carrying capacity than a 4 mm 2 cable. When the proposed installation conditions differ from the base conditions, correction factors can be applied to the base current ratings to obtain the actual installed current ratings. IEC provides correction factors for a range of installation temperature (Table 4-3). Table 4-3: Ampacity Correction Factors (NEC Code 2017) The installed current rating is calculated by multiplying the base current rating with each of the correction factors: 𝐼 𝑐 = 𝐼 𝑏 × 𝐾 𝑑 (From Open Electrical Online) Where 𝐼 𝑐 is the installed current rating (A); 𝐼 𝑏 is the base current rating (A); 𝐾 𝑑 is the product of all the correction factors. For example, suppose a cable had an ambient temperature correction factor of 𝐾 𝑑 = 0.94, a base current rating of 42A, the installed current rating would be 𝐼 𝑐 = 0.94 × 42 = 39.48A. When sizing cable for load, the upstream protective device (fuse or circuit breaker) is typically selected to also protect the cable against damage from thermal overload. The protective device must therefore be selected to exceed the full load current, but not exceed the cable’s installed current rating: 𝐼 𝑙 ≤ 𝐼 𝑝 ≤ 𝐼 𝑐 (From Open Electrical Online) 50 Where 𝐼 𝑙 is the full load current (A); 𝐼 𝑝 is the protective device rating (A); 𝐼 𝑐 is the installed cable current rating (A). 4.3.3 Cable Impedances A cable’s conductor can be seen as an impedance and therefore whenever current flows through a cable, there will be a voltage drop across it. The voltage drop will depend on two parameters: 1. Current flow though the cable – the higher the current flow, the higher the voltage drop; 2. Impedance of the conductor – the larger the impedance, the higher the voltage drop. The impedance of the cable is a function of the cable size (cross-sectional area) and the length of the cable. Most cable manufacturers define a cable’s reactance and resistance in Ω/km. For a three phase system: 𝑉 3∅ = √3𝐼 (𝑅 𝑐 𝑐𝑜𝑠 ∅+𝑋 𝑐 𝑠𝑖𝑛 ∅)𝐿 1000 (From Open Electrical Online) Where 𝑉 3∅ is the three phase voltage drop (V); 𝐼 is the nominal full load or starting current as applicable (A); 𝑅 𝑐 is the ac resistance of the cable ( Ω/km); 𝑋 𝑐 is the ac reactance of the cable ( Ω/km); 𝑐𝑜𝑠 ∅ is the load power factor (pu); 𝐿 is the length of the cable (m). For a single phase system: 𝑉 1∅ = 2𝐼 (𝑅 𝑐 𝑐𝑜𝑠 ∅+𝑋 𝑐 𝑠𝑖𝑛 ∅)𝐿 1000 (From Open Electrical Online, 2018) Where 𝑉 1∅ is the single phase voltage drop (V): 𝐼 is the nominal full load or starting current as applicable (A); 𝑅 𝑐 is the ac resistance of the cable ( Ω/km); 𝑋 𝑐 is the ac reactance of the cable ( Ω/km); 𝑐𝑜𝑠 ∅ is the load power factor (pu); 𝐿 is the length of the cable (m). 4.3.4 Maximum Permissible Voltage Drop It is customary for standards to specify maximum permissible voltage drops, which is the highest voltage drop that is allowed across a cable. Considering this maximum permissible voltage drop, then a larger cable size should be selected. Maximum voltage drops across a cable are specified because load consumers will have an input voltage tolerance range. This means that is the voltage at the appliance is lower than its rated minimum voltage, then the appliance may not operate correctly. In general, most electrical equipment will operate normally at a voltage as low as 95% nominal voltage. For example, if the nominal voltage is 230 VAC, then most appliances will run at >218.5 VAC. Cables are typically sized for a more conservative maximum voltage drop, in the range of 5% at full load. 4.3.5 Short Circuit Temperature Rise During a short circuit, a high amount of current can flow through a cable for a short time. This surge in current flow causes a temperature rise within the cable. High temperatures can trigger unwanted reactions in the cable insulation, sheath materials and other components, which can prematurely degrade the condition of the cable. As the cross sectional area of the cable increases, it can dissipate higher fault currents for a given temperature rise. Therefore, cables should be sized to withstand the largest short circuit that it is expected to experience. 51 As the NEC code, the cable size can be determined per table (Table 4-4). Firstly, It is necessary to determine the termination temperature ratings of connectors. Generally, this is 60 degrees C for ampacities 100A and below and 75 degrees C for ampacities greater than 100A. For example, if the temperature ratings of the connectors are 75 degrees C and the type of cable is THHN, the cable material is copper, and the current is 150A. A 1/0 AWG cable will be selected. Table 4-4: Allowable Ampacities of Insulated Conductors Rated Up to and Including 2000 Volts, 60° C through 90° C (140° F through 194° F) (NEC Code 2017) 4.4 Breaker Selection Circuit breakers are automatically controlled switches to protect the electrical circuit from damage that caused by short circuit or overload (Fig. 4-8). Circuit breakers basic function is to check a fault condition and disconnect electrical flow when comes across damage. A circuit breaker could be reset with automatically or manually control to resume normal operation. The circuit breaker should check a fault situation. For a low voltage circuit breaker, it is usually done with the breaker enclosure. For a circuit breaker with high voltages or large current is usually worked with pilot electrical devices to detect fault situation. Once a fault is sensed, the circuit breaker must open in order to disconnect the circuit. Small circuit breakers could be manually controlled. Large electrical units have solenoids to connect with the mechanism, and electrical motors can restore current to the springs. 52 Figure 4-8: Circuit Breaker and Symbol There are three different types of circuit breakers: low voltage circuit breakers, medium voltage circuit breakers, and high voltage circuit breakers. Low voltage circuit breakers are made for direct current (DC) applications and are commonly used in domestic, commercial, and industrial fields. Miniature circuit breakers (MCB) and molded case circuit breakers (MCCB) are some common types of low voltage circuit breakers. Medium voltage circuit breakers need to be assembled into enclosed switchgear line up for indoor applications. Air circuit breakers and vacuum circuit breakers are some examples of medium voltage circuit breakers. High voltage circuit breakers are mainly used for controlling and protecting electrical power transmission networks. They are solenoid controlled and are cooperated with current sensing protective relays that protecting current transformers. (Open Electrical Online, 2017) The International Electrical Code (IEC) supports that a circuit breaker need to handle 80% of rated capacity for total continuous loads that being about three or more than three hours. After calculating the total current of one circuit, the designer must think the 80% rule. For example, a total current of 24 A, the calculation is 24A*1.25=30A. When realizing breakers selection in MM Electrical Tool, there are two sections for breakers coding parts (Fig. 4-9). The first coding section’s function is finding the appropriate size of breakers family and loading in Revit. The second coding section is working for locating the certain breaker in the right location in Revit. Figure 4-9: The Coding Part of Breakers Generation 53 4.5 Ground Protection Design- Grounding System The Grounding system is the total setting of method used to connect an electrical unit device too ground. The Grounding system is an necessary part of power protection at both low and high voltage levels. A right grounding system has four requirements: 1. Protection of buildings and installations against lightning 2. Safety of human and animal life by limiting touch and step voltages to safe values 3. Electromagnetic compatibility 4. Right operation of the electricity supply and to make sure good power quality. There are five Grounding systems: TT systems, TN-S system, TN-C-S system, TN-C system and IT system. “T” stands for that one or more supply point are directly grounded. “I” stands for the supply system has not point to ground. “N” stands for all metal electrical devices are connected directly to the ground. “C” stands for ground and neutral conductor system are connected into one single conductor. “S” stands for ground and neutral are separated with each other. 4.5.1 TT System In a TT system, the local provides the consumer the protective ground connection to ground, independent of any ground connection at the generator (Fig. 4-10). The big advantage of the TT system is that it is clear of low and high frequency noises that come through the neutral point from each electrical device. In this way, “TT” is preferable for special systems like telecommunication sites. Because the TT system has a ground connection that is the neutral part, the ground connection point that at the supply source separates with the exposed conductive parts connection and connects to ground directly. A TT system has no risk of a broken neutral. Figure 4-10: TT System 4.5.2 TN System In a TN system, one of the circuit point in the transformer or generator is connected with ground. The enclosed metal electrical device is connected with ground by this ground connection in the transformer (Fig. 4-11). 54 Figure 4-11: TN System 4.5.3 TN-C The conductor that connects the exposed metallic device part of the consumer is named protective ground (PE). The conductor that carries the return current in a single-phase system, or that connects to the star point in a three-phase system is called neutral (N). TN-C system is a combination with PE and N conductor that fulfills the features of both an N and a PE conductor. TN-C system is rarely used in a real design. 4.5.4 TN-C-S The Grounding system separate into two parts: part of the system uses a combination PEN conductor, part of the system split up into separate N and PE conductors in fixed indoor wiring and flexible power lines. The combination PEN conductor generally happens between the entry point into the building and the substation. Then it separates in the building distribution point (Fig. 4-12). MM electrical Tool’s uses TN-C-S to protect the building and offer high quality power. 55 Figure 4-12: TN-C-S System 4.5.5 IT System In an IT system, the power distribution part has no connection to ground. It only has a high resistance connection. In such Grounding system, an insulation monitoring device needs to be installed to control the impedance (Fig. 4-13). Figure 4-13: IT System When realizing grounding system selection in MM Electrical Tool, there are two sections for grounding system coding parts (Fig. 4-14). The first coding section’s function is finding the grounding system and loading in Revit. The second coding section is working for locating grounding system in the right location in Revit. 56 Figure 4-14: The Coding Part of Grounding System Generation 4.6 Summary MM Electrical Tool is a tool based on National Electrical Code to design SLD system automatically. The logical calculation includes the total load calculation, transformer size selection, panelboard and switchboard size selection, cable size decision, voltage drop calculation, and grounding system selection. The entire calculation process was done in Visual Studio C#. The entire code is located in Appendix A. Chapter 5 gives a case study on how the tool is actually used. 57 5. Running the Application The MM Electrical Tool includes four main parts: plug-in package built, a loading method for Revit, data input, and a process for running drawing .dll document in Revit (Fig. 5-1). A user interface provides a feasible way to let users enter data. A database retain data from interface and analysis data by database calculation process. A plug-in package allows application to be installed in any computer. A loading method offers a bridge to connect the application with Revit. Figure 5-1: Workflow of application 5.1 Plug-in Package Built – Getting MM Electrical Tool Ready to Use MM Electrical Tool is an application that runs in Autodesk Revit version 2018. There are three steps for a plug-in package using (Fig. 5-2): download the tool file that is a zip document, select a position for the tool document, and unzip the tool document in that position. Figure 5-2: Loading the software on the hard drive First, a user gets a zip folder called MM Electrical Tool. That folder has several items in it used for installation. The application file is where all the supporting files for the installer are stored. After users get the zip file, the location for putting the zip document is depends on the users. For the case study, the zip file is saved in F:\ (Fig. 5-3). Figure 5-3: The location of MM Electrical Tool zip file The second step is unzipping the MM Electrical Tool’s zip file. The unzipped file that contains all the supporting files for the installer can also be located in the F:\ (Fig. 5-4). 58 Figure 5-4: Unzipped MM Electrical Tool zip file After unzipping the MM Electrical Tool file, all the supporting files can be found in the unzip document that contains C## code (Fig. 5-5). After open each folder, there are the .dll files. Users need to load those files when open the Revit. There is a detail description for how to load those files in the next part. Figure 5-5: Unzipped supporting files 5.2 Loading in Revit MM Electrical Tool has to be loaded into Autodesk Revit to run. Autodesk Revit has to be launched first. Because MM Electrical Tool is a tool for electrical system design, it is necessary to make sure all electrical devices families already loading in the active view in Autodesk Revit (Fig. 5-6 and Fig. 5-7). 59 Figure 5-6: Loading Electrical Devices Families in Autodesk Revit. 60 Fixture 5-7: All families that need to load in Revit When the user launches the external command defined by the plug-in MM Electrical Tool, the add-in bar in Revit presents the prompt string (Fig. 5-8 (a)). 61 Figure 5-8 (a): Loading in Revit as External Commands After clicking Add-In manager button, Autodesk Revit opens the Add-In manager automatically. Users need to click “Load” button and select tool’s .dll in right location in computer. Then, the tool is loaded in Add-In manager. Users need to click “Run” button to run the tool in Autodesk Revit (Fig. 5-8 (b)). Figure 5-8 (b): Loading in Revit as External Commands 5.3 The Data Input For the project model, the MM Electrical Tool needs to store four pieces of data: the building function, the building total area, the number of building’s total floor and each floor’s area. So, MM Electrical Tool needs to contain an interface that asks users to enter these. When users load all supporting .dll files in Revit Add-in Manager, users need to select SLD_1_Interface_1.dll in loaded commands section and click “Run” button (Fig. 5-8(b)). 62 Figure 5-8 (b): Loading Data Input Interface in Revit Then, there is a building basic information data input interface jumped up automatically (Fig. 5-9). Fig.5-9 MM Electrical Tool’s interface_1 After filling out all this three information and click “Next”, the next each floor area data input interface is generated (Fig. 5-10). 63 Figure 5-10: MM Electrical Tool’s interface_2 After filling all information of the project in the interface, clicking “Finish” button, the building’s basic information can be saved. 5.4 Running Drawing .Dll In Revit After users input the building’s basic data in the application, users need to select SLD_2_Interface.dll in loaded commands section and click “Run” button (Fig. 5-11 (a)). An SLD’s outline can be generated automatically (Fig. 5- 11 (b)). Figure 5-11 (a): Loading SLD Outline Generation in Revit 64 Figure 5-11 (b): SLD Outline Generation in Revit Because SLD_2_Interface.dll is 114 MB large, it could show a warning scree when loading SLD_2_Interface.dll in the Revit (Fig. 5-12). Then, users need to click “Yes” button. Figure 5-12: A Warning Screen After getting the outline of SLD, it can load the power distribution devices in the SLD. Users need to select SLD_3_Devices.dll in loaded commands section and click “Run” button. An SLD can be generated automatically (Fig. 5-13). 65 Figure 5-13 Single Line Diagram Though, MM Electrical Tool has another two function that could not realize right now. These two functions that wiring diagram and panel board schedule were put in the chapter 6 future work (Fig. 5-14). Figure 5-14: Future work for wiring diagram and panel board schedule 5.5 Summary MM Electrical Tool has four parts to generate a SLD: plug-in package built, a loading method for Revit, data input and a process for running drawing .dll document in Revit. The plugin achieved its basic function. MM Electrical Tool offers a user interface that provides a feasible way to let users enter data. Its plug-in package lets MM Electrical Tool to be installed in any computer. An Add-in Manager tool in Revit provides a method to load MM Electrical Tool in Revit. The MM Electrical Tool still has several shortcomings. For example, the application has not been tested on a real project and perhaps unpredictable input model data results into application failure. Further debugging process is necessary to make the programs more robust. Another possible direction for improving application’s skill is adding more useful functions. These future opportunities will be described in Chapter 6. 66 6. Discussion, Future Work, and Conclusion This chapter includes a discussion of the MM Electrical Tool and considers the potential methods to improve the application. Currently, it is quite popular to use a digital depiction (whether a 3d model or 2d drawings) for construction design. When using BIM in electrical engineering design, the designers have a useful way to present the design idea. However, there are many limitations that exist when designers need to draw the design idea manually. MM Electrical Tool offers electrical engineers an efficiency way to design power distribution system automatically within a building information modeling software program. After learning about some of the limitations of current electrical power distribution design, MM Electrical Tool was developed as a time-saving Autodesk Revit application to generate a SLD automatically. As a Revit API plug-in, it makes use of the model information saved in BIM and uses Autodesk Revit as the designing platform. MM Electrical Tool can help electrical engineers to design power distribution system, probably faster and more accurately than by hand. This tool not only works as a time-saving design tool, but also works as a calculation tool to calculate the appropriate device size and voltage drop. However, there are some current improvements that could be made to this version of the tool and future work to be done to create a better tool. 6.1 Discussion The MM Electrical Tool includes three parts: model information input, logical calculation, and SLD generation in Autodesk Revit. As a main software for coding development, Visual Studio C# was used to create MM Electrical Tool to input model information and logical calculation (Fig. 6-1). This prototype system coordinates with electrical code and devices selection to offer appropriate SLD design. Furthermore, with model information for electrical devices that is manually input by users, the MM Electrical Tool is able to automatically design, and present the final outcome. Figure 6-1: New Methodology Diagram of MM Electrical Tool When starting, two screen interfaces are shown in Revit when users load MM Electrical Tool in Autodesk Revit; it then asks the user to input four items about the building (building function, building total area, the number of building floors and each floor’s total area). After inputting the building’s function and building’s total area, the building’s total power load can be calculated for pre-design phase. In that way, the primary feeder electrical devices size can be determined. Each floor’s total area and the number of building floors help to determine each distribution feeder electrical devices size. Then the SLD is created (Fig. 6-2). 67 Figure 6-2: Single Line Diagram The logical calculation order is total load calculation, transformer selection, electrical switchboard selection, panelboard selection, cable size selection, voltage drop calculation, breaker selection and ground protection design (Fig. 6-3). All of formulas working for those calculations come from: National Electrical Code, International Building Code and Open Electrical, which is a free online resource for power systems engineers. Figure 6-3: Workflow of Logical Calculation Based on building function, total building area, number of building floors and each floor area, the SLD can be generated automatically. The case study results show how accurately and quickly users get the SLD by MM Electrical Tool (Fig. 6-4). MM Electrical Tool includes basic power distribution calculation process: the total load calculation, transformer size selection, panelboard and switchboard size selection, cable size decision, voltage drop calculation and grounding system selection. The entire calculation process was done in Visual Studio C#. Chapter 5 gives a case study on how the tool is actually used. 68 Figure 6-4: Operation Process of MM Electrical Tool 6.2 Fixing Current Problems and Adding Features Although the MM Electrical Tool can realize the basic power design function right now, limitations still exist in MM Electrical Tool, and new features could be added to improve functionality. 6.2.1 Fixing Current Problems To improve the MM Electrical Tool’s functions, there are several problems and limitations that can be fixed: The MM Electrical Tool only includes four building types: commercial building, educational building, medical building and business building. In general power distribution design, there are a lot of different type buildings, such as museums, theaters. Therefore, as an electrical power distribution design, MM Electrical Tool needs to add more different type of buildings to enlarge its usage. After finishing the SLD design, it is necessary to get a summary report load schedule for each distribution panel and switch boards. An electrical load report is the standard of most branch feeders’ electrical devices, such as receptacles, switches and lighting fixtures. This additional feature of the load schedule would make the tool more comprehensive for designers to use. It could be useful to add a more detail grounding system in the MM Electrical Tool. The grounding system in the MM Electrical Tool is a symbol right now; in the future it should include dimensions of the grounding pit, ground electrode size, boring, EEC cable size, and ground lead. 6.2.2 Features In the future, MM Electrical Tool could be upgraded to add more features: Calculating of power distribution system in more detail to generate a better power design system. For example, the MM Electrical Tool doesn’t consider the cable’s material selection. But it is a significant parameter to analyze the cable insulation and the ability to carry current. Creating a 3D SLD in BIM in addition to 2D Calculating voltage drops and labeling them on the SLD Placing the equipment in the correct rooms. Creating architecture plan view single line diagrams Calculating grounding system devices’ size and put them in the correct position Calculating cable sizes and labeling them in SLD Differentiating cable sizes by color and line thickness Creating a panelboard. Each panelboard could have a table that includes the panelboard’s load schedule, when users click one panelboard, this table can show on the screen. Creating a schedule for the electrical devices. Each electrical device could have a table that includes the electrical device’s size and maximum load, when users click one electrical device, this table can show in the screen. 69 6.3 Additional Future Work Longer term future work includes validation with surveys to users, offer other versions to benefit more users, and using the building information model more extensively. 6.3.1 Validation and Survey Every user who has the experience of using software will have different opinions and expectations as to how the software should work. It is impossible to develop an application that let every person be satisfied with. As an application developer, it is necessary to keep in mind the significance of testing the software. Every application has the software specification. A software specification, as brief product specification, is to show the software’s function and features. For the MM Electrical Tool, there is one function and five features. MM Electrical Tool’s function is to generate a single line diagram in Revit. MM Electrical Tool’s features are the total load calculation, transformer size selection, panelboard and switchboard size selection, cable size decision, voltage drop calculation, and Grounding system selection. There are five things need to be considering when doing MM Electrical Tool’s software survey (based on Ron Patton, 2005): 1. Does the MM Electrical Tool generate the right SLD’s outline of a model? 2. Does the MM Electrical Tool get the right size of transformer in SLD? 3. Does the MM Electrical Tool get the right number of each floor’s panelboard? 4. Does the MM Electrical Tool’s SLD can be used in your project? 5. Do the experimental subjects have some suggestions to offer in order to help the software’s developer to improve MM Electrical Tool? A questionnaire survey becomes one of the significant research tools for developers to analyze application’s quality. A software survey will design a questionnaire based on the application’s software specification and send it to professionals. For questionnaire design part, the main design idea focuses on how researchers’ feeling when they use MM Electrical Tool. Researchers need to be selected from different electrical engineering firm randomly. Those electrical engineers include different age range, working experience, and genders. The design of the survey to generate meaningful results would be a complex process. 6.3.2 Offer Other Versions to Benefit More Users Other users besides US electrical engineers could benefit with other versions of the tool. Creating versions with different electrical standards to build a more comprehensive electrical power distribution design tool would be useful. All of MM Electrical Tool’s design process is based on National Electrical Code right now. However, there are a lot of different electrical codes existing in the world such as the Canadian Electrical Code, the Chinese Electrical Code, and so on. In the future, it is necessary to add more code selection in MM Electrical Tool to enlarge it usage area. The MM Electrical Tool also only has English language version. It is also important to develop many language versions in order to allow electrical engineers who come from other countries understand and use it. 6.3.3 Use the Building Information Model More Extensively When model data inputs into application, some mistakes often happen. Therefore, it is useful to develop an application that can allow data input from architecture models directly; such an application can take full advantage of the original model data for electrical design system. Users shouldn’t have to input the model data manually; the tool can let designers avoid making mistakes and saving design time by mining the BIM for the data it needs. In the MM Electrical Tool, users are asked to input building basic information (building function, building total area, the number of building floors and each floor’s total area) manually, but it is possible for MM Electrical Tool to retrieve this building information from the Revit architecture model directly. After finishing the SLD design process, the MM Electrical Tool could use a setting Excel panel board schedule template and locate Revit data into the format. This data could be updated and synchronized back with Revit model. Depending on users’ requirement, MM Electrical Tool could allow customers to add more different types of cables and other electrical devices, such as transformers, breakers, and others. 6.4 Conclusion The MM Electrical Tool was developed as a plug-in of BIM to assist in 2D design for electrical systems, specifically the generation of single line diagrams (SLD). It helps bridge over the costly and unnecessary manual process, because electrical engineers do not have to do the load analysis at first and draw in the software manually. The MM Electrical Tool allows designers to create a single line diagram automatically in Autodesk Revit. It has the potential to make 70 BIM electrical system design easier and more accurate. The main contribution of this tool is to demonstrate by creating a prototype that demonstrated that tools can be developed to work with BIM to aid in electrical engineering design. 71 REFERENCES Aoun, D. G., Yeutter, M., & Hanna, A. S. (December 01, 2014). State of Practice of Building Information Modeling in the Electrical Construction Industry. Journal of Construction Engineering and Management, 140, 12.) Azhar,S., Brown,J., &Farooqui, R. (2009). BIM-based Sustainability Analysis: An Evaluation of Building Performance Analysis Software. 45 th Associated Schools of Construction International Conference, Gainesville. Baxter, D., Gao, J., Case, K., Harding, J., Young, B., Cochrane, S., & Dani, S. (January 01, 2008). A framework to integrate design knowledge reuse and requirements management in engineering design. Robotics and Computer Integrated Manufacturing, 24, 4, 585-593. Brett Young. (2017). Demo: Managing Electrical Systems with Dynamo and Revit, retrieved from: https://www.youtube.com/watch?v=uZO4tGdmmY8 Candela, G. (2015). Taking BIM to the next level. Consulting - Specifying Engineer, Retrieved from http://libproxy.usc.edu/login?url=https://search-proquest- com.libproxy2.usc.edu/docview/1746880451?accountid=14749 Cao, P., Quan, J., Li, X., Zhou, L., & International Conference on Engineering Design and Optimization, ICEDO 2010. (December 01, 2010). Study on the automatic wiring of small mechanical and electrical equipment. Applied Mechanics and Materials, 1332-1335. Chalhoub, J., & Ayer, S. K. (February 01, 2018). Using Mixed Reality for electrical construction design communication. Automation in Construction, 86, 1-10. Cheng, J. C., & Ma, L. Y. (January 01, 2013). A BIM-based system for demolition and renovation waste estimation and planning. Waste Management Pergamon Press-, 33, 6, 1539-1551. Christensson, P. (2006). DLL Definition. Retrieved 2019, Jan 29, from https://techterms.com Corsi, S. (2016). Voltage control and protection in electrical power systems: From system components to wide-area control. Earley, M. W., Sargent, J. S., Coache, C. D., & Roux, R. J. (2011). National electrical code handbook. Quincy, Mass: National Fire Protection Association. ETAP Online. (2018). Electrical Single-Line Diagram, Retrieved from: https://etap.com/product/electrical-single- line evilone17. (2018). retrieved from: https://www.reddit.com/r/cableporn/comments/6w6b5b/how_an_electrical_panel_should_look/ Farooq, J., Sharma, P., & Sreerama, K. R. (January 01, 2017). Applications of building information modeling in electrical systems design. Journal of Engineering Science and Technology Review, 10, 6, 119-128. Fischer, M. A. (April 01, 1993). Automating constructibility reasoning with a geometrical and topological project model. Computing Systems in Engineering, 4, 179-192. Garber, R. (2014). Bim design: Realising the creative potential of building information modelling. Hoboken, N.J: Wiley. Heisig, P., Caldwell, N. H. M., Grebici, K., & Clarkson, P. J. (September 01, 2010). Exploring knowledge and information needs in engineering from the past and for the future – results from a survey. Design Studies, 31, 5, 499- 532. Kensek, K. M. (2015). Integration of Environmental Sensors with BIM: case studies using Arduino, Dynamo, and the Revit API. CSIC - Instituto de Ciencias de la Construcción Eduardo Torroja (IETCC. Lee, C.-H., Tsai, M.-H., & Kang, S.-C. (December 01, 2014). A visual tool for accessibility study of pipeline maintenance during design. Visualization in Engineering, 2, 1, 1-15. Leite, F., & Wang, L. (March 01, 2016). Process Knowledge Capture in BIM-Based Mechanical, Electrical, and Plumbing Design Coordination Meetings. Journal of Computing in Civil Engineering, 30, 2.) Liu, H., Singh, G., Lu, M., Bouferguene, A., & Al-Hussein, M. (May 01, 2018). BIM-based automated design and planning for boarding of light-frame residential buildings. Automation in Construction, 89, 235-249. Marshall, B., Chen, H., & Madhusudan, T. (December 01, 2006). Matching knowledge elements in concept maps using a similarity flooding algorithm. Decision Support Systems, 42, 3, 1290-1306. Miller, D. G. (2012). Using BIM in electrical, power design. Consulting - Specifying Engineer, Retrieved from http://libproxy.usc.edu/login?url=https://search-proquest- 72 com.libproxy2.usc.edu/docview/1081674704?accountid=14749 Navon, R., Shapira, A., & Shechori, Y. (January 01, 2000). Automated Rebar Constructability Diagnosis. Journal of Construction Engineering and Management, 126, 389-398. Open Electrical Online. (2017). Cable Sizing Calculation, Retrieved from: https://wiki.openelectrical.org/index.php?title=Cable_Sizing_Calculation Peng, H. J., & 9th International Symposium on Linear Drives for Industry Applications, LDIA 2013. (October 29, 2013). Discuss on lightning protection of electrical engineering. Applied Mechanics and Materials, 1808-1812. Philips. Lighting (retrieved on 12th Mar. 2017). BIM –Revit Library [Online]. Ron Patton. (2005). “Software testing, Second Edition”. RushForth Online. (2013). RUSHFORTH Tools for Revit, Retrieved from: http://www.rushforthprojects.com/Revit_To_Excel_and_Shared_Parameters_Tools_Documentation.html Sakikhales, M. H., & Stravoravdis, S. (2015). Using BIM to facilitate iterative design. Building Information Modelling (BIM) in Design. Construction and Operations, 149, 9-19. Smeds, J., & Wall, M. (2007). Enhanced energy conservation in houses through high performance design, Energy and buildings, 39, 273-278. Stellman, A., & Greene, J. (2010). Head first C#: [a learner's guide to real world programming with Visual C# and .Net]. Beijing: O'Reilly. United Nations Environment Programme. (2011). Buildings and climate change: A summary for decision-makers. Paris: UNEP DTIE, Sustainable Consumption and Production Branch. Wang, L. (2014). Knowledge formalization and reuse in BIM-based mechanical, electrical and plumbing design coordination in new construction projects using data mining techniques. Wang, L., & Leite, F. (January 01, 2014). Comparison of Experienced and Novice BIM Coordinators in Performing Mechanical, Electrical, and Plumbing (MEP) Coordination Tasks. Yang, G. F., Zheng, H. Y., Ouyang, H., Zhao, J. K., Li, T. S., Zhou, J., & 2013 International Conference on Precision Mechanical Instruments and Measurement Technology, ICPMIMT 2013. (September 03, 2013). A data integration platform research of power grid whole life management based on BIM. Applied Mechanics and Materials, 1935-1939 Zhao, D., Gong, Q., Zhang, X., Liu, Y., & 2013 IEEE Grenoble PowerTech. (June 01, 2013). Automatic generation strategy of single-line diagrams based on grouped-primitives. 1-5. 73 APPENDIX A: Interface Coding Part using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Autodesk.Revit.UI; using Autodesk.Revit.DB; using Autodesk.Revit.Attributes; using Autodesk.Revit.UI.Selection; using Autodesk.Revit.ApplicationServices; using SLD_1_Interface_1.WPF_Classes; using SLD_1_Interface_1.WPF_class; using System.Windows.Forms; namespace SLD_1_Interface_1 { [Transaction(TransactionMode.Manual)] public class Command : IExternalCommand { public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { UIApplication uiapp = commandData.Application; UIDocument uidoc = uiapp.ActiveUIDocument; Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; Document doc = uidoc.Document; DockablePaneProviderData dpdata = new DockablePaneProviderData(); SLD_1_Interface_1.WPF_Classes.UserControl1 wpf = new SLD_1_Interface_1.WPF_Classes.UserControl1(); wpf.combo.Items.Add("Commercial Building"); wpf.combo.Items.Add("Educational Building"); wpf.combo.Items.Add("Medical Building"); wpf.combo.Items.Add("Residential Building"); System.Windows.Window win = new System.Windows.Window(); win.Content = wpf; win.Show(); return Result.Succeeded; } } } using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("SLD_1_Interface_1")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] 74 [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SLD_1_Interface_1")] [assembly: AssemblyCopyright("Copyright © 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("6e864f1c-96ed-416f-be78-84471c7d1420")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{6E864F1C-96ED-416F-BE78-84471C7D1420}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>SLD_1_Interface_1</RootNamespace> <AssemblyName>SLD_1_Interface_1</AssemblyName> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <Deterministic>true</Deterministic> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> 75 <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="RevitAPI"> <HintPath>D:\Program Files\Autodesk\Revit 2018\RevitAPI.dll</HintPath> </Reference> <Reference Include="RevitAPIUI"> <HintPath>D:\Program Files\Autodesk\Revit 2018\RevitAPIUI.dll</HintPath> </Reference> <Reference Include="RevitDBAPI"> <HintPath>D:\Program Files\Autodesk\Revit 2018\RevitDBAPI.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Core" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xaml" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="Microsoft.CSharp" /> <Reference Include="System.Data" /> <Reference Include="System.Net.Http" /> <Reference Include="System.Xml" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> <Compile Include="Main class\Class1.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="WPF class\UserControl1.xaml.cs"> <DependentUpon>UserControl1.xaml</DependentUpon> </Compile> <Compile Include="WPF class\UserControl2.xaml.cs"> <DependentUpon>UserControl2.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Page Include="WPF class\UserControl1.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="WPF class\UserControl2.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project> 76 APPENDIX B: SLD Outline Generation Coding Part using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Autodesk.Revit.UI.Selection; using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.Attributes; namespace Trans { [Transaction(TransactionMode.Manual)] public class SLD_2_Outline_Generation : IExternalCommand { public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { UIApplication uiApp = commandData.Application; Application rvtApp = uiApp.Application; UIDocument uiDoc = uiApp.ActiveUIDocument; Document doc = uiDoc.Document; View vie = doc.ActiveView; using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(-20, 0, 0); ; XYZ endPoint = new XYZ(35, 0, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction1 = new Transaction(doc)) { transaction1.Start("Create Model Line By Me"); 77 XYZ startPoint = new XYZ(0, 10, 0); XYZ endPoint = new XYZ(35, 10, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction1.Commit(); } using (Transaction transaction2 = new Transaction(doc)) { transaction2.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(0, 20, 0); ; XYZ endPoint = new XYZ(35, 20, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction2.Commit(); } using (Transaction transaction3 = new Transaction(doc)) { transaction3.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(0, 30, 0); ; XYZ endPoint = new XYZ(35, 30, 0); 78 Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction3.Commit(); } using (Transaction transaction4 = new Transaction(doc)) { transaction4.Start("Create Model Line By Me"); XYZ startPoint = XYZ.Zero; XYZ endPoint = new XYZ(0, 30, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction4.Commit(); } return Result.Succeeded; } } } 79 APPENDIX C: SLD Transformer Generation Coding Part using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.Attributes; using System.Linq; [TransactionAttribute(Autodesk.Revit.Attributes.TransactionMode.Manual)] public class SLD_3_Transformer_Generation : IExternalCommand { public FamilySymbol GetSymbol(Document document, string familyName, string symbolName) { return new FilteredElementCollector(document).OfClass(typeof(Family)). OfType<Family>().FirstOrDefault(f => f.Name.Equals(familyName))?. GetFamilySymbolIds().Select(id => document.GetElement(id)). OfType<FamilySymbol>().FirstOrDefault(symbol => symbol.Name.Equals(symbolName)); } public Result Execute(ExternalCommandData commandData, ref string messages, ElementSet elements) { UIApplication uiapp = commandData.Application; UIDocument uidoc = uiapp.ActiveUIDocument; Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; Document doc = uidoc.Document; using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Transformer_480Y_277V_3PH,4W", "Transformer_480Y_277V_3PH,4W"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create SLD Transformer instance"); XYZ location = new XYZ(-8.62803077667347, 1.83788092071576, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB. Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Transformer_208_120V_3PH,4W", "Transformer_208_120V_3PH,4W"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create SLD Transformer instance"); XYZ location = new XYZ(13.7664041994751, 26.8071671536826, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); 80 } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Transformer_208_120V_3PH,4W", "Transformer_208_120V_3PH,4W"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create SLD Transformer instance"); XYZ location = new XYZ(16.7191601049869, 13.4383202099738, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Transformer_208_120V_3PH,4W", "Transformer_208_120V_3PH,4W"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create SLD Transformer instance"); XYZ location = new XYZ(22.6377952755906, 4.42257217847769, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } return Result.Succeeded; } } 81 APPENDIX D: SLD Panel Board Generation Coding Part using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.Attributes; using System.Linq; [TransactionAttribute(Autodesk.Revit.Attributes.TransactionMode.Manual)] public class SLD_4_Panel_Board_Generation : IExternalCommand { public FamilySymbol GetSymbol(Document document, string familyName, string symbolName) { return new FilteredElementCollector(document).OfClass(typeof(Family)). OfType<Family>().FirstOrDefault(f => f.Name.Equals(familyName))?. GetFamilySymbolIds().Select(id => document.GetElement(id)). OfType<FamilySymbol>().FirstOrDefault(symbol => symbol.Name.Equals(symbolName)); } public Result Execute(ExternalCommandData commandData, ref string messages, ElementSet elements) { UIApplication uiapp = commandData.Application; UIDocument uidoc = uiapp.ActiveUIDocument; Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; Document doc = uidoc.Document; using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_L1_480_277Wye", "480/277 L1"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(5.23622047244094, 7.70341207349081, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_L2_480_277Wye", "480/277 L2"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(5.23622047244094, 13.4383202099738, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_L3_480_277Wye", "480/277 L3"); 82 Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(5.23622047244094, 26.8071671536826, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_M_480_277Wye", "480/277 M"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(10.1574803149606, 26.8071671536826, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_M3_120_208Wye", "120/208 M3"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(13.7664041994751, 23.1102362204724, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_M2_120_208Wye", "120/208 M2"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(13.7664041994751, 13.4383202099738, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_M1_120_208Wye", "120/208 M1"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(13.7664041994751, 7.70341207349081, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { 83 FamilySymbol fam = GetSymbol(doc, "Panelboard_P21_120_208Wye", "120/208 P21"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(19.3569553805774, 17.3753280839895, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_P22_120_208Wye", "120/208 P22"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(22.6377952755906, 17.3753280839895, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_P31_120_208Wye", "120/208 P31"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(26.246719160105, 26.8071671536826, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_P32_120_208Wye", "120/208 P32"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(28.8713910761155, 26.8071671536826, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_P11_120_208Wye", "120/208 P11"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(26.246719160105, 7.70341207349081, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Panelboard_P12_120_208Wye", "120/208 P12"); 84 Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Panel Board instance"); XYZ location = new XYZ(29.5275590551181, 7.70341207349081, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } return Result.Succeeded; } } 85 APPENDIX E: SLD Breaker Generation Coding Part using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.Attributes; using System.Linq; [TransactionAttribute(Autodesk.Revit.Attributes.TransactionMode.Manual)] public class SLD_5_Breaker_Generation : IExternalCommand { public FamilySymbol GetSymbol(Document document, string familyName, string symbolName) { return new FilteredElementCollector(document).OfClass(typeof(Family)). OfType<Family>().FirstOrDefault(f => f.Name.Equals(familyName))?. GetFamilySymbolIds().Select(id => document.GetElement(id)). OfType<FamilySymbol>().FirstOrDefault(symbol => symbol.Name.Equals(symbolName)); } public Result Execute(ExternalCommandData commandData, ref string messages, ElementSet elements) { UIApplication uiapp = commandData.Application; UIDocument uidoc = uiapp.ActiveUIDocument; Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; Document doc = uidoc.Document; using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_400A_3P", "Breaker_400A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(-4.0348549236551, 1.50979693121445, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_400A_3P", "Breaker_400A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(2.61154855643045, 1.50979693121445, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_50A_3P", "Breaker_50A_3P"); 86 Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(5.23622047244094, 4.42257217847769, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_100A_3P", "Breaker_100A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(10.1574803149606, 4.42257217847769, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_100A_3P", "Breaker_100A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(16.7191601049869, 4.42257217847769, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_100A_3P", "Breaker_100A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(22.6377952755906, 2.95275590551181, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_100A_3P", "Breaker_100A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(26.246719160105, 17.3753280839895, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_50A_3P", "Breaker_50A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; 87 transaction.Start("Create Breaker instance"); XYZ location = new XYZ(28.8713910761155, 17.3753280839895, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_100A_3P", "Breaker_100A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(31.8241469816273, 17.3753280839895, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_50A_3P", "Breaker_50A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(34.4488188976378, 17.3753280839895, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_100A_3P", "Breaker_100A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(31.8241469816273, 4.42257217847769, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Breaker_50A_3P", "Breaker_50A_3P"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Breaker instance"); XYZ location = new XYZ(34.4488188976378, 4.42257217847769, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } return Result.Succeeded; } } 88 APPENDIX F: SLD Grounding System Generation Coding Part using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.Attributes; using System.Linq; [TransactionAttribute(Autodesk.Revit.Attributes.TransactionMode.Manual)] public class SLD_6_Ground_System_Generation : IExternalCommand { public FamilySymbol GetSymbol(Document document, string familyName, string symbolName) { return new FilteredElementCollector(document).OfClass(typeof(Family)). OfType<Family>().FirstOrDefault(f => f.Name.Equals(familyName))?. GetFamilySymbolIds().Select(id => document.GetElement(id)). OfType<FamilySymbol>().FirstOrDefault(symbol => symbol.Name.Equals(symbolName)); } public Result Execute(ExternalCommandData commandData, ref string messages, ElementSet elements) { UIApplication uiapp = commandData.Application; UIDocument uidoc = uiapp.ActiveUIDocument; Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; Document doc = uidoc.Document; using (Transaction transaction = new Transaction(doc)) { FamilySymbol fam = GetSymbol(doc, "Grounding Systeme", "Grounding Systeme"); Autodesk.Revit.DB.View vie = doc.ActiveView; transaction.Start("Create Ground System instance"); XYZ location = new XYZ(-15.0918635170604, 0.813648293963254, 0); FamilyInstance transformer = doc.Create.NewFamilyInstance(location, fam, vie, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); transaction.Commit(); } return Result.Succeeded; } } 89 APPENDIX G: SLD Cable Generation Coding Part using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Autodesk.Revit.UI.Selection; using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.DB; using Autodesk.Revit.UI; using Autodesk.Revit.Attributes; namespace Trans { [Transaction(TransactionMode.Manual)] public class SLD_7_Cable_Generation : IExternalCommand { public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { UIApplication uiApp = commandData.Application; Application rvtApp = uiApp.Application; UIDocument uiDoc = uiApp.ActiveUIDocument; Document doc = uiDoc.Document; View vie = doc.ActiveView; using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(-13.3858267716535, 0.742333679152536, 0); ; XYZ endPoint = new XYZ(-13.3858267716535, -0.662729658792652, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory 90 XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(-8.62803077667347, 0.742333679152536, 0); ; XYZ endPoint = new XYZ(-11.745406824147, 0.742333679152526, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); 91 ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(-8.62803077667346, 3.36700559516302, 0); ; XYZ endPoint = new XYZ(-8.62803077667347, 0.742333679152526, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); 92 XYZ startPoint = new XYZ(-4.03485492365509, 3.36700559516302, 0); ; XYZ endPoint = new XYZ(-8.62803077667346, 3.36700559516301, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(-4.03485492365509, 3.36700559516301, 0); ; XYZ endPoint = new XYZ(-4.03485492365509, 0.742333679152511, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( 93 normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(2.60884586374648, 0.742333679152511, 0); ; XYZ endPoint = new XYZ(-4.03485492365509, 0.74233367915249, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; 94 transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(2.60884586374648, 2.05466963715774, 0); ; XYZ endPoint = new XYZ(2.60884586374648, 0.74233367915249, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(35, 2.05466963715774, 0); XYZ endPoint = new XYZ(2.60884586374648, 2.05466963715763, 0); 95 Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(5.23351777975702, 26.3328848602548, 0); XYZ endPoint = new XYZ(5.23351777975698, 2.05466963715773, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document 96 SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(10.1547776222767, 28.3013887972627, 0); XYZ endPoint = new XYZ(10.1547776222767, 2.05466963715771, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } 97 using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(13.7637015067911, 28.3013887972627, 0); XYZ endPoint = new XYZ(10.1547776222767, 28.3013887972627, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(13.7637015067911, 28.3013887972627, 0); XYZ endPoint = new XYZ(13.7637015067911, 7.04724409448821, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory 98 XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(16.7164574123029, 15.1780292172102, 0); XYZ endPoint = new XYZ(16.7164574123029, 2.05466963715769, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); 99 ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(35, 15.1780292172102, 0); XYZ endPoint = new XYZ(16.7164574123029, 15.1780292172101, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); 100 XYZ startPoint = new XYZ(19.3411293283134, 16.8184491647167, 0); XYZ endPoint = new XYZ(19.3411293283134, 15.1780292172102, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(22.6219692233266, 16.7528323668165, 0); XYZ endPoint = new XYZ(22.6219692233266, 15.1780292172102, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; 101 Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(26.230893107841, 26.3328848602548, 0); XYZ endPoint = new XYZ(26.230893107841, 15.1780292172102, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; 102 transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(28.8555650238515, 26.3328848602548, 0); XYZ endPoint = new XYZ(28.8555650238515, 15.1780292172101, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(31.8083209293633, 17.8027011332206, 0); XYZ endPoint = new XYZ(31.8083209293633, 15.1780292172101, 0); 103 Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(-13.3858267716535, 0.742333679152536, 0); ; XYZ endPoint = new XYZ(-13.3858267716535, -0.662729658792652, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); 104 // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(34.4504593175853, 17.8027011332206, 0); XYZ endPoint = new XYZ(34.4504593175853, 15.1780292172101, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } 105 using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(22.6219692233265, 5.66359352167211, 0); XYZ endPoint = new XYZ(22.6219692233265, 2.05466963715767, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(35, 5.66359352167211, 0); XYZ endPoint = new XYZ(22.6219692233265, 5.66359352167207, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); 106 // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(26.230893107841, 7.10716307547787, 0); XYZ endPoint = new XYZ(26.230893107841, 5.6635935216721, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( 107 doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(29.5117330028541, 7.30401346917865, 0); XYZ endPoint = new XYZ(29.5117330028541, 5.66359352167209, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { 108 transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(31.8083209293633, 4.67934155316814, 0); XYZ endPoint = new XYZ(31.8083209293633, 2.05466963715764, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } using (Transaction transaction = new Transaction(doc)) { transaction.Start("Create Model Line By Me"); XYZ startPoint = new XYZ(34.4329928453738, 4.67934155316814, 0); XYZ endPoint = new XYZ(34.4329928453738, 2.05466963715764, 0); Line geomLine = Line.CreateBound(startPoint, endPoint); // Create a geometry plane in Revit application memory XYZ origin = XYZ.Zero; 109 XYZ normal = XYZ.BasisZ; Plane geomPlane = Plane.CreateByNormalAndOrigin( normal, origin); // Create a sketch plane in current document SketchPlane sketch = SketchPlane.Create( doc, geomPlane); ModelLine modelLine = doc.Create.NewModelCurve( geomLine, sketch) as ModelLine; transaction.Commit(); } return Result.Succeeded; } } }
Abstract (if available)
Abstract
As a digital depiction of construction requirements, Building Information Modeling (BIM) is being implemented in the Architecture and Mechanical, Electrical, and Plumbing (MEP) design process in order to achieve highly efficient design and documentation. Although successful in some respects, BIM is still not being used to its full advantages for electrical design. Electrical engineers still spend time manually doing work that could be automated within BIM. A comprehensive user-friendly tool with features such as automatic generation of single line diagrams would be useful. ❧ Visual Studio with .NET 3.5 Framework was used to develop the user interface for MM Electrical Tool. WPF (Windows Presentation Foundation), which is a graphical user interface framework, is used with the .NET 3.5 Framework. A WPF framework allows developer to create a plugin with a wide usage of graphical user interface elements, such as text boxes, labels, and other elements. Therefore, the WPF framework helps developer to generate a data input interface for users. ❧ As a prototype tool, the MM Electrical Tool uses model data from a floor plan and manually entered data in forms for automatic Single Line Diagram (SLD) design generation. These parameters are loaded into a database to store and manipulate the data. Based on the US National Electrical Code and Title 24, an electrical single line diagram is determined. MM Electrical Tool automatically generates single line diagram with cable sizing, voltage drop, and circuit breaker sizing in 2D view. In its final form, it is a set of Autodesk Revit add-ins that are run in Autodesk Revit. ❧ MM Electrical Tool was developed as a plug-in for Revit as at 2D level for electrical system design. It jumped the costly and unnecessary modeling process, because electrical engineers do not have to do the load analysis at first and draw the results in Revit manually. MM Electrical Tool allows designers produce single line diagram automatically in Autodesk Revit. MM Electrical Tool makes BIM electrical system design easier and more accurate. Future enhancements include the automatic generation of panel board schedules with cable sizing, voltage drop, and circuit breaker sizing.
Linked assets
University of Southern California Dissertations and Theses
Conceptually similar
PDF
Revit plugins for electrical engineering improvements in buildings: Lighting power density and electrical equipment placement
PDF
A BIM-based visualization tool for facilities management: fault detection through integrating real-time sensor data into BIM
PDF
Streamlining sustainable design in building information modeling: BIM-based PV design and analysis tools
PDF
Using building information modeling with augmented reality: visualizing and editing MEP systems with a mobile augmented reality application
PDF
CFD visualization: a case study for using a building information modeling with virtual reality
PDF
Bridging the gap: a tool to support bim data transparency for interoperability with building energy performance software
PDF
Building bridges: filling gaps between BIM and other tools in mechanical design
PDF
Automating fire code compliance using BIM and Revit plug-ins
PDF
Building information modeling based design review and facility management: Virtual reality workflows and augmented reality experiment for healthcare project
PDF
Building information modeling: guidelines for project execution plan (PxP) for India
PDF
A BIM-based tool for accessible design standard plan check: an automated plan review plug-in for Revit focusing on accessible design
PDF
An investigation on using BIM for sustainability analysis using the LEED rating system
PDF
Office floor plans generation based on Generative Adversarial Network
PDF
BIM+AR in architecture: a building maintenance application for a smart phone
PDF
Carbon accounting tool (CAT) in BIM: an embodied carbon plug-in for revit
PDF
Streamlining precast back-frame design: automated design using Revit plugin
PDF
Planning in advance for rehabilitation and restoration using BIM and seismic simulation to record and analyze the Japanese House in Los Angeles
PDF
Precast concrete thin-shell skins: a smart computer tool for generating complex shapes
PDF
Daylight and health: exploring the relationship between established daylighting metrics for green building compliance and new metrics for human health
PDF
Integrating non-visual effects of lighting in the evaluation of electrical lighting designs for commercial offices
Asset Metadata
Creator
Zhou, Mingming
(author)
Core Title
MM Electrical Tool: a tool for generating electrical single line diagrams in BIM
School
School of Architecture
Degree
Master of Building Science
Degree Program
Building Science
Publication Date
04/25/2019
Defense Date
03/22/2019
Publisher
University of Southern California
(original),
University of Southern California. Libraries
(digital)
Tag
BIM,electrical engineering,OAI-PMH Harvest,Revit add-ins,single line diagram
Format
application/pdf
(imt)
Language
English
Contributor
Electronically uploaded by the author
(provenance)
Advisor
Kensek, Karen (
committee chair
), Beshir, Mohammed (
committee member
), Chee, Aaron (
committee member
), Konis, Kyle (
committee member
)
Creator Email
mingminz@usc.edu
Permanent Link (DOI)
https://doi.org/10.25549/usctheses-c89-145195
Unique identifier
UC11662489
Identifier
etd-ZhouMingmi-7257.pdf (filename),usctheses-c89-145195 (legacy record id)
Legacy Identifier
etd-ZhouMingmi-7257.pdf
Dmrecord
145195
Document Type
Thesis
Format
application/pdf (imt)
Rights
Zhou, Mingming
Type
texts
Source
University of Southern California
(contributing entity),
University of Southern California Dissertations and Theses
(collection)
Access Conditions
The author retains rights to his/her dissertation, thesis or other graduate work according to U.S. copyright law. Electronic access is being provided by the USC Libraries in agreement with the a...
Repository Name
University of Southern California Digital Library
Repository Location
USC Digital Library, University of Southern California, University Park Campus MC 2810, 3434 South Grand Avenue, 2nd Floor, Los Angeles, California 90089-2810, USA
Tags
BIM
Revit add-ins
single line diagram