Manufacturing method of PCB (Printed Circuit Board) line length table

By creating an automated program in Excel to call the WREP tool of CR5000 software, the problem of low efficiency in generating tables for medium and long lines in PCB design was solved. This achieved automated extraction of line length information and table generation, improving design efficiency and accuracy.

CN120995969APending Publication Date: 2025-11-21ZHUHAI EDADOC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510860127.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In PCB design, existing software cannot automatically generate tables with equal-length lines, forcing designers to manually copy and paste data, which is inefficient and prone to errors.

Method used

By creating an automated program in Excel and calling the wirrep tool of the CR5000 software, the line length information of the PCB file is automatically extracted and a table is generated. The automated operation is achieved by using batch files and VBA scripts, ensuring data accuracy and synchronous execution of the process.

Benefits of technology

It automates the acquisition and table generation of PCB line length information, reduces manual operation time, lowers errors, improves design efficiency and data accuracy, and provides visual buttons and shortcut keys to simplify the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005467523080000081
    Figure BDA0005467523080000081
  • Figure BDA0005467523080000091
    Figure BDA0005467523080000091
  • Figure BDA0005467523080000101
    Figure BDA0005467523080000101
Patent Text Reader

Abstract

The invention discloses a manufacturing method of a PCB (printed circuit board) line length table, which realizes automatic acquisition of PCB line length information and table generation through cooperation of Excel and CR5000 software, can replace repetitive operation of manually copying and pasting line length values, greatly shortens line length extraction and table manufacturing time, and reduces manual operation errors. A visual button and shortcut key triggering mode is provided, the operation threshold is reduced, and the interaction efficiency is improved; a table containing information such as line length values and rule conformity is automatically generated, the signal line length relation is clearly and visually displayed, and rapid analysis and verification are facilitated; the intermediate file is managed in a centralized mode through the temporary directory, pollution to an original path is avoided, the process is standardized, codes are modularized, the method has the characteristics of easy maintenance and expandability, and the line length management efficiency and data accuracy of PCB designers are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of PCB design, and more particularly to a method for manufacturing a PCB length table. BACKGROUND

[0002] PCB (Printed Circuit Board), also known as printed wiring board, is an important electronic component, a support for electronic components, and a carrier for electrical connection of electronic components. It is called "printed" circuit board because it is made by electronic printing.

[0003] PCB provides a mounting platform for chips and other discrete components (such as resistors, capacitors, etc.), and realizes electrical connection between components through conductive paths thereon. With the development of semiconductor technology, the number of transistors integrated on a single chip has increased dramatically, which requires a method to convert these tiny silicon chips into a form that can be easily connected to other electronic components, thus generating packaging. Packaging refers to placing a silicon chip in a protective shell and connecting circuit pins to external connectors with wires to connect to other devices. Equal length lines are used to reduce signal relative delay and ensure signal integrity, especially for high-speed signal transmission. The role of equal length lines is to make the speed of signal transmission consistent and the timing consistent.

[0004] In PCB design, in order to make the signal line length relationship more clear and intuitive, PCB designers will use a length table. In the operation interface of CR5000 software, although the rule manager can set the length rule, it cannot display the length, and only the form of DRC can confirm whether the length error meets the requirements, and cannot reflect the current signal line length, so the designer needs to make a length table, copy the length value of the PCB data to the table (operation: show net name→COPY Length→paste to the equal length table), which greatly affects the efficiency of the designer. SUMMARY

[0005] In order to solve the problem of obtaining an equal length table when using CR5000 software for PCB design, the present application provides a method for manufacturing a PCB length table.

[0006] The technical scheme of the present application is as follows:

[0007] A method for manufacturing a PCB length table,

[0008] Step S1. Create an automation program in the development tool interface of Excel, and set the automation program to call the wirrep tool of CR5000 software;

