A PCB device silk screen mark inspection and reset method and system based on skill

CN122616480APending Publication Date: 2026-08-21SHENZHEN COLORFUL YUGONG TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611095265.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0004]本发明的目的是为了解决现有技术中存在需要用户手动逐个选择器件,无法自动定位异常器件等缺点,而提出的一种基于SKILL的PCB器件丝印标识检查与复位方法及系统

Benefits of technology

[0014]本发明提出的一种基于SKILL的PCB器件丝印标识检查与复位方法及系统,有益效果在于:本发明通过双向数量比对法实现了器件丝印完整性的量化检测,能够精确识别丝印线框、极性标记及位号文本的局部缺失,有效填补了电气规则检查无法检测非电气层几何缺陷的技术空白。同时,多级锚点定位策略解决了无位号器件的定位难题,动态脚本生成技术实现了异常器件的高效批量复位。本发明将丝印检查从传统人工目检升级为自动化精确检测,大幅提升了PCB设计后期丝印检查的效率与准确性,降低了因丝印错误导致的贴片反向风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122616480A_ABST
    Figure CN122616480A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of PCB design, in particular to a PCB device silk screen mark checking and resetting method and system based on SKILL, which comprises the following steps: S1, all device instances in a PCB design file are traversed to obtain the database identifier of each device instance; and S2, for the current device instance, a first sub-object set of the device instance on a silk screen layer is obtained, the application realizes quantitative detection of device silk screen integrity through a bidirectional quantity comparison method, can accurately identify the local loss of a silk screen line frame, a polarity mark and a bit number text, and effectively fills the technical blank that an electrical rule check cannot detect non-electrical layer geometric defects. Meanwhile, a multi-level anchor point positioning strategy solves the positioning problem of a device without a bit number, and a dynamic script generation technology realizes efficient batch resetting of abnormal devices. The application upgrades silk screen checking from traditional manual visual inspection to automatic accurate detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of PCB design technology, and in particular to a method and system for inspecting and resetting silkscreen markings on PCB components based on SKILL. Background Technology

[0002] In the PCB design process of electronic products, Cadence Allegro is a widely used EDA design tool in the industry. The silkscreen layer on the PCB contains important information such as component outlines, polarity markings, and reference text. These markings not only guide component placement during production but also serve as crucial references for subsequent PCB debugging and repair. Allegro SKILL is a high-level programming language based on LISP built into the Cadence Allegro platform, allowing design engineers to directly access Allegro's internal database via API. During the PCB placement and routing phase, designers often need to frequently adjust component positions or optimize silkscreen movement to avoid obstructing pads or vias. During this process, it is easy to accidentally select and delete component silkscreen outlines or polarity markings. Because these elements lack electrical attributes, Allegro's standard electrical rule checks cannot identify such geometrical errors in non-electrical layers, creating a blind spot in the inspection process.

[0003] Currently, checking for missing silkscreen printing mainly relies on manual visual inspection. For high-density motherboards containing thousands of components, manually comparing each component instance with its package content is not only extremely labor-intensive but also prone to missed detections due to visual fatigue. In terms of SKILL secondary development, existing tools or programs for checking missing silkscreen printing are not yet fully functional, only able to check single types of silkscreen markings and lacking interactive capabilities for precise component reset. When an abnormal component package is detected, Allegro's native Refresh Symbol Instance function requires the user to manually select each component individually, failing to automatically locate the abnormal component. Furthermore, a forced refresh of all components on the board would reset all silkscreen printing positions already adjusted by the designer. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies, such as requiring users to manually select components one by one and the inability to automatically locate abnormal components. Therefore, this invention proposes a SKILL-based method and system for checking and resetting silkscreen markings on PCB components.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of this invention proposes a method for inspecting and resetting silkscreen markings on PCB components based on SKILL, which specifically includes the following steps: Step S1: Traverse all component instances in the PCB design file and obtain the database identifier for each component instance; Step S2: For the current device instance, obtain the first set of sub-objects of the device instance on the silkscreen layer, and the second set of sub-objects of the corresponding package definition of the device instance on the silkscreen layer. Step S3: Count the first quantity of each primitive type in the first sub-object set and the second quantity of the corresponding primitive type in the second sub-object set according to primitive type; Step S4: Compare the first quantity with the second quantity. If they are inconsistent, it is determined that the device has a missing silkscreen mark and the device is recorded as an abnormal device. Step S5: Obtain the location anchor point of the abnormal device, fill the identification information and location anchor point of the abnormal device into the interaction list, and highlight the abnormal device in the PCB editing view. The acquisition of the location anchor point of the abnormal device adopts a hierarchical strategy, specifically including: First priority: Determine whether the abnormal device has a tag number attribute. If it does, use the tag number attribute as the location index directly. Second priority: If the abnormal device does not have a tag number attribute, then determine whether the abnormal device has pins. If pins exist, then extract the coordinates of the first pin as the positioning anchor point. Third priority: If the abnormal device has neither a tag number attribute nor a pin, then traverse the sub-objects of the abnormal device. If a path type sub-object exists, then extract the endpoint coordinates of the path as the positioning anchor point; if a shape type sub-object exists, then extract the vertex coordinates of the shape as the positioning anchor point. Step S6: In response to the user-triggered reset command, a script file is generated based on the positioning anchor point of the abnormal device. The package refresh operation is performed in batches by replaying the script file to complete the reset of the silkscreen markings of the abnormal device.

[0006] Furthermore, in step S3, the primitive type includes path type, shape type, and text type; the path type corresponds to a line segment in the silkscreen layer, the shape type corresponds to a polygon or filled graphic in the silkscreen layer, and the text type corresponds to the tag text in the silkscreen layer. When calculating the first quantity, iterate through the first set of sub-objects and accumulate the number of paths, shapes, and text based on the layer attributes and object type of each sub-object. When calculating the second quantity, iterate through the second set of sub-objects and accumulate the number of paths, shapes, and text defined in the encapsulation definition based on the layer attributes and object type of each sub-object.

[0007] Furthermore, in step S6, generating the script file and performing batch encapsulation refresh operations specifically includes: Step S61: Create a script file to generate simulated mouse click instructions based on the positioning anchor point coordinates of each abnormal device. The simulated mouse click instructions are used to locate the target device in the PCB editing view. Step S62: Generate a package refresh instruction for each abnormal device in the script file. The package refresh instruction calls the package refresh command by simulating a right-click menu operation. Step S63: Close the script file and replay the script file through the system command interface to complete the encapsulation refresh of all abnormal devices in one go.

[0008] Furthermore, in step S6, before performing the encapsulation refresh operation, a lock state preprocessing step is also included: traversing each abnormal device, detecting whether the current device has a lock attribute, and if it has a lock attribute, temporarily removing the lock attribute, and restoring the lock attribute after the encapsulation refresh operation is completed.

