Power supply screen cabinet structure design method based on Excel VBA language

Through the structural design method of power screen cabinet based on Excel VBA language, the existing power screen cabinet design problems are solved, low efficiency and frequent errors are achieved, and the design standardization and rapid response to market demand are achieved.

CN119862667APending Publication Date: 2025-04-22ZHUHAI TITANS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510036263.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The existing power supply screen cabinet structural design has problems such as inconsistent design, low design efficiency, frequent design errors, and inability to respond to market demand quickly.

Method used

The power screen cabinet structure design method based on Excel VBA language is adopted. By establishing a parameterized three-dimensional model, automatically drawing and updating engineering drawings, completing configuration parameter selection in Excel, and establishing a link between Excel and three-dimensional software through the secondary development of the three-dimensional software API to realize the parameterized design of the product.

Benefits of technology

It has improved design efficiency, established design standardization, reduced design errors, completed engineering design quickly, and improved the company's order acceptance and technological innovation capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862667A_ABST
    Figure CN119862667A_ABST
Patent Text Reader

Abstract

The invention discloses and provides a power supply screen cabinet structure design method capable of improving design efficiency, establishing design standardization and reducing design errors. The method comprises the following steps: a, establishing a power supply screen cabinet product design standard, and constructing a power supply screen cabinet parameterization design logic relation; b, establishing a parameterized three-dimensional model through model analysis; c, establishing a standardized engineering drawing; d, establishing an Excel table user interface; and e, writing a program in the Excel VBA, establishing a link between the Excel and the three-dimensional software through secondary development of a three-dimensional software API (Application Program Interface), establishing a relation between Excel input parameters and three-dimensional software parameters, and driving the change of the three-dimensional model through the change of numerical values input in the Excel table. The invention is applied to the technical field of power supply screen cabinet design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a power panel cabinet structure design method, and in particular to a power panel cabinet structure design method based on Excel VBA language. Background Art

[0002] Power panel cabinets belong to electrical control cabinet products, and there are many types, such as Figure 1 As shown. The power panel cabinet is generally composed of a cabinet frame, panel, internal support, electrical components, wiring system, etc. It is customized and designed according to national standards, electrical parameters (voltage, current, capacity, etc.) and customer needs. The requirements of each engineering order are different, and the electrical components will have certain differences, resulting in a wide variety of structural parts of the product, making it impossible to perform standardized batch design of the three-dimensional design of the product.

[0003] At present, the main contents of the structural design of the power supply cabinet are as follows: ① According to the component selection of electrical engineers, use 3D software to layout and stack the components; ② Design various control panels and installation supports according to the installation dimensions of components; ③ Design copper busbar connection and cable layout according to the wiring diagram; ④ Check the 3D model to see if the assembly is reasonable and if the layout complies with the design criteria; ⑤ Output 2D drawings, various assembly drawings, parts drawings, etc.; ⑥Output BOM details list.

[0004] The structural design of the above power supply cabinet has several shortcomings: ① The overall configuration design of the panel cabinet is designed by each engineer based on personal experience, which is inconsistent. Whether the layout is reasonable or not is related to product manufacturing and assembly quality, and will also affect the reliability, debugging, and maintenance of the electrical control system.

[0005] ② When designing parts in detail, a lot of time is needed to collect and read drawings and find the structural drawings and three-dimensional models corresponding to the matching electrical components.

[0006] ③ The 3D model needs to be manually assembled, which involves a lot of repetitive work.

[0007] ④ It is necessary to draw a large number of two-dimensional drawings, mark dimensions, technical requirements, etc., and the drawing efficiency is low.

[0008] ⑤ Design errors are difficult to avoid during the design process, which leads to production rework, increased material waste and production time, resulting in increased product and management costs.

[0009] ⑥ The design workload is large and the design cycle is long. It is impossible to submit bidding drawings and production drawings quickly, which affects the project bidding and project product delivery cycle, makes it difficult to respond to market demand, and hinders the company's ability to accept orders and technological innovation. Summary of the invention

