The article presents practical techniques for programming the segmentation of cable support systems using the RevitAPI interface and the VisualStudioComunity programming environment. Segmentation is necessary for the correct layout of cable trays, assessment of their geometry and position in cable support systems.
Programming typical procedures for placing cable trays in the system allows you to quickly arrange trays in the optimal position, taking into account the allowable standard distances between trays. Bracket placement is also an important issue in choosing the optimal cable support system layout.
The RevitAPI SDK contains many common examples for working with Revit objects, but most of these examples only demonstrate general programming capabilities with RevitAPI. As a result of the systematization of segmentation methods, programs were selected to select the optimal tracing of objects in cable support systems and automated selection of the configuration of trays in cable support systems.
Tray databases are located in the Revit project structure and are linked to the actual tray settings through a Shared Settings file that must be connected to Revit projects before you begin. The automated calculation of the layout of cable support systems is based on the use of plug-ins and add-ons to the Autodesk Revit software. Add-ins are tested in Revit 2021 to identify new APIs versus previous API versions.
The VisualStudioCommunity programming environment provides a wide range of methods for processing tray properties and parameters, providing the necessary performance in the process of processing data from Revit projects. This circumstance is important when opening large-sized projects on laptops of average performance, since it is such equipment that is installed at the workplaces of designers. Dynamic libraries connected to projects save laptop memory, since they are used in projects only at the moment of calling the necessary program processing methods.
The advantage of the Visual Studio programming environment over the SharpDevelop debugger and linker lies in the flexible ability to debug API methods, develop high-quality high-speed programs that can function both as separate applications and applications working together with Revit.
Because Revit is designed to build a complete design model with relationships between databases, parameter files, and custom cable tray family IDs, it can be difficult for the end user to understand the software processing and layout of cable support systems.
The developed programs in the C# make it possible to formalize the algorithms for calculating the layouts of cable support systems with the ability to automate the creation of special families for cable trays and the development of typical parametric libraries for trays of different types. Software libraries for assessing the geometric parameters of trays as they are developed increase the efficiency of calculating the layout of cable support systems and allow the designer not to perform segmentation of trays again every time, but to perform the specified procedure once for a certain standard size of the tray and use the calculation results in further projects to select the optimal layouts of cable support systems.