[0009] Step S2. The wirrep tool obtains the path of the target PCB file from the fixed position of Excel and obtains the target PCB file and its corresponding custom rule file, the wirrep tool reads the data in the target PCB file and its corresponding custom rule file, the wirrep tool calculates the actual length of the wiring in sections by geometric algorithm and compares the actual length with the rules set in the custom rule file, marks whether the length meets the rules, and generates a text file according to the template in the configuration parameter file of the CR5000 software;

[0010] Step S3. The automation program is set to obtain the text file, read and extract the value set of the text file, and assign the value set of the text file to the array in the memory;

[0011] Step S4. The automation program is set to assign the array in the memory to the cell area of Excel, and complete the PCB length table.

[0012] A new module is created in the Visual Basic of Excel for executing button actions, the purpose is to build an automation program in Excel, that is, a BAT script, and to realize one-key triggering effect through buttons, so that the automation program is called by Excel. The operation is to enter the development tool in Excel and edit the automation program in the VBA editor window. When editing the automation program, create a batch file about the automation program through the FSO object operation file system (File System Object, file system object), the file extension is.bat, and the naming is decided by oneself. The path of the batch file saved is the path of the Excel file.

[0013] In this embodiment, a new module is created in the Visual Basic of Excel to create an automation program, thereby generating a batch file named LengthOutput.bat.

[0014] The custom rule file is generated by the rule manager of the CR5000 software, and corresponds to the PCB file one by one. The rules set manually by the CR5000 software are automatically associated and saved, and the file extension is.rul.

[0015] The above-mentioned method for making a PCB length table sets the wirrep command in step S1 through the WriteLine mode of the TextStream object, so that the function of the wirrep tool is written in the automation program, so as to realize that the file of the automation program contains complete PCB length extraction instructions.

[0016] Further, when setting the wirrep command, the parameter file, the PCB file and the text file path are specified.

[0017] In VBA, TextStream object is a part of FSO object operating file system, which is specially used to operate text files, and WriteLine is one of the core methods of TextStream object, which is used to write a line of content to a text file and automatically line break.

[0018] In VBA program, by creating TextStream object (with the help of FSO object operating file system component), write text content to the newly created batch file line by line in WriteLine mode, write complete wirrep tool call instructions, which are used to extract all layer network line length information and PinPair line length information respectively. The two commands specify the preset line length extraction rule file in CR5000 software (in this embodiment, the custom rule file length_net_all_layer.prm, length_net_pinpair_layer.prm) through the-p parameter, force to overwrite the output file through the-mforce parameter, and specify the path of the output CSV file (in this embodiment, Length_ALL_Layer.csv and Length_PinPair_Layer.csv respectively) through the-o parameter, to ensure that the line length data is extracted according to the rule and stored in the format readable by Excel, and finally write return1 as the end identifier of the BAT file.

[0019] The above method for making a PCB line length table sets an automation program to call the wirrep tool in step S2, copies the target PCB file and the custom rule file to the temporary directory, and takes the copied target PCB file and the custom rule file as the object to complete the acquisition and comparison of the field data.

[0020] By CreateObject("Scripting.FileSystemObject").CreateTextFile, the function of creating and opening a batch file is realized, so that the Excel development tool can write command line scripts into the file.

[0021] By the WriteLine method of the TextStream object, the function of writing wirrep commands to the bat file is realized, so that the bat file contains complete PCB line length extraction instructions.

[0022] By the Close method of the TextStream object, the function of saving the content of the batch file and releasing resources is realized, so that the generated bat file can be executed by the system.

[0023] By setting parameters in the wirrep command, the function of specifying parameter files, PCB files, and output CSV paths is realized, enabling the wirrep tool to extract wire lengths according to preset rules and output them to the specified location.

[0024] Through the ShellAndWait function, the function of synchronously waiting for batch processing to complete is realized, making the VBA code pause until the CSV file is generated.

[0025] The above method for making a PCB wire length table automatically establishes a ShellAndWait command between steps S1 and S2, uses the ShellAndWait command to start the wirrep tool of CR5000 software through the Windows command line and pause the automation program, until the wirrep tool generates a text file, and then start the automation program.

