An automatic assembly method and system for a standard planetary roller screw pair based on secondary development of SolidWorks

By using API functions developed in SolidWorks, a program was written to automatically assemble planetary roller screw pairs, solving the problems of low efficiency and error-proneness in existing technologies and achieving efficient and universal automatic assembly.

CN120541986BActive Publication Date: 2026-04-28NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV OF SCI & TECH
Filing Date
2025-05-13
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies for the automatic assembly of planetary roller screw pairs lack a complete solution for part feature recognition, automatic definition of mating relationships, and user-interactive driving, resulting in low efficiency, susceptibility to errors, and complex and uncommon traditional methods.

Method used

By using SolidWorks secondary development and API functions to write programs, automatic part assembly can be achieved, including creating new assembly files, importing parts, obtaining assembly features, adding mating relationships and parametrically driving assembly. The user interface is integrated to input assembly parameters and part file paths, simplifying program logic and improving efficiency.

Benefits of technology

It enables efficient and universal automatic assembly of planetary roller screw pairs, reduces computational load, improves assembly accuracy and operational efficiency, and reduces human error rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120541986B_ABST
    Figure CN120541986B_ABST
Patent Text Reader

Abstract

The application discloses a standard planetary roller screw pair automatic assembly method and system based on secondary development of SolidWorks, and relates to the technical field of automatic assembly of mechanical parts.The application comprises the following steps: newly creating an assembly file, importing parts, acquiring assembly features, adding matching relations, parameterized driving assembly and completing the assembly.The application extracts assembly features (such as reference surfaces and reference axes) in a part model, uses API function commands to write programs (such as AddComponent5 and AddMate5), realizes automatic import of parts, feature matching and matching relation adding, and solves the complexity problem of multi-roller thread meshing assembly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated assembly technology for mechanical parts, and more specifically to an automated assembly method and system for standard planetary roller screw pairs based on SolidWorks secondary development. Background Technology

[0002] As a high-precision transmission component, planetary roller screw pairs consist of multiple parts such as screws, nuts, rollers, and cages. Traditional manual assembly relies on manual adjustment of the fit, which has problems such as low efficiency, easy error, and repetitive labor.

[0003] In existing automatic assembly methods, coordinate transformation-based assembly requires the calculation of complex spatial matrices, which is cumbersome and inefficient. In contrast, feature-based assembly methods can simplify assembly logic and improve versatility by identifying predefined geometric features of parts, such as reference surfaces and reference axes.

[0004] Currently, there is a lack of a complete solution for the automated assembly of planetary roller screw pairs, integrating part feature recognition, automatic definition of mating relationships, and user-interactive driving. Therefore, there is an urgent need to develop an efficient and universal parametric assembly method to achieve automation and intelligence in the assembly process.

[0005] Therefore, proposing an automatic assembly method and system for standard planetary roller screw pairs based on SolidWorks secondary development to solve the difficulties existing in the prior art is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] In view of this, the present invention provides a standard planetary roller screw pair automatic assembly method and system based on SolidWorks secondary development. It is implemented by secondary development of SolidWorks using VB6.0 software, and uses SolidWorks API functions to write the corresponding secondary development program to realize automatic assembly of parts, solving the problems of low efficiency of manual assembly and complex programs of traditional methods.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] An automatic assembly method for a standard planetary roller screw pair based on SolidWorks secondary development includes the following steps:

[0009] S1. Create a new assembly file: Create a blank assembly file using SolidWorks API functions and obtain the assembly object;

[0010] S2. Importing Components: Use the OpenDoc6 function to open the parts to be assembled and load them into memory. Use the AddComponent5 function to insert the parts into the assembly file. After completion, release the memory of the parts.

[0011] S3. Obtain assembly features: Based on the predefined assembly features of the parts, select the corresponding features in the assembly using the SelectByID2 function;

[0012] S4. Add mating relationships: Based on the thread meshing transmission requirements of the planetary roller screw pair, the AddMate5 function is used to add coincident, coaxial, and distance mating types to the selected assembly features to achieve thread meshing assembly between parts.

[0013] S5. Parametric-driven assembly: Input assembly parameters and part file paths in the user interface;

[0014] S6. Assembly complete: The program drives SolidWorks to automatically complete the assembly.

[0015] Optionally, the SolidWorks API functions in S1 include: ActivateDoc3 and CloseDoc; where ActivateDoc3 is used to activate the target part, and CloseDoc is used to close the loaded part file.

[0016] Optionally, predefined assembly features in S3 include point, line, and surface geometric elements created during part modeling, used to identify mating relationships between parts.