[0009] Furthermore, the silkscreen layer includes a package geometry silkscreen layer and a board-level geometry silkscreen layer; in step S2, when obtaining the set of sub-objects of the device instance on the silkscreen layer, the sub-objects under the package geometry silkscreen layer and the board-level geometry silkscreen layer are retrieved simultaneously.

[0010] Furthermore, in step S5, when filling the identification information and positioning anchor point of the abnormal device into the interactive list, it also includes: filling the corresponding primitive type list of the top-level group or the bottom-level group according to the layer where the abnormal device is located, wherein the top-level group and the bottom-level group respectively contain six list controls: path list, shape list and text list.

[0011] Furthermore, it also includes an interactive positioning step: in response to the user's operation of selecting a certain abnormal device in the interactive list, the string corresponding to the selected operation is parsed, the identification information or positioning anchor coordinates of the abnormal device are extracted, all current layers are turned off, a preset inspection layer is turned on, and the center point of the PCB editing view is moved to the positioning anchor coordinates.

[0012] Furthermore, in step S4, after recording the abnormal device, an abnormal list management step is also included: abnormal devices with abnormal path quantity are recorded in the path abnormal list, abnormal devices with abnormal shape quantity are recorded in the shape abnormal list, and abnormal devices with abnormal text quantity are recorded in the text abnormal list; the path abnormal list, shape abnormal list, and text abnormal list are stored separately at the top and bottom levels.

[0013] A second aspect of this invention also proposes a SKILL-based PCB component silkscreen marking inspection and reset system, which uses the method described above, specifically including: An interactive interface module is used to provide a user operation interface, which includes a check trigger button, a reset trigger button, and at least one abnormal device list control. The scanning statistics module is used to traverse all component instances in the PCB design file and count the first and second quantities of each component instance and its corresponding package definition in the silkscreen layer according to the primitive type. The difference determination module is used to compare the first quantity with the second quantity, and when the two are inconsistent, it determines that the device has a missing silk screen mark and generates an abnormal device record. Anchor point positioning module is used to obtain the positioning anchor points of abnormal devices using a hierarchical strategy, wherein the hierarchical strategy is as follows: tag number index, pin coordinate extraction, and geometric endpoint extraction. The list filling module is used to fill the identification information and positioning anchor points of abnormal devices into the abnormal device list control, and control the PCB editing view to highlight the abnormal devices; The script generation and playback module is used to dynamically generate script files based on the positioning anchor points of abnormal devices, and to play back the script files through the system command interface to perform batch package refresh operations to reset the silkscreen markings of abnormal devices. The view linkage module is used to respond to the user's selection operation in the abnormal device list control and control the PCB editing view to jump to the corresponding abnormal device location.

[0014] This invention proposes a SKILL-based method and system for inspecting and resetting PCB component silkscreen markings. The advantages are as follows: This invention achieves quantitative detection of component silkscreen integrity through a bidirectional quantitative comparison method, accurately identifying localized missing silkscreen outlines, polarity marks, and reference numeral text, effectively filling the technical gap where electrical rule inspection cannot detect geometric defects in non-electrical layers. Simultaneously, a multi-level anchor point positioning strategy solves the positioning problem for components without reference numerals, and dynamic script generation technology enables efficient batch resetting of abnormal components. This invention upgrades silkscreen inspection from traditional manual visual inspection to automated, precise detection, significantly improving the efficiency and accuracy of silkscreen inspection in the later stages of PCB design and reducing the risk of reverse component placement due to silkscreen errors. Attached Figure Description

[0015] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a logic flowchart of the method of the present invention; Figure 3 This is a system block diagram of the present invention; Figure 4 This is a flowchart illustrating the usage of the system of the present invention. Detailed Implementation

[0016] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0017] As attached Figure 1 and attached Figure 2 As shown, this invention provides a method for checking and resetting PCB component silkscreen markings based on the Allegro SKILL language. This method aims to solve the technical problem that traditional electrical rule checks cannot detect non-electrical layer defects caused by partial or complete loss of component silkscreen markings, including outlines, polarity marks, and reference numerals, due to errors during PCB design. The method runs in the Allegro PCB Editor environment, using the SKILL language to call the underlying database API, achieving fully automated scanning, anomaly detection, interactive location, and batch resetting of all components on the board.

[0018] Overall, the method includes six core steps: traversing the entire board of components and obtaining database identifiers S1, extracting silkscreen layer sub-objects of instances and packages S2, bidirectional quantity statistics by primitive type S3, quantity comparison and anomaly judgment S4, anchor point location of abnormal components and interactive list filling S5, and dynamic script generation and batch reset execution S6. The detailed implementation principles and preferred implementation methods of the above steps will be described in detail below. Step S1: Traverse all component instances in the PCB design file and obtain the database identifier for each component instance; Reference Figure 2 After the user enters a preset startup command, such as "checksc", in the Allegro command line and triggers this method, the system first performs initialization operations, including creating a temporary interactive interface file and registering callback functions. Then, the method proceeds to step S1. Upon system startup, the preset startup command "checksc" is first registered as a program startup command using the axlCmdRegister function, ensuring that the method is correctly triggered after the user enters this command in the Allegro command line.

[0019] In this embodiment, step S1 specifically obtains the top-level database object of the currently active PCB design file by calling the API function axlDBGetDesign provided by Allegro SKILL. This function returns a database structure containing all information of the current design; subsequently, the system obtains a complete list of all device instances in the current design by accessing the symbols property of this structure. In a preferred embodiment of the present invention, this list is stored in the global variable AllSymbols for subsequent traversal.

[0020] Specifically, the program code for the system's main function entry point is as follows: text procedure(checksymbolcompletion() (let (chescfm) chescfm = ". / chescfm.form" checksc_form(chescfm) fm_chesc = axlFormCreate((gensym) chescfm '("C") '_chescCallback tnil) `when(isFile(chescfm) errset(deleteFile(chescfm))) ;` deletes the form file. axlFormDisplay(fm_chesc); Displays the form axlUIWPrint(fm_chesc "-by ZFD") )) The execution logic of the above code is as follows: First, a temporary form file path `. / chescfm.form` is defined and stored. Then, the custom form generation function `checksc_form` is called to create the form description file. After the form file is created, the `axlFormCreate` function loads the form file as an interactive form object and binds the callback function `_chescCallback`. After loading, the system checks whether the temporary form file exists using the `isFile` function. If it exists, the `deleteFile` function is called to delete it to keep the working directory clean. Finally, the interactive interface is displayed using the `axlFormDisplay` function. In addition, the system also outputs the version identifier information "-byZFD" in the interface using the `axlUIWPrint` function to indicate the source of the program.