[0026] The BAT script uses the Run method of the WScript.Shell object to start an external program and get the process ID, enabling the Excel development tool (VBA) to track the execution status of the external program.

[0027] The BAT script uses WMI (Windows Management Instrumentation) queries to monitor the existence of a specified process in real time, enabling VBA to determine whether the external program has completed execution.

[0028] The BAT script uses the DoEvents statement and WScript.Sleep method to release CPU resources and set the check interval, ensuring that the program is not unresponsive and does not excessively occupy system resources.

[0029] The BAT script uses a loop structure to continuously check the process state until it ends, enabling the automation program to pause execution and wait for the external program (wirrep tool) to complete before continuing with subsequent operations.

[0030] In the BAT script, the ShellAndWait command is called to execute the commands of the BAT script. The ShellAndWait command uses the COM interface of the Windows system to achieve the ability to synchronously execute the BAT script in Excel, ensuring:

[0031] After the wirrep tool is completely executed, the BAT script performs subsequent data reading operations (such as parsing the CSV file), avoiding the error of "file not generated but trying to read" caused by asynchronous execution, ensuring the reliability of the automation process. This mechanism is the "timing control center" of the entire technical solution, ensuring that the collaborative operation of the software is executed in the expected order.

[0032] The above PCB line length table production method sets the following actions before step S1: (1) obtaining the path of the current Excel file; (2) checking whether the temporary directory exists in the path of the current Excel file, and if not, creating a temporary directory; (3) cleaning up old files in the temporary target.

[0033] The automation program obtains the path of the current Excel file through ThisWorkbook.Path, locates the position of the last backslash "\" in the path through InStrRev, extracts the path prefix, and splices ".skill" to generate the path of the temporary directory. Through the FSO object (File System Object, file system object) to create / delete directories, files, read / write text, etc., a special temporary folder (i.e. temporary directory) is created under the current Excel file path to store intermediate files (PCB file copy, BAT script, etc.), avoiding pollution of the original file path. Then during the running of the automation program, an action of checking whether the temporary directory exists is also needed to avoid folder conflicts. If it does not exist, a temporary folder is created, and old files with the same name (such as the PCB copy and BAT script generated last time) are deleted to avoid file conflicts.

[0034] The above PCB line length table production method, in step S3, the automation program opens the text file in the temporary directory, reads the content of the text file line by line but skips the table header, extracts the value, checks whether the number of fields in the extracted value meets the requirements, filters invalid data, and converts the line length value in the value from text format to numerical type.