[0010] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a power panel cabinet structure design method based on Excel VBA language, which can improve design efficiency, establish design standardization and reduce design errors.

[0011] The technical solution adopted by the present invention is: the power panel cabinet structure design method based on Excel VBA language of the present invention comprises the following steps: a. Establish product design standards for power supply cabinets and construct the logical relationship of parametric design of power supply cabinets; b. Establish a parametric 3D model through model analysis, define the dimensions of the parts in the 3D model as variable parameters, write relational expressions and compile family tables according to the design logic, and use parameter programs to drive the 3D model to change and replace; c. Establish standardized engineering drawings and automatically draw and update the dimensions of parts; d. Establish an Excel table user interface and establish various configuration parameters in Excel; e. Write a program in Excel VBA, and establish a link between Excel and 3D software through secondary development of 3D software API, establish a connection between Excel input parameters and 3D software parameters, drive the change of 3D model through the change of numerical values ​​entered in Excel table, and realize parametric design of products.

[0012] Furthermore, in step b, the model is a parametric model, and the size can be driven by parameters, or models of different sizes in the same series can be generated through a series parts design table.

[0013] Furthermore, in step d, the engineering parameters, frame dimensions, control panels, components, and supports established in Excel can all be selected in Excel.

[0014] Furthermore, in step d, the user interfaces of all types of cabinets are collected in one workbook, and user interfaces corresponding to various types of cabinets are established by establishing different worksheets.

[0015] Furthermore, the power panel cabinet structure design method based on Excel VBA language also includes the following steps: f. Establish a unified standard component common parts library, and reflect it in an Excel table database for designers to query and select, so as to facilitate designers to call common design resources.

[0016] Furthermore, the three-dimensional software is Creo, or Solidworks, or Catia. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the types of screen cabinets; Figure 2 It is a design flow chart of the present invention; Figure 3 , Figure 4 There are different Excel user interfaces corresponding to different types of cabinets; Figure 5 The Excel user interface of Embodiment 1 and Embodiment 2; Figure 6 It is a three-dimensional diagram of the cabinet before and after the modification of Example 1 and Example 2. DETAILED DESCRIPTION

[0018] For better understanding, the present invention will be described below with examples, and the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.

[0019] There are many parameters for selecting a panel cabinet, including cabinet size, panel, electrical components, supports, etc. The following lists the panel cabinet size parameters as an example. The methods for other selection parameters are similar.

[0020] like Figure 1 As shown in the figure, the power panel cabinet structure design method based on Excel VBA language includes the following steps: a. Establish product design standards for power supply cabinets and construct the parametric design logic relationship of power supply cabinets.

[0021] b. Through model analysis, a parametric three-dimensional model is established. The dimensions of the parts in the three-dimensional model are defined as variable parameters. According to the design logic, relationship expressions (equations) are written, a family table (series parts design table) is compiled, and the three-dimensional model is driven by a parametric program to make changes and replacements.

[0022] c. Establish standardized engineering drawings and automatically draw and update component dimensions.

[0023] d. Create an Excel table UI (user interface) and establish various configuration parameters in Excel. Engineering parameters, frame dimensions, control panels, components, supports, etc. can all be selected in Excel. In step d, the user interfaces of all types of cabinets are collected in one workbook. By creating different worksheets, the corresponding user interfaces of various types of cabinets are established. Figure 3 , 4 shown.

[0024] e. Write a program in Excel VBA, and establish a link between Excel and 3D software through secondary development of 3D software API. Establish the connection between Excel input parameters and 3D software parameters, and drive the change of 3D model through the change of values ​​input in Excel table to realize parametric design of products; f. Establish a common parts library with unified standards and reflect it in an Excel table database for designers to query and select, making it convenient for designers to call on common design resources.

[0025] g. This design method can be applied to common 3D software with parametric design and VB secondary development functions, such as Creo, Solidworks, Catia, etc.

[0026] Since the VB API secondary development methods of various 3D software are different, Creo 3D software and Solidworks 3D software will be listed as examples respectively.