[0021] The custom form generation function `checksc_form` creates a temporary interactive interface description file in the current PCB working directory using the `outfile` function, and writes parameters such as window size, title bar, and control layout according to the Allegro form definition syntax. Example code for this function to build the FORM file is as follows: text defun(checksc_form (chescfm) (let (file) Output file file = outfile(chescfm) fprintf(file "FILE_TYPE=FORM_DEFN VERSION=2\n") fprintf(file "FORM AUTOGREYTEXT\n") fprintf(file "FIXED\n") fprintf(file "PORT 100 80\n") fprintf(file "HEADER \"CheckSymbolCompletion\"\n") fprintf(file "TILE\n") Start Check button `fprintf(file "FIELD checksc_callback\n");` is the callback function. fprintf(file "FLOC 2 4\n") fprintf(file "MENUBUTTON \"Start Check\" 12 2\n") fprintf(file "ENDFIELD\n") )) In the aforementioned FORM file, the system defines two groups: a top-level group and a bottom-level group. Each group contains three multi-select list controls with variable names TopLine, TopShape, and TopText, and BotLine, BotShape, and BotText, corresponding to the top-level wireframe exception list, top-level fill exception list, and top-level text exception list, as well as the bottom-level wireframe exception list, bottom-level fill exception list, and bottom-level text exception list, respectively. Function buttons are also defined above the groups, including a "Start Check" button to initiate the check and a "Refresh SymbolInstance" button to trigger a batch reset.

[0022] Unlike existing technologies that rely on manual point-by-point selection or fuzzy search based on tag numbers, this invention directly obtains all device instances from the underlying database, ensuring that the inspection scope covers all devices on the board, including unconventional devices without tag numbers or pins, fundamentally eliminating blind spots in the inspection. At the same time, this step provides a reliable data source for subsequent device-by-device traversal and data statistics.

[0023] Step S2: For the current device instance, obtain the first set of sub-objects of the device instance on the silkscreen layer, and the second set of sub-objects of the corresponding package definition of the device instance on the silkscreen layer. The silkscreen layer mentioned in this step includes the package geometry silkscreen layer and the board-level geometry silkscreen layer; in step S2, when obtaining the set of sub-objects of the device instance on the silkscreen layer, the sub-objects under the package geometry silkscreen layer and the board-level geometry silkscreen layer are retrieved at the same time.

[0024] Specifically, after obtaining the AllSymbols list, the system starts a foreach loop to traverse the list one by one. When traversing the AllSymbols list, the system first reads the isMirrored attribute of the current device instance. If the value of this attribute is t, it is determined that the device is at the bottom layer, and the bottom layer statistical logic is entered; otherwise, it is determined that the device is at the top layer, and the top layer statistical logic is entered. For the device instance currently being processed, denoted as variable x, step S2 performs sub-object extraction operations for both dimensions.

[0025] First Dimension: Extraction of Device Instance Sub-objects The system retrieves all entity child objects of the current device instance on the PCB board by accessing x->children. These child objects include, but are not limited to, line segments, filled shapes, text, pins, etc. This invention specifically limits the layer filtering conditions during extraction: only child objects located on the Silkscreen Layer are extracted.

[0026] In a preferred embodiment of the present invention, the silkscreen layer definition not only includes the standard PACKAGEGEOMETRY / SILKSCREEN_TOP and PACKAGE GEOMETRY / SILKSCREEN_BOTTOM layers, but also simultaneously covers the BOARD GEOMETRY / SILKSCREEN_TOP and BOARD GEOMETRY / SILKSCREEN_BOTTOM layers through a logical OR operation. This design takes into account the differences in layer naming under different PCB design companies or different library standards, ensuring compatibility with various design files. Specifically, when traversing x->children, the following judgment is performed on each child object: if child->layer is equal to any of the above four layers, then the child object is included in the first child object set.

[0027] Second dimension: Encapsulation and definition of sub-object extraction Meanwhile, the system indexes x->definition to the original definition data of the package corresponding to the current device in the PCB package library; then it accesses x->definition->children to obtain all child objects in that package definition. Similarly, the system uses the same layer filtering conditions to extract the silkscreen layer child objects in the package definition, including the four silkscreen layers under PACKAGE GEOMETRY and BOARD GEOMETRY, forming a second set of child objects.

[0028] By simultaneously acquiring the actual graphic information on the board and the original graphic information defined in the library, this invention establishes an objective reference benchmark for subsequent difference determination, overcoming the technical difficulty of traditional methods that rely on only a single data source and cannot determine what is missing.

[0029] Step S3: Count the first quantity of each primitive type in the first sub-object set and the second quantity of the corresponding primitive type in the second sub-object set according to primitive type; In some embodiments, in this step, the primitive type includes path type, shape type and text type; the path type corresponds to a line segment in the silkscreen layer, the shape type corresponds to a polygon or filled graphic in the silkscreen layer, and the text type corresponds to a tag text in the silkscreen layer. When calculating the first quantity, iterate through the first set of sub-objects and accumulate the number of paths, shapes, and text based on the layer attributes and object type of each sub-object. When calculating the second quantity, iterate through the second set of sub-objects and accumulate the number of paths, shapes, and text defined in the encapsulation definition based on the layer attributes and object type of each sub-object.

[0030] Specifically, after completing the sub-object extraction in step S2, the method proceeds to step S3, which involves counting the number of the first and second sub-object sets according to their primitive types.

[0031] In this embodiment, primitive types are divided into three categories: path types, corresponding to line segments / outlines in the silkscreen layer; shape types, corresponding to fill graphics / polarity markers in the silkscreen layer; and text types, corresponding to reference text or identifier text in the silkscreen layer. For the current device instance, the system establishes six counting variables: linecountTop (number of line segments in the top-level instance), shapecountTop (number of shapes in the top-level instance), textcountTop (number of text in the top-level instance), linecountBot (number of line segments in the bottom-level instance), shapecountBot (number of shapes in the bottom-level instance), and textcountBot (number of text in the bottom-level instance). Correspondingly, another set of six counting variables is established for the package definition, distinguished by the prefix "def".

[0032] Taking the underlying device as an example, when the system traverses the first sub-object collection, it executes the following logic in sequence: If the objType property of the current child object is path, then length(child->segments) is called to get the number of line segments contained in the path and added to the linecountbot variable. The reason for using the accumulation of line segment count instead of simply counting the number of path objects is that in the Allegro database model, a complete silkscreen frame may be composed of multiple line segments. Using the number of line segments as the statistical granularity can more accurately reflect the completeness of the silkscreen.

[0033] If the current child object's objType property is "polygon" or "shape", then length(child->segments) is called to get the number of its vertices / boundary segments and added to shapecountbot.

[0034] If the objType property of the current child object is text, then simply increment textcountbot by 1.

[0035] Similarly, when traversing the second sub-object collection, the system counts each primitive type in the encapsulation definition using the exact same statistical rules, obtaining deflinecountbot, defshapecountbot, and deftextcountbot.

