A quick drawing design method and plug-in based on TEKLA secondary development
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2020-12-31
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]钢结构的施工设计是基于TEKLA软件进行的,该软件自身存在一些缺陷,TEKLA初始生成的图纸视图布局较零乱,与制造需求有较大差距,因而需要设计人员对施工详图进行人工调整,锅炉钢结构施工详图数量巨大,从而需要花费大量人力和时间来完成,工作量巨大
[0032] Therefore, the present invention has the following beneficial effects: The present invention establishes a method for rapid drawing generation based on the secondary development of TEKLA software. Through this method, the view positions in the drawing are directly and automatically arranged, which greatly saves the steps and time of manual view arrangement. It solves the problem of the huge workload of TEKLA software drawing generation, which requires a lot of manpower and time, and provides a solution for rapid drawing generation of 3D modeling software.
Smart Images

Figure CN112836249B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of programming technology, and in particular to a rapid drawing design method and plugin based on TEKLA secondary development. Background Technology
[0002] Steel structures are a crucial component of boiler power plants. Each boiler project varies in design due to differences in parameters such as coal quality, load, geological conditions, and technical requirements. Consequently, the steel structure, which is closely integrated with the boiler, also changes accordingly. The design and construction of the boiler steel structure is the first essential step in designing and manufacturing all boiler components. It forms the foundation for boiler installation, and the timely completion of the boiler steel structure installation is directly crucial to the timely completion of the entire boiler project.
[0003] The construction design of the steel structure was based on TEKLA software. However, the software itself has some shortcomings. The layout of the initial drawings generated by TEKLA is rather messy and differs significantly from the manufacturing requirements. Therefore, designers need to manually adjust the construction details. The number of detailed construction drawings for boiler steel structures is enormous, requiring a lot of manpower and time to complete, resulting in a huge workload.
[0004] Visual Studio software allows for secondary development of software. Using the C# language on the .NET platform, secondary development of Tekla software can be performed quickly and easily. Summary of the Invention
[0005] This invention aims to overcome the problem that the initial drawing view layout generated by TEKLA in the prior art is messy and has a large gap with manufacturing requirements. It provides a rapid drawing design method and plugin based on secondary development of TEKLA, which realizes the rapid arrangement of views on the drawing, saves a lot of time in the arrangement of drawing views, improves the efficiency of drawing output, and lays a good foundation for subsequent design and manufacturing.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A rapid drawing generation design method and plugin based on TEKLA secondary development includes the following steps:
[0008] S1: Read drawing file;
[0009] S2: Obtain information about the drawing and all its views;
[0010] S3: Divide the drawing into areas;
[0011] S4: Sort the views;
[0012] S5: Modify the position of the sorted views.
[0013] Furthermore, the specific process of S1 is as follows:
[0014] S1-1: Establish the interface between TEKLA software and VS, with the drawing interface being Tekla.Structures.Drawing;
[0015] S1-2: Initialize the interface from the .NET application to the Tekla struct;
[0016] S1-3: Get the current drawing list. The drawing list is in the drawing list in the toolbar and report.
[0017] S1-4: Select any one or more drawings in the list.
[0018] Furthermore, the specific process of S2 is as follows:
[0019] S2-1: Captures and displays the selected drawing, and reads information from the drawing; specific information includes the drawing's width, height, origin coordinates, and drawing type; there are four drawing types, including AWMG.
[0020] S2-2: Retrieve each view in the drawing and store the views in an enumeration. Get the number of views in the drawing. There are two types of views in the drawing: VIEW and CONTAINERVIEW.
[0021] S2-3: Create view arrays for two view types;
[0022] S2-4: Obtain information for each view. First, determine the view type and capture different information for different types. For VIEW type, capture the view's scale, origin coordinates, height, and width. For CONTAINERVIEW type, capture the view's origin coordinates, height, and width.
[0023] Furthermore, the specific process of S3 is as follows:
[0024] S3-1: Divide the drawing into four modules. The first module in the upper left corner stores VIEW type views, the second module in the lower left corner and the third module in the upper right corner store CONTAINERVIEW type views, and the fourth module in the lower right corner stores the information panel.
[0025] S3-2: For the first module in the top left corner, first define a width variable and a height variable, then define an X-axis proportional relationship variable and a Y-axis proportional relationship variable. When the proportional relationship variable changes, the module width variable and height variable change accordingly.
[0026] Furthermore, the specific process of S4 is as follows:
[0027] Perform bubble sort on the area data for both types of views, placing the view with the larger area at the beginning of the view array, and so on.
[0028] Furthermore, the specific process of S5 is as follows:
[0029] S5-1: Change the position of a VIEW type view by using a nested FOR and IF loop to change the origin coordinates of the entire VIEW type view array;
[0030] S5-2: To change the position of CONTAINERVIEW type views, first consider arranging CONTAINERVIEW type views in the second module from the bottom left. If the module is full, arrange the remaining CONTAINERVIEW type views in the third module from the top right.
[0031] S5-3: If the view is too large or the drawing is too small to fit completely, you can check the "Scale View" option, which will automatically reduce the scale of VIEW type views by 1, while keeping the scale of CONTAINERVIEW type views unchanged. Alternatively, you can check "Automatic Adjustment or Fixed Size of Drawing" to change the size of the drawing so that the drawing and view can adapt to each other.
[0032] Therefore, the present invention has the following beneficial effects: The present invention establishes a method for rapid drawing generation based on the secondary development of TEKLA software. Through this method, the view positions in the drawing are directly and automatically arranged, which greatly saves the steps and time of manual view arrangement. It solves the problem of the huge workload of TEKLA software drawing generation, which requires a lot of manpower and time, and provides a solution for rapid drawing generation of 3D modeling software. Attached Figure Description
[0033] Figure 1 This is a flowchart of the secondary development process based on TEKLA software in an embodiment of the present invention;
[0034] Figure 2 This is a schematic diagram of the operation interface window in an embodiment of the present invention;
[0035] Figure 3 This is a schematic diagram of the drawing area division in an embodiment of the present invention. Detailed Implementation
[0036] The present invention will now be further described with reference to the accompanying drawings and specific embodiments.
[0037] like Figure 1-3In the embodiment shown,
[0038] A rapid drawing generation design method and plugin based on TEKLA secondary development includes the following steps:
[0039] S1: Read the drawing file; the specific process is as follows:
[0040] S1-1: Establish the interface between TEKLA software and VS, with the drawing interface being Tekla.Structures.Drawing;
[0041] S1-2: Initialize the interface from the .NET application to the Tekla struct;
[0042] S1-3: Get the current drawing list. The drawing list is in the drawing list in the toolbar and report.
[0043] S1-4: Select any one or more drawings in the list.
[0044] S2: Obtain information about the drawing and all its views; the specific process is as follows:
[0045] S2-1: Capture and display the selected drawing, and read the information in the drawing; the specific information includes the width information, height information, origin coordinates of the drawing, and the type of drawing; there are four types of drawings, including AWMG;
[0046] S2-2: Get each view in the drawing and store the view into an enumeration body. Get the number of views on the drawing. There are two types of views in the drawing, including VIEW and CONTAINERVIEW.
[0047] S2-3: Create view arrays for two view types;
[0048] S2-4: Obtain information for each view. First, determine the view type and capture different information for different types. For VIEW type, capture the view's scale, origin coordinates, height, and width. For CONTAINERVIEW type, capture the view's origin coordinates, height, and width.
[0049] S3: Divide the drawing into areas; the specific process is as follows:
[0050] S3-1: Divide the drawing into four modules. The first module in the upper left corner stores VIEW type views, the second module in the lower left corner and the third module in the upper right corner store CONTAINERVIEW type views, and the fourth module in the lower right corner stores the information bar.
[0051] S3-2: For the first module in the top left corner, first define a width variable and a height variable, then define an X-axis proportional relationship variable and a Y-axis proportional relationship variable. When the proportional relationship variable changes, the module width variable and height variable change accordingly.
[0052] S4: Sort the views; the specific process is as follows:
[0053] Perform bubble sort on the area data for both types of views, placing the view with the larger area at the beginning of the view array, the view with the smaller area in the second position, and the view with the smallest area at the end.
[0054] S5: Modify the position of the sorted views. The specific process is as follows:
[0055] S5-1: Change the position of a VIEW type view by using a nested FOR and IF loop to change the origin coordinates of the entire VIEW type view array.
[0056] S5-2: To change the position of CONTAINERVIEW type views, first consider arranging CONTAINERVIEW type views in the second module from the bottom left. If the module is full, arrange the remaining CONTAINERVIEW type views in the third module from the top right.
[0057] S5-3: If the view is too large or the drawing is too small to fit completely, you can check the "Scale View" option, which will automatically reduce the scale of VIEW type views by 1, while keeping the scale of CONTAINERVIEW type views unchanged. Alternatively, you can check "Automatic Adjustment or Fixed Size of Drawing" to change the size of the drawing so that the drawing and view can adapt to each other.
[0058] like Figure 1As shown, this method uses C#. First, a TEKLA reference is added to obtain interface information. The DrawingHandler class initializes the interface from the .NET application to the Tekla structure. A new Model class is created, using the GetConnectionStatus() method to retrieve the drawing list, the GetDrawingSelector() method to retrieve the selected drawing from the list, and the SetActiveDrawing() method to display the selected drawing. The width, height, and origin information of the current drawing are obtained, and the type of the drawing is obtained using GetType(). The views in the drawing are stored in the DrawingObjectEnumerator class, and the total number of views is obtained using GetSize(). Two arrays are defined to store the two types of views respectively in the view arrays: Tekla.Structures.Drawing.View[] and Tekla.Structures.Drawing.ContainerView[]. Each view is stored in the view class and its information is captured. The Scale, Width, Height, and Origin information of the View and the Width, Height, and Origin information of the ContainerView are obtained.
[0059] like Figure 3 As shown, the drawing area is divided into four modules. The first module in the upper left corner stores VIEW type views, the second module in the lower left corner and the third module in the upper right corner store CONTAINERVIEW type views, and the fourth module in the lower right corner stores the information panel. For the first module in the upper left corner, first define a width variable and a height variable, then define an X-axis scale variable and a Y-axis scale variable. When the scale variable changes, the module width and height variables change accordingly.
[0060] Perform bubble sort on the area data for both types of views, placing the view with the larger area at the beginning of the view array, and so on. To change the position of a VIEW type view, use nested FOR and IF loops to change the origin coordinates of the entire VIEW type view array. To change the position of a CONTAINERVIEW type view, first consider arranging the CONTAINERVIEW type views in the second module from the bottom left. If that's full, arrange the remaining CONTAINERVIEW type views in the third module from the top right.
[0061] like Figure 2As shown, if the view is too large or the drawing is too small to fit completely, you can check the "Scale View" option, which will automatically reduce the scale of VIEW type views by 1, while keeping the scale of CONTAINERVIEW type views unchanged. Alternatively, you can check "Automatic Adjustment or Fixed Size of Drawing" to change the size of the drawing so that the drawing and view can adapt to each other.
[0062] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A rapid drawing design method based on TEKLA secondary development, characterized in that, Includes the following steps: S1: Read drawing file; S2: Obtain information about the drawing and all its views; S3: Divide the drawing into areas; The drawing is divided into four modules: the first module in the upper left corner stores VIEW type views, the second module in the lower left corner and the third module in the upper right corner store CONTAINERVIEW type views, and the fourth module in the lower right corner stores the information bar. S4: Sort the views. The specific process is as follows: The drawings include two types of views: VIEW and CONTAINERVIEW. The area data of the two types of views are bubble sorted separately, and the view with the smallest area is placed at the end of the view array. S5: Modify the position of the sorted views. The specific process is as follows: S5-1: Change the position of a VIEW type view by using a nested FOR and IF loop to change the origin coordinates of the entire VIEW type view array. S5-2: Change the position of CONTAINERVIEW type views. First, arrange CONTAINERVIEW type views in the second module from the bottom left. If the module is full, arrange the remaining CONTAINERVIEW type views in the third module from the top right. S5-3: If the view is too large or the drawing is too small to fit completely, check the "Scale View" option. This will automatically reduce the scale of VIEW type views while keeping the scale of CONTAINERVIEW type views unchanged. Alternatively, check "Automatic Adjustment or Fixed Size of Drawing" to change the size of the drawing so that the drawing and view can be adjusted adaptively.
2. The rapid drawing design method based on TEKLA secondary development according to claim 1, characterized in that, The specific process of S2 is as follows: S2-1: Capture and display the selected drawing, and read the information in the drawing; the specific information includes the width information, height information, origin coordinates of the drawing, and the type of drawing; there are four types of drawing, including A, W, M, and G; S2-2: Get each view in the drawing and store the views into an enumeration body to get the number of views in the drawing; S2-3: Create view arrays for two view types; S2-4: Obtain information for each view. First, determine the view type and capture different information for different types. For VIEW type, capture the view's scale, origin coordinates, height, and width. For CONTAINERVIEW type, capture the view's origin coordinates, height, and width.