[0027] Embodiment 1 In this embodiment, the implementation steps of Creo 3D software are as follows: Step 1: Establish a Creo parametric skeleton model, establish global parameters "cabinet height", "cabinet width" and "cabinet depth", and associate the skeleton model dimensions by establishing relationships. Then, through a top-down design method, establish models of cabinet components and draw engineering drawings.

[0028] Step 2: Excel creates a human-computer interaction UI interface ( Figure 5 ), and set a Command Button for user parameter input and operation.

[0029] Step 3: Set Creo environment variables, register API COM server, and have the Excel VBA editor reference "Creo VB APItype library for Creo Parametric" to establish an interconnection interface between the two. Step 4: Write code in the VBA editor and add the following code to the button: Option Explicit Private Sub Button_Click() Dim Filename As String Dim Path As String Dim i As Integer Call LinkCreo Set Session = asyncConnection.Session Set Basesession = Session Set CCModelDescriptor = New CCpfcModelDescriptor Path = Basesession.GetCurrentDirectory Filename = Path&"tt-zlkdg.asm" Set ModelDescriptor = CCModelDescriptor.CreateFromFileName(Filename) Basesession.OpenFile(ModelDescriptor).Activate Set Model = Basesession.CurrentModel For i = 2 To 5 Call ModifyParam(Model, ActiveSheet.Range("D"&i), ActiveSheet.Range("E"&i), ActiveSheet.Range("F"&i)) Next i Public Sub LinkCreo() Set CAC = New CCpfcAsyncConnection Set asyncConnection = CAC.Connect(Null, Null, Null, Null) End Sub Public Sub ModifyParam(ByVal MyModel As IpfcModel, ByVal MyParamNameAs String, ByVal MyParamType As String, ByVal MyParamValue As String) Dim CParameter As IpfcParameter Dim CParamValue As IpfcParamValue Dim CParameterOwner As IpfcParameterOwner Set CParameterOwner = MyModel Set CParameter = CParameterOwner.GetParam(MyParamName) Set CParamValue = CParameter.GetScaledValue Select Case MyParamType Case Is = "Boolean" CParamValue.BoolValue = CBool(MyParamValue) Case Is = "Integer" CParamValue.IntValue = CInt(MyParamValue) Case Is = "Real Number" CParamValue.DoubleValue = CDbl(MyParamValue) Case Is = "string" CParamValue.StringValue = CStr(MyParamValue) End Select Call CParameter.SetScaledValue(CParamValue, Nothing) End Sub MsgBox "3D model updated!", vbInformation, "Titans" End Sub.

[0030] Step 5: Engineers fill in the cabinet size design parameters in Excel according to engineering requirements, and execute the code by clicking a button to pass these parameter values ​​to the parameters specified in the Creo process to complete the parameter modification.

[0031] Step 6: By modifying the parameters, the 3D model is automatically updated, and the corresponding component dimensions, features, assemblies, and engineering drawings are automatically updated. Engineers no longer need to modify the model. Figure 6 .

[0032] Step 7: Output engineering drawings and BOM lists to complete cabinet size selection and design.

[0033] Embodiment 2 In this embodiment, the implementation steps of Solidworks 3D software are as follows: Step 1: Establish a Solidworks parametric model, establish global parameters such as "cabinet height", "cabinet width" and "cabinet depth", and associate model dimensions by establishing equations. Draw engineering drawings of cabinet parts.

[0034] Step 2: Excel creates a human-computer interaction UI interface ( Figure 5 ), and set a Command Button for user parameter input and operation.

[0035] Step 3: The Excel VBA editor references the SolidWorks type library file, checks a series of library files related to SolidWorks, such as SolidWorks2018 Typelibrary, SolidWorks Consant Type library, SolidWorks 2018 Extensibility Type, and establishes an interface between the two.