[0036] The following example uses target statistics at the BOTTOM layer as an example to provide the specific program code implementation: text / *--- Component statistics for the BOTTOM layer ---* / foreach(child SymbolChildrenBot ; Determine the PATH of PACKAGE GEOMETRY / SILKSCREEN_BOTTOM, where the line attribute is PATH ; Add BOARD GEOMETRY / SILKSCREEN judgment if(child->layer == "PACKAGE GEOMETRY / SILKSCREEN_BOTTOM" || child->layer == "BOARD GEOMETRY / SILKSCREEN_BOTTOM" then if(child->objType == "path" then linecountbot = linecountbot + length(child->segments) ) ; if ) ; if ; Add BOARD GEOMETRY / SILKSCREEN judgment if(child->layer == "PACKAGE GEOMETRY / SILKSCREEN_BOTTOM" || child->layer == "BOARD GEOMETRY / SILKSCREEN_BOTTOM" then if(child->objType == "polygon" || child->objType == "shape"then shapecountbot = shapecountbot + length(child->segments) ) ; if ) ; if ; Determine the text of PACKAGE GEOMETRY / SILKSCREEN_BOTTOM if(child->layer == "PACKAGE GEOMETRY / SILKSCREEN_BOTTOM" || child->layer == "BOARD GEOMETRY / SILKSCREEN_BOTTOM" then if (child->objType == "text" then textcountbot = textcountbot + 1 ) ; if ) ; if ) ; foreach deflinecountbot = 0 defshapecountbot = 0 deftextcountbot = 0 / *--- Statistics of device packages in the BOTTOM layer ---* / foreach (defchild in SymdefChildrenBot if (defchild->layer == "PACKAGE GEOMETRY / SILKSCREEN_TOP" || defchild->layer == "BOARD GEOMETRY / SILKSCREEN_TOP" then if (defchild->objType == "path" then deflinecountbot = deflinecountbot + length(defchild->segments) ) ; if ) if (defchild->layer == "PACKAGE GEOMETRY / SILKSCREEN_TOP" || defchild->layer == "BOARD GEOMETRY / SILKSCREEN_TOP" then if (defchild->objType == "polygon" || defchild->objType == "shape" then defshapecountbot = defshapecountbot + length(defchild->segments) ) ; if ) ; if ; Determine the text of PACKAGE GEOMETRY / SILKSCREEN_BOTTOM if(defchild->layer == "PACKAGE GEOMETRY / SILKSCREEN_TOP" ||defchild->layer == "BOARD GEOMETRY / SILKSCREEN_TOP" then if(defchild->objType == "text" then deftextcountbot = deftextcountbot + 1 ) ; if ) ) ; foreach The above-described implementation method, which statistically analyzes each element type, refines the detection granularity from a coarse binary judgment of whether a device has silkscreen printing to a more refined diagnosis of whether the device's wireframe is complete, whether polarity markings are present, and whether reference text is missing. On the other hand, this multi-dimensional statistical data structure also lays the foundation for subsequently classifying and displaying abnormal information in the interactive interface.

[0037] Step S4: Compare the first quantity with the second quantity. If they are inconsistent, it is determined that the device has a missing silkscreen mark and the device is recorded as an abnormal device. After recording the abnormal devices in this step, the step also includes an abnormal list management step: abnormal devices with abnormal path quantity are recorded in the path abnormal list, abnormal devices with abnormal shape quantity are recorded in the shape abnormal list, and abnormal devices with abnormal text quantity are recorded in the text abnormal list; the path abnormal list, shape abnormal list, and text abnormal list are stored separately at the top and bottom levels.

[0038] Specifically, after completing the statistics in step S3, the method enters the core decision logic step S4. The system compares the number of instance primitives obtained in step S3 with the number of encapsulated definition primitives item by item.

[0039] Taking the underlying device as an example, the system performs the following three comparison and judgment steps in sequence: The first step is to compare the number of line segments: execute the logic judgment if(linecountbot != deflinecountbot). If the two values ​​are not equal, it is determined that the current device has missing or redundant silkscreen lines.

[0040] The second item is shape count comparison: execute the logic judgment if(shapecountbot !=defshapecountbot). If the two values ​​are not equal, it is determined that the current device has a missing polarity mark / fill pattern or a redundancy anomaly.

[0041] The third item is text count comparison: the execution logic judges if(textcountbot != deftextcountbot). If the two values ​​are not equal, it is determined that the current device has missing or redundant reference text.

[0042] If all three conditions are equal, the system determines that the device's silkscreen markings are complete, does not record it as an abnormal device, and continues to traverse the next device.

[0043] If any comparison result is unequal, the system determines that the device is abnormal. At this point, the system automatically calls the `axlHighlightObject(x)` function to highlight the device in the PCB editing view, allowing designers to quickly locate the abnormality visually. Simultaneously, the device's database identifier is stored in the corresponding abnormality list; for example, top-level devices with line segment abnormalities are stored in the `TopLineTargetSymbols` list, and bottom-level devices with shape abnormalities are stored in the `BotShapeTargetSymbols` list, for use in subsequent steps.

[0044] The following example uses the loss of shape type anomalies in the BOTTOM layer to illustrate the program code implementation for anomaly capture and anchor point calculation: text if(shapecountbot != defshapecountbot then axlHighlightObject(x) if (x->refdes == nil then) ShapeBotTargetSymbols_NoRef_target = reverse(cons(x->definition->name ShapeBotTargetSymbols_NoRef_target)) BotShapeMassage = sprintf(nil "%s (%.2f %.2f)" x->definition->name car(x->xy) cadr(x->xy)) axlFormListAddItem(fm_chesc "BotShape" BotShapeMassage 0) if (x->pins != nil then) ShapeBotTargetSymbols_NoRef = reverse(cons(car(x->pins)->xyShapeBotTargetSymbols_NoRef)) else foreach(BotShape_path x->children if(BotShape_path->layer == "PACKAGE GEOMETRY / SILKSCREEN_BOTTOM" || BotShape_path->layer == "BOARD GEOMETRY / SILKSCREEN_BOTTOM" then if(BotShape_path->objType == "shape" then BOTShape_XY = caar(car(axlPolyFromDB(BotShape_path))->vertices) ) ; if ) ; if if(BotShape_path->objType == "path" then BOTShape_XY = axlPathSegGetEndPoint(axlPathGetLastPathSeg(axlDB2Path(BotShape_path))) ) ; if ) ; foreach ShapeBotTargetSymbols_NoRef = reverse(cons(BOTShape_XYShapeBotTargetSymbols_NoRef)) ) ; if else ShapeBotTargetSymbols = reverse(cons(x->refdesShapeBotTargetSymbols)) axlFormListAddItem(fm_chesc "BotShape" x->refdes 0) ) ; if ) ; if The bidirectional quantity comparison method used in this step is one of the core innovations of this invention. Unlike the simple existence check in the prior art, this method can accurately detect missing silkscreen parts by quantitatively comparing the difference in the number of primitives between the instance and the definition. For example, the package definition has four line segments forming a rectangle, while the instance only has three line segments remaining. This quantitative detection mechanism effectively fills the technical gap that Allegro's native DRC cannot detect geometrical defects in non-electrical layers.