[0035] The text file in the temporary directory (Length_ALL_Layer.csv and Length_PinPair_Layer.csv in this embodiment) is opened by the OpenTextFile method of the FSO object, and the content is read line by line using the ReadLine method. During the line-by-line reading process, the table header (such as "network name, layer name, actual line length, standard line length, and compliance" is skipped, and only the table content part, i.e., the content of each field, is read. After reading, the number of fields in each row is checked (should be 5 columns) to ensure that the reading process is not missing, and then invalid data (such as missing fields or line length value "N / A") is filtered. Finally, the text format line length value (such as "123.45mm") is converted to a numerical type (such as 123.45), completing the reading part of the action.

[0036] After reading, the extracted values are stored in the memory array in the form of assignment, and the array is a two-dimensional array (such as dataArray(i,j), i is the row number, and j is the column number), and the storage process is stored in the form and order of rows.

[0037] The above method for making a PCB line length table, in step S4, writes the content of the memory array into the starting cell of the specified Excel worksheet in the form of assignment, covering the original data, and processes the format of the specified Excel worksheet.

[0038] In this embodiment, the format processing of the specified Excel worksheet includes setting the column width (such as setting the column width of the column with the table header "actual line length" to 15), applying conditional formatting (marking the column with the table header "compliance" as red background if the value is "no"), setting the data type (such as setting the value in the column with the table header "actual line length" to a numerical type with 2 decimal places), etc. The specific format values are determined by the requirements.

[0039] The above method for making a PCB line length table binds the shortcut key with the batch processing file, automatically registers the shortcut key when the Excel file is opened, and directly executes the batch processing file after the shortcut key is triggered, to extract the line length of the PCB file.

[0040] In this embodiment, the key F6 is bound to the LengthOutput method by the Application.OnKey method. When the Excel file is opened, the shortcut key is automatically registered, and the user can directly execute the line length extraction process by pressing F6 without manually clicking the button.

[0041] The method for manufacturing the PCB line length table comprises the following steps: S1, creating an automation program in the development tool interface of Excel, and setting the automation program to call a wirrep tool of CR5000 software; S2, obtaining the path of a target PCB file from a fixed position of Excel by the wirrep tool, and obtaining the target PCB file and a corresponding custom rule file of the target PCB file, reading data in the target PCB file and the corresponding custom rule file by the wirrep tool, calculating the actual length of wiring in sections by a geometric algorithm, comparing the actual length with a rule set in the custom rule file, marking whether the length meets the rule, and generating a text file according to a template in a configuration parameter file of the CR5000 software; S3, setting the automation program to obtain the text file, reading and extracting a value set of the text file, and assigning the value set of the text file to an array in memory; and S4, setting a button control in a worksheet of Excel, binding the button control with the batch file through a Setupfile method, and directly executing the batch file to extract the PCB file line length when the button control is triggered.

[0042] The button control is inserted by the development tool tab of Excel, the specified macro of the button control is set as the Setupfile method, and the binding between the button control and the batch file is completed.

[0043] The application has the advantages that the application realizes the automatic acquisition and table generation of PCB line length information by the cooperation of Excel and CR5000 software, replaces the repetitive operation of manual copying and pasting of line length values, greatly shortens the line length extraction and table manufacturing time, reduces human operation errors, provides a visual button and a shortcut key triggering mode, reduces the operation threshold, improves the interactive efficiency, automatically generates a table containing line length values, rule compliance and other information, clearly and intuitively displays the signal line length relationship, facilitates quick analysis and verification, centrally manages intermediate files through a temporary directory, avoids pollution of the original path, and has the characteristics of easy maintenance and scalability, and significantly improves the line length management efficiency and data accuracy of PCB designers. DETAILED DESCRIPTION

[0044] In order to make the technical problems, technical solutions and advantages of the application clearer, the application will be further described in detail below in combination with embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and not to limit the application.

[0045] A method for manufacturing a PCB line length table comprises the following steps: S1, creating an automation program in the development tool interface of Excel, and setting the automation program to call a wirrep tool of CR5000 software; S2, obtaining the path of a target PCB file from a fixed position of Excel by the wirrep tool, and obtaining the target PCB file and a corresponding custom rule file of the target PCB file, reading data in the target PCB file and the corresponding custom rule file by the wirrep tool, calculating the actual length of wiring in sections by a geometric algorithm, comparing the actual length with a rule set in the custom rule file, marking whether the length meets the rule, and generating a text file according to a template in a configuration parameter file of the CR5000 software; S3, setting the automation program to obtain the text file, reading and extracting a value set of the text file, and assigning the value set of the text file to an array in memory; and S4, setting a button control in a worksheet of Excel, binding the button control with the batch file through a Setupfile method, and directly executing the batch file to extract the PCB file line length when the button control is triggered.

[0046] S2, the wirrep tool obtains the path of the target PCB file from the fixed position of Excel, and obtains the target PCB file and the corresponding custom rule file of the target PCB file, the wirrep tool reads data in the target PCB file and the corresponding custom rule file, the wirrep tool calculates the actual length of wiring in sections by a geometric algorithm, compares the actual length with a rule set in the custom rule file, marks whether the length meets the rule, and generates a text file according to a template in a configuration parameter file of the CR5000 software.

[0047] S3, the automation program obtains the text file, reads and extracts a value set of the text file, and assigns the value set of the text file to an array in memory.

[0048] Step S4. Set the array of memory to the cell area of Excel, complete the PCB line length table.

[0049] Create a new module in Excel's Visual Basic for executing button actions. The purpose is to build an automation program in Excel, i.e. a BAT script, and enable one-key triggering through the button to make the automation program called by Excel. The operation is to enter the development tool in Excel and edit the automation program in the VBA editor window. When editing the automation program, create a batch file about the automation program through the FSO object operating the file system (File System Object, file system object), with the file extension.bat, and name it as you decide. The path of this batch file is the path of the Excel file.

[0050] In this embodiment, a new module is created in Excel's Visual Basic to create an automation program, thereby generating a batch file named LengthOutput.bat.

[0051] The custom rule file is generated by the rule manager of CR5000 software, corresponding to the PCB file one by one, and the rules set manually by CR5000 software are automatically associated and saved, with the file extension.rul.

[0052] In step S1, the automation program sets the wirrep command through the WriteLine method of the TextStream object, so that the function of the wirrep tool is written in the automation program to realize the file containing complete PCB line length extraction instructions.

[0053] When setting the wirrep command, specify the parameter file, PCB file and output CSV path

[0054] In VBA, the TextStream object is part of the FSO object operating the file system, which is specifically used to operate text files. WriteLine is one of the core methods of the TextStream object, which is used to write a line of content to a text file and automatically line break.

[0055] In the VBA program, by creating a TextStream object (operating file system components through the FSO object), the text content is written into the newly created batch file line by line in the WriteLine mode, and two complete wirrep tool call instructions are written, which are used to extract all layer network length information and PinPair length information respectively. The two commands specify the preset length extraction rule file in the CR5000 software (in this embodiment, the custom rule files length_net_all_layer.prm and length_net_pinpair_layer.prm) through the -p parameter, force to overwrite the output file through the -mforce parameter, and specify the output CSV file path (in this embodiment, Length_ALL_Layer.csv and Length_PinPair_Layer.csv respectively) through the -o parameter, to ensure that the length data is extracted according to the rules and stored in the format readable by Excel, and finally write return1 as the end identifier of the BAT file.

[0056] The automated program calls the wirrep tool in step S2, copies the target PCB file and custom rule file to the temporary directory, and uses the copied target PCB file and custom rule file as objects to complete the acquisition and comparison of the field data.

[0057] The function of creating and opening a batch file is realized through CreateObject ("Scripting.FileSystemObject"). CreateTextFile, so that the Excel development tool can write command line scripts into the file.

[0058] The function of writing wirrep commands into the bat file is realized through the WriteLine method of the TextStream object, so that the bat file contains complete PCB length extraction instructions.

[0059] The function of saving the batch file content and releasing resources is realized through the Close method of the TextStream object, so that the generated bat file can be executed by the system.

[0060] The function of specifying the parameter file, PCB file and output CSV path is realized by setting parameters in the wirrep command, so that the wirrep tool can extract the length according to the preset rules and output to the specified location.

[0061] The function of synchronously waiting for the batch execution to be completed is realized through the custom ShellAndWait function, so that the VBA code is paused until the CSV file is generated.

[0062] The automation program establishes a ShellAndWait command between step S1 and step S2, uses the ShellAndWait command to start the wirrep tool of the CR5000 software through the Windows command line and suspends the running of the automation program until the wirrep tool generates a text file, and then starts the running of the automation program.

[0063] The BAT script realizes the function of starting an external program and obtaining a process ID through the Run method of the WScript.Shell object, so that the development tool of Excel (namely, VBA) can track the execution state of the external program.

[0064] The BAT script realizes the function of real-time monitoring of whether a specified process exists through WMI (Windows Management Instrumentation), so that VBA can determine whether the external program is executed completely.

[0065] The BAT script realizes the function of releasing CPU resources and setting an inspection interval through the DoEvents statement and the WScript.Sleep method, so that the program neither has no response nor excessively occupies system resources.

[0066] The BAT script realizes the function of continuously checking the process state until it ends through a loop structure, so that the automation program can suspend execution and wait for the external program (namely, the wirrep tool) to complete before continuing subsequent operations.

[0067] In the BAT script, the ShellAndWait command is called to execute the commands of the BAT script, and the ShellAndWait command realizes the ability of synchronously executing the BAT script in Excel through the COM interface of the Windows system, to ensure that:

[0068] After the wirrep tool is completely executed, the BAT script performs subsequent data reading operations (such as parsing a CSV file), avoiding the error of “attempting to read a file that has not been generated” due to asynchronous execution, and ensuring the reliability of the automation process. This mechanism is the “timing control center” of the entire technical solution, ensuring that the collaborative operation of software is performed in the expected order.

[0069] Before step S1, the automation program has the following actions: (1) obtaining the path of the current Excel file; (2) checking whether a temporary directory exists in the path of the current Excel file, and if not, creating the temporary directory; and (3) cleaning up old files in the temporary target.

[0070] The automation program obtains the path of the current Excel file through ThisWorkbook.Path, locates the position of the last backslash "\" in the path through InStrRev, intercepts the path prefix, and splices ".skill" to generate the path of the temporary directory. By operating the file system (File System Object, file system object) through the FSO object, the directory, file, and text are created / deleted, read and written, so as to create a special temporary folder (i.e. temporary directory) in the same path of the current Excel file, store the intermediate files (PCB file copy, BAT script, etc.), and avoid polluting the original file path. Then during the running of the automation program, it is also necessary to add the action of checking whether the temporary directory exists to avoid folder conflict, and if it does not exist, create a temporary folder and delete the old files with the same name (such as the PCB copy and BAT script generated last time) to avoid file conflict.

[0071] In step S3, the automation program opens the text file in the temporary directory, reads the content of the text file line by line but skips the table header, extracts the value, checks whether the number of fields in the extracted value meets the symbol requirement, filters invalid data, and converts the text format line length value in the value to a numerical type.

[0072] The OpenTextFile method of the FSO object is used to open the text file in the temporary directory (in this embodiment, the text files are Length_ALL_Layer.csv and Length_PinPair_Layer.csv), and ReadLine is used to read the content line by line. In the process of reading line by line, the table header (such as "network name, layer name, actual line length, regular line length, and whether it meets the requirement") is skipped, and only the table content part of the text file, i.e. the content of each field, is read. After reading, the number of fields in each row (which should be 5 columns) is checked to ensure that the reading process is not missing, and then invalid data (such as missing fields or line length value "N / A") is filtered. Finally, the text format line length value (such as "123.45mm") is converted to a numerical type (such as 123.45), and the reading action is completed.

[0073] After reading, the extracted value is stored in the array in the memory in the form of assignment, and the array is a two-dimensional array (such as dataArray(i,j), i is the row number, and j is the column number), and the storage process is stored in the form and order of rows.

[0074] In step S4, the content in the array in the memory is written to the starting cell of the specified worksheet of Excel in the form of assignment, covering the original data, and the format of the specified worksheet of Excel is processed.

[0075] In the embodiment, the format processing of the Excel designated worksheet includes setting column width (such as setting the column width of the column with the table header of "actual line length" to 15), applying conditional format (such as marking the column with the table header of "whether to meet" as red background if the value is "no"), setting data type (such as setting the value in the column with the table header of "actual line length" as numerical type with 2 decimal places), and the like. The specific format values are determined by the requirement.

[0076] The shortcut key is bound with the batch file, and the shortcut key is automatically registered when the Excel file is opened. The batch file is directly executed after the shortcut key is triggered, and the PCB file line length is extracted.

[0077] In the embodiment, the key F6 is bound with the LengthOutput method through the Application.OnKey method. The shortcut key is automatically registered when the Excel file is opened. The line length extraction process is directly executed after the F6 is pressed by the user, and manual clicking of the button is not needed.

[0078] The button control is set in the worksheet of the Excel, so that the button control is bound with the batch file through the Setupfile method. The batch file is directly executed after the button control is triggered, and the PCB file line length is extracted.

[0079] The button control is inserted through the development tool tab of the Excel, the specified macro of the button control is set as the Setupfile method, and the binding between the button control and the batch file is completed.

[0080] The implementation code is shown as follows.

[0081]

[0082]

[0083]

[0084]

[0085]

[0086]

[0087] The above only describes the preferred embodiments of the present application and should not be used to limit the present application. Any modification, equivalent replacement, and improvement within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for manufacturing a PCB trace length table, characterized in that, Step S1. Create an automation program in the Excel developer tools interface and set the automation program to call the wirrep tool of the CR5000 software; Step S2. The wirrep tool obtains the path of the target PCB file from a fixed location in Excel and obtains the target PCB file and its corresponding custom rule file. The wirrep tool reads the data in the target PCB file and its corresponding custom rule file. The wirrep tool calculates the actual length of the wiring segment by segment using a geometric algorithm and compares the actual line length with the rules set in the custom rule file. It marks whether the line length conforms to the rules and generates a text file of the data that conforms to the rules according to the template in the configuration parameter file of the CR5000 software. Step S3. Set up an automated program to obtain a text file, read and extract the value set from the text file, and assign the value set from the text file to an array in memory; Step S4. Set up an automated program to assign the array in memory to the cell range in Excel, thus completing the PCB line length table.

2. The method for manufacturing a PCB trace length table according to claim 1, characterized in that, In step S1, the automation program is configured by setting the wirrep command using the WriteLine method of the TextStream object. This enables the automation program to write the wirrep tool, thus ensuring that the automation program's file contains complete PCB line length extraction instructions.

3. The method for manufacturing a PCB trace length table according to claim 1, characterized in that, When setting up the wirrep command, specify the paths to the parameter file, PCB file, and text file.

4. The method for manufacturing a PCB trace length table according to claim 1, characterized in that, In step S2, the automation program calls the wirrep tool to copy the target PCB file and the custom rule file to a temporary directory. Using the copied target PCB file and custom rule file as objects, it completes the acquisition and comparison of field data.

5. A method for manufacturing a PCB trace length table according to claim 1, characterized in that, Between steps S1 and S2, the automation program establishes a ShellAndWait command. Using the ShellAndWait command, the wirrep tool of the CR5000 software is launched via the Windows command line, and the automation program is paused until the wirrep tool generates a text file, at which point the automation program is restarted.

6. A method for manufacturing a PCB trace length table according to claim 1, characterized in that, Before step S1, the following actions are performed in the automation program: (1) Obtain the path of the current Excel file; (2) Check if there is a temporary directory in the path of the current Excel file. If not, create a temporary directory; (3) Clean up old files in the temporary target.

7. A method for manufacturing a PCB trace length table according to claim 1, characterized in that, In step S3, the automated program opens the text file in the temporary directory, reads the contents of the text file line by line but skips the header and extracts the values, checks whether the number of fields in the extracted values ​​meets the requirements, filters invalid data, and converts the line length values ​​in the text format to numeric types.

8. A method for manufacturing a PCB trace length table according to claim 1, characterized in that, In step S4, the contents of the array in memory are written to the starting cell of the specified worksheet in Excel by assignment, overwriting the original data, and the format of the specified worksheet in Excel is processed.

9. A method for manufacturing a PCB trace length table according to claim 1, characterized in that, Set up a shortcut key and bind it to the batch file. When the Excel file is opened, the shortcut key will be automatically registered. Once the shortcut key is pressed and triggered, the batch file can be executed directly to extract the line length of the PCB file.

10. A method for manufacturing a PCB trace length table according to claim 1, characterized in that, Set up a button control in an Excel worksheet, and bind the button control to a batch file using the Setupfile method. When the button control is triggered, the batch file can be executed directly to extract the line lengths of the PCB file.