[0017] Optionally, the mating type in S4 is defined by parameter values, including: coincidence, coaxiality, distance, and angle, and thread engagement is achieved by matching the geometric relationship of the assembly features.

[0018] Optionally, the user interface integrates a path selection function, allowing users to select the save path of the 3D model of a part via a button, and display it in a text box.

[0019] Optionally, the assembly parameters in S5 include: module, number of roller teeth, pitch, roller pitch diameter, nut pitch diameter, and number of rollers.

[0020] An automatic assembly system for standard planetary roller screw pairs based on SolidWorks secondary development, and an automatic assembly method for standard planetary roller screw pairs based on SolidWorks secondary development, comprising, in sequence, a file operation module, a parts import module, a feature recognition module, a mating addition module, a user interaction module, and a matching completion module; wherein...

[0021] File operation module: Creates a blank assembly file and obtains the assembly object using the SolidWorks API function Newassembly();

[0022] Importing Parts Module: Use the OpenDoc6 function to open the part to be assembled and load it into memory, use the AddComponent5 function to insert the part into the assembly file, and release the part memory after completion;

[0023] Feature recognition module: Based on predefined assembly features of parts, the corresponding features are selected in the assembly using the SelectByID2 function;

[0024] Add Module: Based on the thread meshing transmission requirements of the planetary roller screw pair, the AddMate5 function adds coincidence, coaxial, and distance fit types to the selected assembly features to achieve thread meshing assembly between parts;

[0025] User interaction module: Input assembly parameters and part file paths in the user interface;

[0026] Complete the matching module: The program drives SolidWorks to automatically complete the assembly.

[0027] Optionally, by adding a module, the threaded meshing transmission structure can be automatically assembled through the coaxial and overlapping fit of the reference shaft and reference surface, based on the assembly of the roller and nut.

[0028] Optionally, the user interaction module interface displays a part file path input box, supporting manual input or folder selection, and is associated with the loading of parts in the SolidWorks assembly.

[0029] As can be seen from the above technical solution, compared with the prior art, the present invention discloses an automatic assembly method and system for standard planetary roller screw pairs based on SolidWorks secondary development, the beneficial effects of which are:

[0030] 1) By extracting assembly features (such as datum planes and datum axes) from the part model and using API function commands to write programs (such as AddComponent5 and AddMate5), the automatic import of parts, feature matching and addition of mating relationships are realized, which solves the complexity problem of multi-roller thread meshing assembly.

[0031] 2) The system integrates assembly parameter input and part path selection through the user interface, driving Solidworks to complete assembly generation, which significantly simplifies program logic and improves running efficiency;

[0032] 3) The assembly feature-driven generalized method is adopted to replace the traditional coordinate transformation scheme, which effectively reduces the amount of calculation. It is suitable for the rapid and accurate assembly of complex components such as planetary roller screw pairs, and has the advantages of high versatility, high efficiency and low error rate. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0034] Figure 1 A flowchart of an automatic assembly method for a standard planetary roller screw pair based on SolidWorks secondary development is provided for this invention.

[0035] Figure 2 This is a three-dimensional schematic diagram of the surface contact fit between the roller and the nut end face provided by the present invention;

[0036] Figure 3 This is a three-dimensional schematic diagram of the point contact fit between the roller and the nut provided by the present invention;

[0037] Figure 4 The diagram illustrates the effect of adding a roller and nut assembly feature to achieve threaded assembly, as provided by the present invention.

[0038] Figure 5 A user interface diagram of the automatic parts assembly module provided by the present invention;

[0039] Figure 6 The complete structural diagram of the assembled planetary roller screw assembly provided by the present invention shows the components formed by automatic assembly. Detailed Implementation

[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0041] See Figure 1 As shown, this invention discloses an automatic assembly method for a standard planetary roller screw pair based on SolidWorks secondary development, including the following steps:

[0042] S1. Create a new assembly file: Create a blank assembly file using SolidWorks API functions and obtain the assembly object;

[0043] Specifically, a blank assembly file is created using the SolidWorks API function Newassembly(), and the assembly object is obtained.

[0044] Specifically, the procedure for creating a new assembly file is as follows:

[0045] Dim nassembly As Object

[0046] Set nassembly = swApp.Newassembly() / / Create a new assembly file

[0047] This code creates a new Solidworks assembly file. Newassembly() is used to create a new blank assembly file, and this code will return a new assembly object.

[0048] S2. Importing Components: Use the OpenDoc6 function to open the parts to be assembled and load them into memory. Use the AddComponent5 function to insert the parts into the assembly file. After completion, release the memory of the parts.

[0049] Specifically, the program format for importing components is as follows:

[0050] Set tmpObj = swApp.OpenDoc6(Part1Path, 1, 0,"", longstatus, longwarnings) / / Open the part

[0051] Set nassembly = swApp.ActivateDoc3(AssemblyTitle, True, 0, errors) / / Activate the assembly

[0052] Dim swInsertedComponent As Object

[0053] SetswInsertedComponent = nassembly.AddComponent5(Part1Path, 0,"", False,"", 0, 0, 0) / / Import the required parts

[0054] swApp.CloseDoc Part1Path / / Close the opened part

[0055] Part1Path is the file path where the roller or nut to be imported into the blank assembly file is saved. This program first opens the part in Solidworks, then activates the part, then imports the activated part into the blank assembly file, and finally closes the opened part after the import is complete.

[0056] S3. Obtain assembly features: Based on the predefined assembly features of the parts, select the corresponding features in the assembly using the SelectByID2 function;

[0057] Specifically, the format of the feature selection procedure is as follows:

[0058] boolstatus = nassembly.Extension.SelectByID2("X","PLANE",0,0,0,False,0,Nothing,0) / / Get the reference plane

[0059] boolstatus = nassembly.Extension.SelectByID2("X","AXIS",0,0,0,False,0,Nothing,0) / / Get the baseline axis

[0060] This program selects the reference planes and reference axes of parts in the assembly file to facilitate subsequent assembly. Here, X can represent points, lines, and surfaces created during the modeling of the rollers and nuts; the relationships between points, lines, and surfaces are detailed in [link to documentation]. Figure 2 , Figure 3 As shown.

[0061] S4. Add mating relationships: Based on the thread meshing transmission requirements of the planetary roller screw pair, the AddMate5 function is used to add coincident, coaxial, and distance mating types to the selected assembly features to achieve thread meshing assembly between parts.

[0062] Specifically, the format for adding the matching procedure is as follows:

[0063] SetmyMate=nassembly.AddMate5(Matetype,0,False,X1,0,0,0,0,0,0,0,False,False,0,longstatus)

[0064] In the program, Matetype represents the mating type that needs to be added during assembly, and its corresponding values ​​are shown in Table 1.

[0065] Table 1. Matetype Matching Type Parameter Values

[0066]

[0067]

[0068] By adding a mating program, the assembly features of the roller and nut are made mating, thus achieving threaded assembly. After the program runs, as shown... Figure 4 As shown.

[0069] S5. Parametric-driven assembly: Input assembly parameters and part file paths in the user interface;

[0070] S6. Assembly complete: The program drives SolidWorks to automatically complete the assembly.

[0071] Specifically, after the automatic assembly program for parts is written, a new form is created in VB6.0 software and functional controls are added. The user interface of the automatic assembly module for parts is as follows: Figure 5 As shown, the assembled planetary roller screw assembly is as follows: Figure 6 As shown.

[0072] Furthermore, the SolidWorks API functions in S1 include: ActivateDoc3 and CloseDoc; where ActivateDoc3 is used to activate the target part, and CloseDoc is used to close the loaded part file.

[0073] Furthermore, the predefined assembly features in S3 include point, line, and surface geometric elements created during part modeling, used to identify the mating relationships between parts.

[0074] Furthermore, in S4, the mating type is defined by parameter values, including: coincidence, coaxiality, distance, and angle, and thread engagement is achieved by matching the geometric relationship of the assembly features.

[0075] Furthermore, the user interface integrates a path selection function, allowing users to select the save path of the 3D model of a part via a button, which is then displayed in a text box.

[0076] Furthermore, the assembly parameters in S5 include: module, number of roller teeth, pitch, roller pitch diameter, nut pitch diameter, and number of rollers.

[0077] and Figure 1 Corresponding to the method described above, this invention also provides an automatic assembly system for standard planetary roller screw pairs based on SolidWorks secondary development, used for... Figure 1 The specific implementation of the method includes, in sequence, a file operation module, a part import module, a feature recognition module, a mating addition module, a user interaction module, and a matching completion module; among them,

[0078] File operation module: Creates a blank assembly file and obtains the assembly object using the SolidWorks API function Newassembly();

[0079] Importing Parts Module: Use the OpenDoc6 function to open the part to be assembled and load it into memory, use the AddComponent5 function to insert the part into the assembly file, and release the part memory after completion;

[0080] Feature recognition module: Based on predefined assembly features of parts, the corresponding features are selected in the assembly using the SelectByID2 function;

[0081] Add Module: Based on the thread meshing transmission requirements of the planetary roller screw pair, the AddMate5 function adds coincidence, coaxial, and distance fit types to the selected assembly features to achieve thread meshing assembly between parts;