[0045] Step S5: Obtain the positioning anchor point of the abnormal device, fill the identification information and positioning anchor point of the abnormal device into the interactive list, and highlight the abnormal device in the PCB editing view; In this step, a hierarchical strategy is adopted to obtain the positioning anchor point of the abnormal device, specifically including: First priority: Determine whether the abnormal device has a tag number attribute. If it does, use the tag number attribute as the location index directly. Second priority: If the abnormal device does not have a tag number attribute, then determine whether the abnormal device has pins. If pins exist, then extract the coordinates of the first pin as the positioning anchor point. Third priority: If the abnormal device has neither a tag attribute nor a pin, then traverse the sub-objects of the abnormal device. If a path type sub-object exists, then extract the endpoint coordinates of the path as the positioning anchor point; if a shape type sub-object exists, then extract the vertex coordinates of the shape as the positioning anchor point.

[0046] In addition, when filling the identification information and positioning anchor points of the abnormal device into the interactive list in this step, it also includes: filling the corresponding primitive type list of the top-level group or the bottom-level group according to the layer where the abnormal device is located, wherein the top-level group and the bottom-level group respectively contain six list controls: path list, shape list and text list.

[0047] Specifically, after identifying and recording the abnormal device, the method proceeds to step S5, which aims to solve the problem of accurate positioning and display of abnormal devices in the interactive interface, especially for unconventional devices without reference numbers or pins.

[0048] The system first checks the x->refdes property of the current abnormal device. If the property is not empty, for example, if it returns a valid reference number string such as R1 or C2, then the reference number string is directly used as the device identification information and added to the corresponding list control in the interactive interface by calling the axlFormListAddItem function. For example, the abnormal device with the top-level reference number is added to the TopText list, and the reference number string is stored in the abnormal list variable at the same time.

[0049] If the `x->refdes` attribute is empty (nil), it indicates that the current device is a device without a reference number, such as an optical positioning point (Fiducial), authentication mark, or QR code label. In existing technologies, such devices often become blind spots for inspection due to the lack of a conventional reference number indexing mechanism. This invention designs a multi-level anchor point positioning strategy, as follows: First priority: Pin coordinate extraction: The system checks the x->pins attribute. If the device has pins (i.e., x->pins != nil), the coordinates of the first pin are extracted as the positioning anchor point, i.e., car(x->pins)->xy. As elements with definite geometric positions on the device, the coordinates of the pins can accurately reflect the actual installation position of the device.

[0050] The second priority is geometric endpoint extraction: If the device has neither a tag number nor pins (e.g., pure copper foil markings or mechanical positioning points), the system iterates through the device's x->children set of child objects, extracting the endpoints or vertex coordinates of the geometric shape as positioning anchor points. Specifically: if the child object type is path, the axlPathSegGetEndPoint and axlPathGetLastPathSeg functions are called to extract the coordinates of the end point of the path; if the child object type is shape or polygon, the axlPolyFromDB function is called to extract the vertex coordinates on the shape boundary.

[0051] After obtaining the anchor point, the system combines the anchor point coordinates with the device package name and formats it into a description string. For example, a device with the package name Fiducial is formatted as Fiducial (100.0 200.0), where the coordinates of the anchor point are in parentheses. Subsequently, the system adds this string to the corresponding exception list control in the interactive interface using axlFormListAddItem, and simultaneously stores the original coordinate data in the ShapeBotTargetSymbols_NoRef exception list.

[0052] The aforementioned anchor point positioning and string formatting process, on the one hand, provides a user-interactive medium for devices without location numbers through coordinate strings; on the other hand, the separate storage of coordinate data provides precise geometric parameters for subsequent view navigation and script generation, thus achieving a technological leap from unselectable devices to accurate positioning and repair.

[0053] Step S6: In response to the user-triggered reset command, a script file is generated based on the positioning anchor point of the abnormal device. The package refresh operation is performed in batches by replaying the script file to complete the reset of the silkscreen markings of the abnormal device.

[0054] In this step, generating the script file and performing batch encapsulation refresh operations specifically includes: Step S61: Create a script file to generate simulated mouse click instructions based on the positioning anchor point coordinates of each abnormal device. The simulated mouse click instructions are used to locate the target device in the PCB editing view. Step S62: Generate a package refresh instruction for each abnormal device in the script file. The package refresh instruction calls the package refresh command by simulating a right-click menu operation. Step S63: Close the script file and replay the script file through the system command interface to complete the encapsulation refresh of all abnormal devices in one go.

[0055] In addition, before performing the encapsulation refresh operation, a lock state preprocessing step is included: traversing each abnormal device, detecting whether the current device has a lock attribute, and if it has a lock attribute, temporarily removing the lock attribute and restoring the lock attribute after the encapsulation refresh operation is completed.

[0056] Specifically, when the user clicks the "Refresh Symbol Instance" button in the interactive interface, the method proceeds to step S6, the batch reset execution phase. Unlike the conventional direct API call method, this invention uses dynamic script generation technology to implement the reset operation, and its specific implementation method is as follows.

[0057] The system first calls the `outfile` function to create a temporary script file named `. / update_symbolInstance.scr` in the current PCB working directory. This script file follows Allegro's macro command syntax.

[0058] Subsequently, the system iterates through all the abnormal device lists recorded in step S5, including lists of abnormal devices with tag numbers and lists of abnormal devices without tag numbers. For each abnormal device, the system writes the following command sequence to the script file based on its stored positioning anchor point coordinates: Enter the `setwindow pcb` command to ensure that the focus is on the PCB editing window; Write `pick grid tgl` followed by coordinate values, for example, `pick grid tgl 100.0 200.0`. This command simulates clicking the mouse at the specified coordinates, thereby precisely selecting the target device. Write `pop dyn_option_select '@:@Refresh symbol instance'`, which simulates the user selecting the "Refresh Symbol Instance" option in the right-click menu; Write the refresh syminst command to perform a wrapper refresh; Write the "done" command to complete the update operation for the current device.

[0059] For devices with a locked attribute, this method checks the device's locked state using the axlDBIsFixed function before writing the refresh command. If the device is detected as locked (Fixed), axlDBDeleteProp(symbol_DBID "FIXED") is called to temporarily remove the locked attribute, ensuring the refresh command can be executed normally. After the reset is complete, the user can choose whether to restore the locked attribute.

