CN113947673B - Method for scaling engineering drawing linear size value in equal-magnification batch manner - Google Patents
Method for scaling engineering drawing linear size value in equal-magnification batch manner Download PDFInfo
- Publication number
- CN113947673B CN113947673B CN202111107776.XA CN202111107776A CN113947673B CN 113947673 B CN113947673 B CN 113947673B CN 202111107776 A CN202111107776 A CN 202111107776A CN 113947673 B CN113947673 B CN 113947673B
- Authority
- CN
- China
- Prior art keywords
- engineering drawing
- scaling
- text
- size
- modified
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 20
- 238000012986 modification Methods 0.000 claims abstract description 11
- 230000004048 modification Effects 0.000 claims abstract description 11
- 230000006870 function Effects 0.000 claims abstract description 5
- 238000011161 development Methods 0.000 claims abstract description 4
- 238000004519 manufacturing process Methods 0.000 abstract description 4
- 230000000739 chaotic effect Effects 0.000 abstract description 3
- 238000013461 design Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Architecture (AREA)
- Computer Graphics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a method for scaling engineering drawing linear dimension values in batches at equal times, which is characterized by comprising the following steps of: the method uses C++ language to call NX OPEN C function library development, is used for equal batch scaling of all linear dimension values based on NX software engineering drawings, can be used for equal modification of all linear dimension values, has unchanged position and word height attributes, does not have chaotic and wrong dimensions, and is convenient to process and manufacture. Other unmodified angles, the positions, the sizes and other attributes of the characters are unchanged, so that the model engineering drawing is created correctly, quickly and simply.
Description
Technical Field
The invention relates to the technical field of software development, in particular to a method for scaling engineering drawing linear dimension values in an equal-magnification batch manner.
Background
Currently, the three-dimensional design software NX under the Siemens flag is the mainstream three-dimensional design software in the fields of environmental test equipment, mold manufacturing, teaching model design, traditional machinery and the like. With the expansion of market demands, the data volume of designers using NX designs is increasing, and most designs need to make two-dimensional engineering drawings.
For the teaching industry demand model, two ways are available for making the two-dimensional engineering drawing. One is to redesign the whole according to the scaled down model size. The other is to use the existing entity size model to scale it down and then modify the confusing and wrong dimensions in the engineering drawing. Designers often scale volume commands with three-dimensional models for the purpose of quickly achieving equal scaling and minimizing modifications. Firstly, the scaling of parts is realized, then, error constraint in an assembly body and the size of confusion and errors in a two-dimensional diagram of parts are modified, and finally, the parts are manufactured. The method has larger workload and is easy to generate errors such as assembly constraint, size failure and the like.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method for scaling the linear dimension values of the engineering drawing in batches in equal time, which can modify all the linear dimension values in equal time, has unchanged attributes such as position, word height and the like, does not have chaotic and wrong dimensions and is convenient to process and manufacture.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
a method for scaling engineering drawing linear dimension values in an equal-scale batch mode is characterized by comprising the following steps of: invoking an NX OPEN C function library development using the c++ language for equal-scale batch scaling of all NX software engineering drawing-based linear dimension values, comprising the steps of,
1. a method for scaling engineering drawing linear dimension values in an equal-scale batch mode is characterized by comprising the following steps of: invoking an NX OPEN C function library development using the c++ language for equal-scale batch scaling of all NX software engineering drawing-based linear dimension values, comprising the steps of,
s1, initializing the device and the method,
s2, creating a secondary menu under the NX menu bar, generating a pop-up dialog box for accepting the selection of the user target folder,
s3, reading the engineering drawing under the target folder path selected by the user, calling the modified size text interface of NX, obtaining the linear size of the current engineering drawing, providing a scaling factor key-in window, identifying the scaling factor value input by the user,
s4, calculating a scaled size value of the linear size of the current engineering drawing according to the recognized value of the scaling multiple input by the user, and modifying the size text into the scaled value, wherein the modification principle is that when the size text is only a single number, the scaled text is the current value multiplied by the scaling multiple to be used as the modified text, when the size text of the engineering drawing contains phi or SR or r or deep or thick or delta, the scaled text is the rest text content, the result of multiplying the value of phi or SR or r or deep or thick or delta by the scaling multiple is used as the modification content,
s5, creating a new folder under the root directory where the target file is located according to the name of the target folder and the scaling factor in the step S3,
s6, storing the engineering drawing modified in the step S4 into the new folder created in the step S4 by the original name and the scaling factor,
and S7, traversing all engineering drawing files under the target folder, repeating the steps S3, S4 and S6, and generating a message frame after all files are modified, wherein the content is that the batch linear size values are successfully scaled.
Further, the modified size text in step S4 is modified to red by calling the color interface of NX, and is used for checking whether all the modified size text is modified.
The beneficial effects of the invention include: the method can quickly realize the equal-magnification modification of all linear dimensions of the engineering drawing in batches, and the modified positions and character heights and other attributes are unchanged, so that the chaotic and wrong dimensions can not appear, and the engineering drawing is convenient to process and manufacture.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is an engineering drawing dimension marking before modification in example 1;
fig. 3 is an engineering drawing dimension marking modified in example 1.
Detailed Description
The invention will be described in further detail with reference to specific embodiments and drawings.
An embodiment as shown in figures 1-3
1. Clicking the function of scaling the linear size value of the engineering drawing in batches at equal times;
2. inputting a scale value to be scaled, and selecting a folder in which a file to be modified is located;
3. automatically opening files under the folder by the program, and selecting a drawing module;
4. the program obtains a linear size value in the engineering drawing;
5. calculating a linear size value after equal scaling, and modifying the size text into a scaled value;
6. uniformly marking the modified size as red;
7. repeating the process of modifying the linear dimension value, thereby completing all linear dimension modifications of the engineering drawing;
8. traversing all files under the folder, and repeating the processes 3-7;
9. and (5) popping up a prompt of successful batch linear size value scaling, namely finishing all size value modifications.
The engineering drawing shown in fig. 2 includes a contour dimension, a hole position dimension, a hole diameter dimension, and the like, wherein, for the linear contour dimension and the hole position dimension, the obtained text numerical value of the dimension is directly multiplied by a scaling multiple in step 5, the scaling multiple in this embodiment is 0.5 times, so that the calculation result is directly replaced by the original text of the dimension, wherein, the text of the hole diameter includes the number of holes, the hole diameter, the countersink diameter, and the countersink depth, and the values required to be modified include the hole diameter, the countersink diameter, and the countersink depth, so that the content of the modified text is limited to the numerical value after phi and the numerical value after "deep", and the rest text content is unchanged.
Other embodiments also include labeling cases of thickness symbol "delta", radius symbol "r" and sphere radius symbol "SR", so when modifying the size text content, query adjustment needs to be performed, only the numerical value after the symbols are modified, and the rest text content is kept unchanged.
In this way, the modification process is greatly simplified. Compared with the traditional mode, a great deal of manpower and labor hour expenses are saved.
The foregoing has described in detail the technical solutions provided by the embodiments of the present invention, and specific examples have been applied to illustrate the principles and implementations of the embodiments of the present invention, where the above description of the embodiments is only suitable for helping to understand the principles of the embodiments of the present invention; meanwhile, as for those skilled in the art, according to the embodiments of the present invention, there are variations in the specific embodiments and the application scope, and the present description should not be construed as limiting the present invention.
Claims (2)
1. A method for scaling engineering drawing linear dimension values in an equal-scale batch mode is characterized by comprising the following steps of: invoking an NX OPEN C function library development using the c++ language for equal-scale batch scaling of all NX software engineering drawing-based linear dimension values, comprising the steps of,
s1, initializing the device and the method,
s2, creating a secondary menu under the NX menu bar, generating a pop-up dialog box for accepting the selection of the user target folder,
s3, reading the engineering drawing under the target folder path selected by the user, calling the modified size text interface of NX, obtaining the linear size of the current engineering drawing, providing a scaling factor key-in window, identifying the scaling factor value input by the user,
s4, calculating a scaled size value of the linear size of the current engineering drawing according to the recognized value of the scaling multiple input by the user, and modifying the size text into the scaled value, wherein the modification principle is that when the size text is only a single number, the scaled text is the current value multiplied by the scaling multiple to be used as the modified text, when the size text of the engineering drawing contains phi or SR or r or deep or thick or delta, the scaled text is the rest text content, the result of multiplying the value of phi or SR or r or deep or thick or delta by the scaling multiple is used as the modification content,
s5, creating a new folder under the root directory where the target file is located according to the name of the target folder and the scaling factor in the step S3,
s6, storing the engineering drawing modified in the step S4 into the new folder created in the step S4 by the original name and the scaling factor,
and S7, traversing all engineering drawing files under the target folder, repeating the steps S3, S4 and S6, and generating a message frame after all files are modified, wherein the content is that the batch linear size values are successfully scaled.
2. The method for scaling engineering drawing linear dimension values in equal batch according to claim 1, wherein: and (4) modifying the modified size text in the step (S4) into red by calling a color interface of NX, and checking whether all the modified size text is modified.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111107776.XA CN113947673B (en) | 2021-09-22 | 2021-09-22 | Method for scaling engineering drawing linear size value in equal-magnification batch manner |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111107776.XA CN113947673B (en) | 2021-09-22 | 2021-09-22 | Method for scaling engineering drawing linear size value in equal-magnification batch manner |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113947673A CN113947673A (en) | 2022-01-18 |
CN113947673B true CN113947673B (en) | 2024-04-12 |
Family
ID=79328929
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111107776.XA Active CN113947673B (en) | 2021-09-22 | 2021-09-22 | Method for scaling engineering drawing linear size value in equal-magnification batch manner |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113947673B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060124013A (en) * | 2005-05-30 | 2006-12-05 | (주)에스오씨건설엔지니어링 | Automatic recording method of description details and file names for title block of auto cad |
CA2795855A1 (en) * | 2012-11-16 | 2014-05-16 | Dassault Systemes | Method and system for designing a modeled assembly of at least one object in a computer-aided design system |
CN107949868A (en) * | 2015-09-07 | 2018-04-20 | 西门子产品生命周期管理软件公司 | Modeling method and system |
CN113408025A (en) * | 2021-06-03 | 2021-09-17 | 中国电建集团华东勘测设计研究院有限公司 | VB language-based wind power steel-concrete tower design tool and parameterized three-dimensional design method |
-
2021
- 2021-09-22 CN CN202111107776.XA patent/CN113947673B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060124013A (en) * | 2005-05-30 | 2006-12-05 | (주)에스오씨건설엔지니어링 | Automatic recording method of description details and file names for title block of auto cad |
CA2795855A1 (en) * | 2012-11-16 | 2014-05-16 | Dassault Systemes | Method and system for designing a modeled assembly of at least one object in a computer-aided design system |
CN107949868A (en) * | 2015-09-07 | 2018-04-20 | 西门子产品生命周期管理软件公司 | Modeling method and system |
CN113408025A (en) * | 2021-06-03 | 2021-09-17 | 中国电建集团华东勘测设计研究院有限公司 | VB language-based wind power steel-concrete tower design tool and parameterized three-dimensional design method |
Non-Patent Citations (3)
Title |
---|
基于Pro/E的工程图创建方法及应用;王英;;科技创新导报;20100921(第27期);全文 * |
浅谈AUTOCAD中的比例设置;郭琳;;考试周刊;20131224(第A3期);全文 * |
结合边缘模糊的景深显著性在图像缩放中的研究;岳朋飞;王化雨;郑元杰;赵彦会;崔嘉;;计算机辅助设计与图形学学报;20180315(第03期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113947673A (en) | 2022-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111062196B (en) | Batch process flow card generation method based on CAD and Excel | |
CN110781625A (en) | ABAQUS software-based parametric modeling simulation analysis method | |
CN116860949A (en) | Question-answering processing method, device, system, computing equipment and computer storage medium | |
CN112597737A (en) | Method, system and readable storage medium for creating PCB test point identification | |
CN106776779B (en) | Method for generating entity file by JSON data based on Mac platform | |
CN113947673B (en) | Method for scaling engineering drawing linear size value in equal-magnification batch manner | |
CN112949003B (en) | Part measuring method, device, equipment and storage medium | |
CN111078529B (en) | Client writing module testing method and device and electronic equipment | |
CN109815635B (en) | Boiler MFT automatic design system and method | |
CN111859539A (en) | Finite element automatic attribute and material parameter assigning method based on Tcl or Tk secondary development | |
CN109474822B (en) | Android television multi-language automatic testing method and device | |
CN106528946B (en) | A kind of method of batch insertion AutoCAD segment | |
CN107015955B (en) | Document editing method and device | |
CN109388685A (en) | The method and apparatus that will plan that the spatial data that industry uses is put in storage | |
CN111615261B (en) | Export design method and device of multi-connector module | |
CN115033436A (en) | Page testing method and device, electronic equipment and storage medium | |
CN116956838A (en) | Project determining method and device for engineering quantity list | |
CN103744757A (en) | DF file verification method based on ARINC661 | |
CN113305383A (en) | Method and device for analyzing wire cut electrical discharge machining (EDFA) graph based on DXF graph file | |
CN114253642A (en) | System information processing method, device, electronic equipment and medium | |
CN111400991A (en) | Circuit diagram rapid design method based on hardware electrical interface relation | |
CN111753349A (en) | Dimension modification method of structural member, Revit platform and storage medium | |
CN116991706B (en) | Vehicle automatic test method, device, equipment and storage medium | |
CN110162307B (en) | Method and device for converting JSON file into DLL file | |
CN115953507B (en) | Micro-service template management system for imaging arrangement container and template generation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 400039 Chongqing Jiulongpo Yuzhou Road No. 33 Patentee after: NO.59 Institute of China Ordnance Industry Country or region after: China Address before: 400041 Yuzhou Road, Kowloon District, Chongqing, No. 33 Patentee before: NO 59 Research Institute OF CHINA ORDNACE INDUSTRY Country or region before: China |