[0082] User interaction module: Input assembly parameters and part file paths in the user interface;

[0083] Complete the matching module: The program drives SolidWorks to automatically complete the assembly.

[0084] Furthermore, by adding modules, the threaded meshing transmission structure is automatically assembled through the coaxial and overlapping fit of the reference shaft and reference surface, based on the assembly of the roller and nut.

[0085] Furthermore, the user interaction module interface displays a part file path input box, supporting manual input or folder selection, and is associated with the loading of parts in SolidWorks assemblies.

[0086] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0087] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An automatic assembly method for a standard planetary roller screw pair based on SolidWorks secondary development, characterized in that, Includes the following steps: S1. Create a new assembly file: Create a blank assembly file using SolidWorks API functions and obtain the assembly object; S2. Importing Components: Use the OpenDoc6 function to open the parts to be assembled and load them into memory. Use the AddComponent5 function to insert the parts into the assembly file. After completion, release the memory of the parts. S3. Obtain assembly features: Based on the predefined assembly features of the parts, select the corresponding features in the assembly using the SelectByID2 function; S4. Add mating relationships: Based on the thread meshing transmission requirements of the planetary roller screw pair, the AddMate5 function is used to add coincident, coaxial, and distance mating types to the selected assembly features to achieve thread meshing assembly between parts. S5. Parametric-driven assembly: Input assembly parameters and part file paths in the user interface; S6. Assembly complete: The program-driven SolidWorks automatically completes the assembly. The assembly parameters in S5 include: module, number of roller teeth, pitch, roller pitch diameter, nut pitch diameter, and number of rollers.

2. The automatic assembly method for a standard planetary roller screw pair based on SolidWorks secondary development according to claim 1, characterized in that, The SolidWorks API functions in S1 include ActivateDoc3 and CloseDoc; ActivateDoc3 is used to activate the target part, and CloseDoc is used to close the loaded part file.

3. The automatic assembly method for a standard planetary roller screw pair based on SolidWorks secondary development according to claim 1, characterized in that, Predefined assembly features in S3 include point, line, and surface geometric elements created during part modeling, used to identify mating relationships between parts.

4. The automatic assembly method for a standard planetary roller screw pair based on SolidWorks secondary development according to claim 1, characterized in that, In S4, the mating type is defined by parameter values, including: coincidence, coaxiality, distance, and angle. Thread engagement is achieved by matching the geometric relationship of assembly features.

5. The automatic assembly method for a standard planetary roller screw pair based on SolidWorks secondary development according to claim 1, characterized in that, The user interface integrates a path selection function, allowing users to select the save path of the 3D model of a part via a button, and display it in a text box.

6. An automatic assembly system for standard planetary roller screw pairs based on SolidWorks secondary development, characterized in that, An automatic assembly method for a standard planetary roller screw pair based on SolidWorks secondary development, as described in any one of claims 1-5, comprises, in sequence, a file operation module, a parts import module, a feature recognition module, a mating addition module, a user interaction module, and a matching completion module; wherein... File operation module: Creates a blank assembly file and obtains the assembly object using the SolidWorks API function Newassembly(); Importing Parts Module: Use the OpenDoc6 function to open the part to be assembled and load it into memory, use the AddComponent5 function to insert the part into the assembly file, and release the part memory after completion; Feature recognition module: Based on predefined assembly features of parts, the corresponding features are selected in the assembly using the SelectByID2 function; Add Module: Based on the thread meshing transmission requirements of the planetary roller screw pair, the AddMate5 function adds coincidence, coaxial, and distance fit types to the selected assembly features to achieve thread meshing assembly between parts; User interaction module: Input assembly parameters and part file paths in the user interface; Assembly parameters include: module, number of roller teeth, pitch, roller pitch diameter, nut pitch diameter, and number of rollers; Complete the matching module: The program drives SolidWorks to automatically complete the assembly.

7. The standard planetary roller screw pair automatic assembly system based on SolidWorks secondary development according to claim 6, characterized in that, The addition module, based on the assembly of rollers and nuts, achieves automatic assembly of the threaded meshing transmission structure through the coaxial and overlapping fit of the reference shaft and reference surface.

8. The standard planetary roller screw pair automatic assembly system based on SolidWorks secondary development according to claim 6, characterized in that, The user interaction module interface displays a part file path input box, which supports manual input or folder selection, and is associated with the loading of parts in SolidWorks assemblies.

Citation Information

Patent Citations

  • Network-based automatic assembly and three-dimensional interaction method and system

    CN107357952A

  • Reverse circulation type planetary roller lead screw pair assembling clamp and assembling method

    CN119839801A