[0060] The following example uses updating a device with a reference number as an example, and provides the specific program code implementation: text defun(update_symbol_refdes (TopTargetSymbols) let(() foreach(symbol TopTargetSymbols symbol_DBID = car(axlSelectByName("REFDES" symbol)) If symbol_DBID != nil, then do not execute for devices without a PIN. if (axlDBIsFixed(symbol_DBID) == nil then ; Check if the device is locked. symbol_Pin = car(symbol_DBID->pins) if (symbol_Pin != nil then Pin_bBoxLl = car(symbol_Pin->bBox) Pin_bBoxUr = cadr(symbol_Pin->bBox) symbol_xy = symbol_Pin->xy axlZoomToDbid(symbol_DBID t); Moves the view to the current device. addpick = "pick grid tgl " addpickline = sprintf(nil "%s %L " addpicksymbol_xy) fprintf(rpt "%s\n" addpickline) ) ; if ) ; if ) ; if ) ; foreach ) ; let ) ; defun The following example demonstrates the specific code implementation for resetting the color of a component with a reference number: text defun(assignsymbolscolor_refdes (TopTargetSymbols) let(() foreach(symbol TopTargetSymbols `axlCustomColorObject(car(axlSelectByName("REFDES" symbol))112) ;` assigns purple color to the target device. ) ; foreach ) ; let ) ; defun After the command sequence for all faulty devices has been written, the system closes the script file and replays it by calling the command `axlShell("replay . / update_symbolInstance.scr")`. The Allegro system will execute the macro commands in the script line by line, completing the package refresh operation for all faulty devices in one go.

[0061] Compared to existing technologies that require users to manually select devices one by one and perform refresh operations, the dynamic script generation technology of this invention achieves fully automated batch processing for resetting abnormal devices. Furthermore, compared to directly calling API functions for device updates, the script replay technology can more completely simulate the user's operation process, has stronger compatibility, and is particularly suitable for complex update scenarios that require calling Allegro's native menu commands.

[0062] After all devices have been reset, the system calls the `axlCustomColorObject` function to highlight all repaired devices in purple (Color ID 112) to visually distinguish them from those that did not malfunction, facilitating final review by designers. Subsequently, the system clears all exception lists in the interactive interface and displays a confirmation dialog box to indicate that the update is complete. Simultaneously, the system adds a null value identifier to each exception list control to indicate that there are no more pending exception devices. This concludes the process.

[0063] It also includes an interactive positioning step: in response to the user's operation of selecting a certain abnormal device in the interactive list, the string corresponding to the selected operation is parsed, the identification information or positioning anchor coordinates of the abnormal device are extracted, all current layers are turned off, a preset inspection layer is turned on, and the center point of the PCB editing view is moved to the positioning anchor coordinates.

[0064] When a user uses this system, the abnormal device information detected in step S5 is already populated in the various abnormal list controls on the interactive interface. When the user clicks on any list item, the system captures the click event through a callback function and triggers the interactive positioning process. Specifically, in the form definition of the interactive interface, each list control is bound to a corresponding callback processing logic. Taking the top-level line segment abnormal list as an example, when the user clicks on an item in the list, the system first calls the form field retrieval function to obtain the content of the currently selected item. This content is in string form, such as containing the reference number R1 or a descriptive string containing the package name and coordinates.

[0065] The following example uses the user interaction logic in the TopLine section of the callback function as an example to provide the specific program code implementation: text ("TopLine" ; TopLine List) `ivalues ​​= axlFormGetField(fm_chesc "TopLine");` retrieves the parameters corresponding to the clicked value in the LIST control. If `ivalues ​​!= "\316\336"` then; add a check to see if it's empty. If device information is present, then execute the jump. `when(ivalues;` executes the following when content in the LIST control is clicked: Show TOP assembly layer axlVisibleDesign(nil); Turns off all layers axlVisibleLayer("PIN / TOP" t) axlVisibleLayer("PACKAGE GEOMETRY / SILKSCREEN_TOP" t) axlVisibleLayer("PACKAGE GEOMETRY / ASSEMBLY_TOP" t) axlVisibleLayer("BOARD GEOMETRY / SILKSCREEN_TOP" t) axlVisibleLayer("BOARD GEOMETRY / OUTLINE" t) axlUIWRedraw(nil); Refresh the view TopLine_targetvalues ​​= processString(ivalues) axlZoomCenter(0 TopLine_targetvalues) ) ; when ) ; if TopLine Subsequently, the system calls an auxiliary string parsing function to parse the acquired string. This parsing function extracts target information according to predefined string format rules: if the string only contains the tag number character, it is directly returned as the device identifier; if the string contains the package name and coordinate information, such as Fiducial followed by a pair of numerical values ​​enclosed in parentheses, the parsing function extracts the coordinate values ​​from it, which are used as the x-coordinate and y-coordinate values ​​respectively.

[0066] After completing the information parsing, the system performs view control operations. First, the system calls the layer visibility setting function and passes in an empty value to disable the display of all layers in the current PCB editing view. The purpose of this operation is to clear visual interference in the current view so that the target device for subsequent navigation can be clearly presented to the user.

[0067] Subsequently, the system sequentially calls the layer visibility enabling function, selectively enabling preset inspection-related layers. In a preferred embodiment of the invention, the enabled layers include the top-level pin layer, the top-level silkscreen layer of the package geometry, the top-level assembly layer of the package geometry, the top-level silkscreen layer of the board-level geometry, and the board-level geometry outline layer. For the positioning of underlying devices, the corresponding underlying layers are enabled. By enabling only a limited number of layers closely related to device inspection, rather than all layers, the invention effectively reduces redundant graphic information in the view, making the target device and its silkscreen markings immediately apparent after navigation.

[0068] After completing the layer settings, the system calls the view refresh function to refresh the current display. Then, the system obtains the parsed anchor point coordinates and calls the view centering function to move the display center point of the PCB editing view to those coordinates. The first parameter of this view centering function is the scaling factor; passing a value of 0 here indicates no scaling operation and only view translation. The second parameter is the target coordinate value, including the horizontal and vertical coordinates. After executing this function, the PCB editing view is repositioned around the target component, achieving a synchronized response from list clicks to view transitions.

[0069] It is worth noting that the interactive positioning step of the present invention also includes the judgment and processing of empty options. When the system detects that the content of the list item selected by the user is empty or is a specific null value identifier, such as the use of special encoding to represent empty items in some interface implementations, the system determines that the currently selected item does not contain valid device information. At this time, the view jump operation is not performed, thereby avoiding program exceptions caused by null references. Example

[0070] Reference Figure 3 , Figure 4 The second aspect of this invention also proposes a SKILL-based PCB device silkscreen marking inspection and reset system. This system uses the method described in Embodiment 1 and runs in the Allegro PCB Editor environment. Through a modular architecture design, this system encapsulates the six core steps and interactive positioning steps of the method described in Embodiment 1 into functionally independent software modules. The modules communicate and cooperate with each other through data interfaces to jointly complete the complete workflow from device scanning to abnormal reset and interactive positioning.