[0036] Step 4: Write the code in the VBA editor and edit the following code in the button: Option Explicit Private Sub Update SW_Click() Dim swApp As Object Dim swModel As SldWorks.ModelDoc2 Dim swEqnMgr As SldWorks.EquationMgr Dim boolstatus As Boolean 'Establish SW connection Set swApp = CreateObject("SldWorks.Application") Set swModel = swApp.ActiveDoc Set swEqnMgr = swModel.GetEquationMgr Dim eqW As String Dim eqD As String Dim eqH As String eqW = Chr(34)&"Cabinet Width"&Chr(34)&"="&Range("C11").Value eqD = Chr(34)&"Cabinet Depth"&Chr(34)&"="&Range("C12").Value eqH = Chr(34)&"Cabinet height"&Chr(34)&"="&Range("C13").Value 'Make the variable equal to the value in the Excel table swEqnMgr.Equation(0) = eqW swEqnMgr.Equation(1) = eqD swEqnMgr.Equation(2) = eqH swModel.EditRebuild3 MsgBox ("3D model updated!") End Sub.

[0037] Step 5: Engineers fill in the cabinet size design parameters in Excel according to engineering requirements, and execute the code by clicking a button to pass these parameter values ​​to the parameters specified in the Solidworks process to complete the parameter modification.

[0038] Step 6: By modifying the parameters, the 3D model is automatically updated, and the corresponding component dimensions, features, assemblies, and engineering drawings are automatically updated. Engineers no longer need to modify the model. Figure 6 .

[0039] Step 7: Output engineering drawings and BOM lists to complete cabinet size selection and design.

[0040] The present invention has the following advantages: ① Simply select the model according to the project requirements in Excel to automatically generate 3D designs and 2D drawings.

[0041] ②Reduce a lot of repetitive modeling and drawing work and improve design efficiency.

[0042] ③ Establish standardized design templates and design platforms, share design resources, and standardize designs.

[0043] ④ Modular and standardized design of parts can reduce design errors and reduce material waste and production costs caused by rework.

[0044] ⑤Quickly complete engineering design and gain more time for product R&D upgrades and iterations.

[0045] Although the embodiments of the present invention are described with practical solutions, they do not constitute limitations on the meaning of the present invention. For those skilled in the art, it is obvious to modify the implementation scheme and combine it with other solutions based on this description.

Claims

1. A power panel cabinet structure design method based on Excel VBA language, characterized by: The power panel cabinet structure design method includes the following steps: a. Establish product design standards for power supply cabinets and construct the logical relationship of parametric design of power supply cabinets; b. Establish a parametric 3D model through model analysis, define the dimensions of the parts in the 3D model as variable parameters, write relational expressions and compile family tables according to the design logic, and use parameter programs to drive the 3D model to change and replace; c. Establish standardized engineering drawings and automatically draw and update the dimensions of parts; d. Establish an Excel table user interface and establish various configuration parameters in Excel; e. Write a program in Excel VBA, and establish a link between Excel and 3D software through secondary development of 3D software API, establish a connection between Excel input parameters and 3D software parameters, drive the change of 3D model through the change of numerical values ​​entered in Excel table, and realize parametric design of products.

2. The method for designing a power panel cabinet structure based on Excel VBA language according to claim 1, characterized in that: In step b, the model is a parametric model, and the size can be driven by parameters, or models of different sizes in the same series can be generated through a series parts design table.

3. The method for designing a power panel cabinet structure based on Excel VBA language according to claim 1, characterized in that: In step d, the engineering parameters, frame dimensions, control panels, components, and supports established in Excel can all be selected in Excel.

4. The method for designing a power panel cabinet structure based on Excel VBA language according to claim 1 is characterized in that: In step d, the UI interfaces of all types of cabinets are collected in one workbook, and UI interfaces corresponding to various types of cabinets are established by establishing different worksheets.

5. The method for designing a power panel cabinet structure based on Excel VBA language according to claim 1 is characterized in that: The power panel cabinet structure design method also includes the following steps: f. Establishing a common parts library of unified standards and reflecting it in an Excel table database for designers to query and select, so as to facilitate designers to call common design resources.

6. The method for designing a power panel cabinet structure based on Excel VBA language according to claim 1 is characterized in that: The three-dimensional software is Creo, or Solidworks, or Catia.