[0071] The overall workflow of the system is as follows: The user triggers the inspection operation through the interactive interface module; the scanning and statistics module then starts and completes the statistical count of all components on the board; the difference determination module compares the statistical data and generates anomaly records; the anchor point positioning module calculates the positioning anchor point for each abnormal component; the list filling module presents the anomaly information on the interactive interface; the user can review each item through the view linkage module; and finally, the script generation and playback module completes the batch reset. The specific implementation principles and preferred implementation methods of the above seven modules will be described in detail below.

[0072] An interactive interface module is used to provide a user operation interface, which includes a check trigger button, a reset trigger button, and at least one abnormal device list control. The interactive interface module provides the user interface and serves as a bridge between the system and the designers. (See attached image) Figure 3As shown, this module is implemented using the form creation function of the SKILL language. When the system starts, the interactive interface module creates a temporary form description file in the current PCB working directory. This file defines the window size, title bar, and the layout, position, and properties of each control.

[0073] The core controls of the user interface include a check trigger button, a reset trigger button, and a list of six abnormal devices. The check trigger button initiates the whole-board scan and inspection process, while the reset trigger button triggers a batch package refresh operation. The six list controls are arranged into top-level and bottom-level groups, with each group containing three list controls corresponding to three graphic element types: line segment abnormalities, shape abnormalities, and text abnormalities. This allows abnormal information to be clearly categorized and presented according to both the device's layer and its graphic element type.

[0074] The interactive interface module also includes a callback function registration mechanism, which binds callback functions to each control during the form loading process, and automatically triggers the corresponding business logic when the user clicks a button or selects a list item.

[0075] The scanning statistics module is used to traverse all component instances in the PCB design file and count the first and second quantities of each component instance and its corresponding package definition in the silkscreen layer according to the primitive type. The scanning statistics module is used to traverse all component instances in the PCB design file and count the first and second quantities of each component instance and its corresponding package definition in the silkscreen layer according to the primitive type.

[0076] This module first calls the application programming interface (API) function to obtain the top-level database object of the current PCB design file, and then obtains a complete list of all component instances by accessing its `symbols` property. It then starts a loop to traverse this list. During the traversal, the module first reads the `isMirrored` property of the current component instance to determine the layer in which the component resides. For each component instance, the module accesses both its instance object collection and the package definition sub-object collection, and uses layer properties as a filter to extract only the sub-objects located on the silkscreen layer. The silkscreen layer contains four layers: the top silkscreen layer and the bottom silkscreen layer under the `PACKAGE GEOMETRY` class and the `BOARD GEOMETRY` class.

[0077] After extracting sub-objects, the module performs quantity statistics based on primitive type. Primitive types are divided into three categories: path type, shape type, and text type. For path types, the module accumulates the number of line segments it contains; for shape types, the module accumulates the number of vertices or boundary segments; for text types, the module directly increments the count by one. The module counts the number of instance line segments, instance shapes, and instance text for each device instance at both the top and bottom layers, and defines six corresponding counting variables for the encapsulation.

[0078] The difference determination module is used to compare the first quantity with the second quantity, and when the two are inconsistent, it determines that the device has a missing silk screen mark and generates an abnormal device record. The difference determination module is used to compare the first quantity obtained by the scanning statistics module with the second quantity. When the two are inconsistent, it is determined that the device has a missing silk screen mark and an abnormal device record is generated.

[0079] The module sequentially performs three checks: whether the number of instance line segments is not equal to the number of package-defined line segments, whether the number of instance shapes is not equal to the number of package-defined shapes, and whether the number of instance text is not equal to the number of package-defined text. These checks are performed on both the top and bottom layers. If any check is true, the module determines that the current device has a missing silkscreen identifier anomaly, calls the highlight object function to highlight the device in the PCB editing view, and stores the current device's database identifier in the corresponding anomaly list based on the specific anomaly type. These lists include six categories such as the top-level line segment anomaly list and the bottom-level shape anomaly list.

[0080] Anchor point positioning module is used to obtain the positioning anchor points of abnormal devices using a hierarchical strategy, wherein the hierarchical strategy is as follows: tag number index, pin coordinate extraction, and geometric endpoint extraction. The anchor point positioning module is used to obtain the positioning anchor points of abnormal devices using a hierarchical strategy, which consists of tag number indexing, pin coordinate extraction, and geometric endpoint extraction.

[0081] The module first checks the tag number attribute of the current abnormal device. If a valid tag number exists, it is directly used as the positioning anchor point. If the tag number is empty, the module checks the pin attributes of the device. If pins exist, the coordinates of the first pin are extracted as the positioning anchor point. If the device has neither a tag number nor pins, the module traverses the device's sub-object set to extract geometric endpoints: for path-type sub-objects, the coordinates of the path's end point are extracted; for shape-type sub-objects, the coordinates of the boundary vertices are extracted. This three-level strategy ensures that the system can obtain valid position information regardless of the device type.

[0082] The list filling module is used to fill the identification information and positioning anchor points of abnormal devices into the abnormal device list control, and control the PCB editing view to highlight the abnormal devices; The list population module is used to populate the identification information and location anchor points of abnormal devices into the abnormal device list control provided by the interactive interface module.

[0083] For abnormal devices with a tag number, the module directly uses that tag number string as the display content of the list item. For abnormal devices without a tag number, the module combines the coordinate values ​​obtained by the anchor point positioning module with the device package name to form a description string, formatted as the package name followed by the coordinate values ​​enclosed in parentheses. The module adds the above information to the list control of the corresponding graphic type using the list addition function, and at the same time saves the complete database identifier and positioning anchor point coordinate data of the abnormal device in the internal storage list for subsequent module calls.

[0084] The script generation and playback module is used to dynamically generate script files based on the positioning anchor points of abnormal devices, and to play back the script files through the system command interface to perform batch package refresh operations to reset the silkscreen markings of abnormal devices. The script generation and playback module is used to dynamically generate script files based on the positioning anchor points of abnormal devices, and to play back the script files through the system command interface to perform batch package refresh operations to reset the silkscreen markings of abnormal devices.

[0085] After the user clicks the reset trigger button, the module iterates through the internally stored list of all abnormal devices, obtaining the coordinates of the anchor point for each device. The module then creates a temporary script file in the working directory, sequentially writing simulated mouse click commands and encapsulation refresh command sequences for each abnormal device. For locked devices, the module writes a command to remove the locked attribute before writing the refresh command. After all command sequences are written, the module executes the script file through the system command replay function, completing the encapsulation refresh operation for all abnormal devices in sequence. Upon completion, the module marks repaired devices in purple, clears the abnormal list, displays a completion message, and adds a null identifier to each abnormal list control to indicate no null value.

[0086] The view linkage module is used to respond to the user's selection operation in the abnormal device list control and control the PCB editing view to jump to the corresponding abnormal device location.

[0087] The view linkage module is used to respond to the user's selection operation in the abnormal component list control and control the PCB editing view to jump to the corresponding abnormal component location.

[0088] When a user clicks a list item, the view linkage module retrieves the selected item's content string via a callback function and calls an auxiliary parsing function to extract the tag number or locate the anchor point coordinates. The module then disables all layers to eliminate visual clutter, selectively enables preset inspection layers, including pin layers, silkscreen layers, assembly layers, and outline layers, and finally moves the center point of the PCB editing view to the target coordinates, achieving a synchronized response from list click to view jump.

[0089] The seven modules described above work together to form a complete closed-loop system from anomaly detection to interactive localization and batch reset. Through this system, designers can complete the silkscreen marking inspection and reset work—a task that traditionally required extensive manual visual inspection and operation—simply by clicking buttons and selecting items from a list on the interactive interface. This significantly improves the efficiency and accuracy of silkscreen inspection in the later stages of PCB design.

[0090] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for inspecting and resetting silkscreen markings on PCB components based on SKILL, characterized in that, Includes the following steps: Step S1: Traverse all component instances in the PCB design file and obtain the database identifier for each component instance; Step S2: For the current device instance, obtain the first set of sub-objects of the device instance on the silkscreen layer, and the second set of sub-objects of the corresponding package definition of the device instance on the silkscreen layer. Step S3: Count the first quantity of each primitive type in the first sub-object set and the second quantity of the corresponding primitive type in the second sub-object set according to primitive type; Step S4: Compare the first quantity with the second quantity. If they are inconsistent, it is determined that the device has a missing silkscreen mark and the device is recorded as an abnormal device. Step S5: Obtain the location anchor point of the abnormal device, fill the identification information and location anchor point of the abnormal device into the interaction list, and highlight the abnormal device in the PCB editing view. The acquisition of the location anchor point of the abnormal device adopts a hierarchical strategy, specifically including: First priority: Determine whether the abnormal device has a tag number attribute. If it does, use the tag number attribute as the location index directly. Second priority: If the abnormal device does not have a tag number attribute, then determine whether the abnormal device has pins. If pins exist, extract the coordinates of the first pin as the positioning anchor point. Third priority: If the abnormal device has neither a tag number attribute nor a pin, then traverse the sub-objects of the abnormal device. If a path type sub-object exists, then extract the endpoint coordinates of the path as the positioning anchor point; if a shape type sub-object exists, then extract the vertex coordinates of the shape as the positioning anchor point. Step S6: In response to the user-triggered reset command, a script file is generated based on the positioning anchor point of the abnormal device. The package refresh operation is performed in batches by replaying the script file to complete the reset of the silkscreen markings of the abnormal device.

2. The method according to claim 1, characterized in that, In step S3, the primitive type includes path type, shape type and text type; the path type corresponds to the line segment in the silkscreen layer, the shape type corresponds to the polygon or filled graphic in the silkscreen layer, and the text type corresponds to the tag text in the silkscreen layer. When calculating the first quantity, iterate through the first set of sub-objects and accumulate the number of paths, shapes, and text based on the layer attributes and object type of each sub-object. When calculating the second quantity, iterate through the second set of sub-objects and accumulate the number of paths, shapes, and text defined in the encapsulation definition based on the layer attributes and object type of each sub-object.

3. The method according to claim 1, characterized in that, In step S6, generating the script file and performing the encapsulation refresh operation in batches specifically includes: Step S61: Create a script file to generate simulated mouse click instructions based on the positioning anchor point coordinates of each abnormal device. The simulated mouse click instructions are used to locate the target device in the PCB editing view. Step S62: Generate a package refresh instruction for each abnormal device in the script file. The package refresh instruction calls the package refresh command by simulating a right-click menu operation. Step S63: Close the script file and replay the script file through the system command interface to complete the encapsulation refresh of all abnormal devices in one go.

4. The method according to claim 3, characterized in that, In step S6, before performing the encapsulation refresh operation, a lock state preprocessing step is also included: traversing each abnormal device, detecting whether the current device has a lock attribute, and if it has a lock attribute, temporarily removing the lock attribute and restoring the lock attribute after the encapsulation refresh operation is completed.

5. The method according to claim 1, characterized in that, The silkscreen layer includes a package geometry silkscreen layer and a board-level geometry silkscreen layer; in step S2, when obtaining the set of sub-objects of the device instance on the silkscreen layer, the sub-objects under the package geometry silkscreen layer and the board-level geometry silkscreen layer are retrieved simultaneously.

6. The method according to claim 1, characterized in that, In step S5, when filling the identification information and positioning anchor point of the abnormal device into the interactive list, it also includes: filling the corresponding primitive type list of the top-level group or the bottom-level group according to the layer where the abnormal device is located, wherein the top-level group and the bottom-level group respectively contain six list controls: path list, shape list and text list.

7. The method according to claim 6, characterized in that, It also includes an interactive positioning step: in response to the user's operation of selecting a certain abnormal device in the interactive list, the string corresponding to the selected operation is parsed, the identification information or positioning anchor coordinates of the abnormal device are extracted, all current layers are turned off, a preset inspection layer is turned on, and the center point of the PCB editing view is moved to the positioning anchor coordinates.

8. The method according to claim 1, characterized in that, In step S4, after recording the abnormal device, the abnormal list management step is also included: recording abnormal devices with abnormal path quantity to the path abnormal list, recording abnormal devices with abnormal shape quantity to the shape abnormal list, and recording abnormal devices with abnormal text quantity to the text abnormal list. The path anomaly list, shape anomaly list, and text anomaly list are stored separately at the top and bottom levels, respectively.

9. A SKILL-based PCB component silkscreen marking inspection and reset system, using the method as described in any one of claims 1-8, characterized in that, include: An interactive interface module is used to provide a user operation interface, which includes a check trigger button, a reset trigger button, and at least one abnormal device list control. The scanning statistics module is used to traverse all component instances in the PCB design file and count the first and second quantities of each component instance and its corresponding package definition in the silkscreen layer according to the primitive type. The difference determination module is used to compare the first quantity with the second quantity, and when the two are inconsistent, it determines that the device has a missing silk screen mark and generates an abnormal device record. Anchor point positioning module is used to obtain the positioning anchor points of abnormal devices using a hierarchical strategy, wherein the hierarchical strategy is as follows: tag number index, pin coordinate extraction, and geometric endpoint extraction. The list filling module is used to fill the identification information and positioning anchor points of abnormal devices into the abnormal device list control, and control the PCB editing view to highlight the abnormal devices; The script generation and playback module is used to dynamically generate script files based on the positioning anchor points of abnormal devices, and to play back the script files through the system command interface to perform batch package refresh operations to reset the silkscreen markings of abnormal devices. The view linkage module is used to respond to the user's selection operation in the abnormal device list control and control the PCB editing view to jump to the corresponding abnormal device location.