CN106528946B - A kind of method of batch insertion AutoCAD segment - Google Patents
A kind of method of batch insertion AutoCAD segment Download PDFInfo
- Publication number
- CN106528946B CN106528946B CN201610902546.5A CN201610902546A CN106528946B CN 106528946 B CN106528946 B CN 106528946B CN 201610902546 A CN201610902546 A CN 201610902546A CN 106528946 B CN106528946 B CN 106528946B
- Authority
- CN
- China
- Prior art keywords
- segment
- dynamic array
- autocad
- records
- axis coordinate
- 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.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/39—Circuit design at the physical level
- G06F30/392—Floor-planning or layout, e.g. partitioning or placement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/206—Drawing of charts or graphs
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Architecture (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of methods of batch insertion AutoCAD segment, specifically include: step 1 opens AutoCAD drawing and loading application programs;Step 2 is selected and is recorded with reference to pattern information;Step 3 calculates and records insertion pattern information;Step 4 selection insertion segment is simultaneously inserted on AutoCAD drawing in batches.The present invention has well solved the problem of being inserted into segment in batches in modifying AutoCAD drawing, improves the modification efficiency of drawing.
Description
Technical field
The present invention relates to the secondary exploitation technology of AutoCAD program architecture and ObjectARX, in particular to a kind of batch is inserted
Enter the method for AutoCAD segment.
Background technique
AutoCAD is a computer aided design software that autodesk, inc., the U.S. develops.It is current
CAD software most widely used in Windows system, number of users is most.
ObjectARX is substantially a dynamic link library (DLL) of Windows system, can directly share AutoCAD's
Address space can also directly utilize the kernel data structure and code of AutoCAD, secondary development person is directly accessed
Database structure, graphics system and the CAD geometric modeling core of AutoCAD.
When drawing AutoCAD drawing, a complicated component graphics are often combined into a segment, it can using segment
To improve the efficiency for drawing repetitive pattern, greatly reduces repetitive operation, save memory space, be easily modified AutoCAD drawing.
When needing to modify to AutoCAD drawing, it is often necessary to other segments are added around certain segments, this
Shi Ruguo carries out each segment one time using the insertion order (can be called by " insert ") carried in AutoCAD software
The process of insertion and parameter setting, workload is huge, and efficiency is extremely low.
In view of this, it is necessary to a kind of method of AutoCAD segment batch insertion based on ObjectARX is proposed, with
It solves the above problems.
Summary of the invention
Present invention aims at: during solving revisions on drawings, on the basis of the parameter for selecting segment, in selected segment
Around the problem of being inserted into segment in batches.
The technical scheme is that a kind of method of batch insertion AutoCAD segment, which is characterized in that this method packet
It includes:
Step 1 opens AutoCAD drawing and loading application programs:
Existing AutoCAD drawing is opened under AutoCAD environment, " .arx " that generation is write in select tools and load is answered
With program file, drawing is operated in the input corresponding operation order of AutoCAD order line;
Step 2 is selected and is recorded with reference to pattern information:
A segment on selected AutoCAD drawing selectes it N number of the step for repetition with reference to segment as described
With reference to segment, four dynamic array Ai are created:
First dynamic array A1 records N number of X axis coordinate with reference to segment;
Second dynamic array A2 records N number of Y axis coordinate with reference to segment;
Third dynamic array A3 records N number of scaling with reference to segment;
4th dynamic array A4 records N number of rotation radian with reference to segment;
Step 3 calculates and records insertion pattern information:
The offset D in X-axis is inputted in AutoCADX, offset D in Y-axisY, scaling coefficient DS, rotation angle
DA;
A, using the N number of X axis coordinate with reference to segment stored in the first dynamic array A1, the insertion segment is calculated
X axis coordinate A1 '=A1+DXE, wherein e is N-dimensional unit column vector
B, using the N number of Y axis coordinate with reference to segment stored in the second dynamic array A2, the insertion segment is calculated
Y axis coordinate A2 '=A2+DYE, wherein e is N-dimensional unit column vector
C, using the N number of scaling with reference to segment stored in third dynamic array A3, the insertion figure is calculated
Scaling A3 '=A3 × D of blockSE, wherein e is N-dimensional unit column vector
D, using the N number of rotation radian with reference to segment stored in the 4th dynamic array A4, the insertion figure is calculated
The rotation radian of blockWherein e is N-dimensional unit column vector
At this point, the storing data of four middle records of dynamic array Ai ' is as follows:
First dynamic array A1 ' records the X axis coordinate of N number of insertion segment;
Second dynamic array A2 ' records the Y axis coordinate of N number of insertion segment;
Third dynamic array A3 ' records the scaling of N number of insertion segment;
4th dynamic array A4 ' records the rotation radian of N number of insertion segment.
Step 4, selection insertion segment are simultaneously inserted on AutoCAD drawing in batches
A kind of Block Object is selected from AutoCAD drawing data base, which is instantiated into n times, makes it as N
A insertion segment is added to the data information in four dynamic array Ai ' is corresponding in N number of insertion segment, and
N number of insertion segment batch is inserted into AutoCAD drawing;
Further, in step 4: for can be current AutoCAD drawing data base in AutoCAD drawing data base
It can be external AutoCAD drawing data base;
The Block Object selected in AutoCAD drawing data base with it is described with reference to the segment type in segment it is identical or
It is different.
The beneficial effects of the present invention are: the present invention and the prior art have the positive effect that in drawing modification: can be with institute
It states with reference on the basis of pattern information, any segment existing for the batch insertion system of any position around the reference segment, and can
With the scaling and rotation angle of the customized insertion segment, working efficiency is greatly improved.
Detailed description of the invention
A kind of Fig. 1 flow chart of batch insertion AutoCAD segment method disclosed by the invention;
Segment batch insertion dialog box in Fig. 2 embodiment of the present invention;
Fig. 3 (a) is the original graph before batch is inserted into;
Fig. 3 (b) is the modification figure after batch is inserted into.
Specific embodiment
Hereinafter with reference to Fig. 1-3, description of specific embodiments of the present invention.
As shown in Figure 1, the embodiment of the invention provides a kind of methods of batch insertion AutoCAD segment comprising following
Step:
Step 1 opens AutoCAD drawing and loading application programs:
Existing AutoCAD drawing is opened under AutoCAD environment, " .arx " that generation is write in select tools and load is answered
With program file, drawing is operated in the input corresponding operation order of AutoCAD order line.
Step 2 is selected and is recorded with reference to pattern information;
A segment on selected AutoCAD drawing selectes it N number of the step for repetition with reference to segment as described
With reference to segment, four dynamic array Ai are created:
First dynamic array A1 records N number of X axis coordinate with reference to segment;
Second dynamic array A2 records N number of Y axis coordinate with reference to segment;
Third dynamic array A3 records N number of scaling with reference to segment;
4th dynamic array A4 records N number of rotation radian with reference to segment.
Step 3 calculates and records insertion pattern information;
The offset D in X-axis is inputted in AutoCADX, offset D in Y-axisY, scaling coefficient DS, rotation angle
DA;
A, using the N number of X axis coordinate with reference to segment stored in the first dynamic array A1, the insertion segment is calculated
X axis coordinate A1 '=A1+DXE, wherein e is N-dimensional unit column vector
B, using the N number of Y axis coordinate with reference to segment stored in the second dynamic array A2, the insertion segment is calculated
Y axis coordinate A2 '=A2+DYE, wherein e is N-dimensional unit column vector
C, using the N number of scaling with reference to segment stored in third dynamic array A3, the insertion figure is calculated
Scaling A3 '=A3 × D of blockSE, wherein e is N-dimensional unit column vector
D, using the N number of rotation radian with reference to segment stored in the 4th dynamic array A4, the insertion figure is calculated
The rotation radian of blockWherein e is N-dimensional unit column vector
At this point, the storing data of four middle records of dynamic array Ai ' is as follows:
First dynamic array A1 ' records the X axis coordinate of N number of insertion segment;
Second dynamic array A2 ' records the Y axis coordinate of N number of insertion segment;
Third dynamic array A3 ' records the scaling of N number of insertion segment;
4th dynamic array A4 ' records the rotation radian of N number of insertion segment.
Step 4, selection insertion segment are simultaneously inserted on AutoCAD drawing in batches
A kind of Block Object is selected from AutoCAD drawing data base, which is instantiated into n times, makes it as N
A insertion segment is added to the data information in four dynamic array Ai ' is corresponding in N number of insertion segment, and
N number of insertion segment batch is inserted into AutoCAD drawing.
Below by taking the software realization batch insertion RFID terminal of the method for the invention establishment as an example, batch is inserted into
The method of AutoCAD segment is described in detail, this method specifically includes the following steps:
Step 1 opens AutoCAD drawing and loading application programs:
Existing AutoCAD drawing is opened, select tools simultaneously load " .arx " application file for writing generation,
After AutoCAD order line inputs operational order, system meeting automatic spring batch insertion segment dialog box, the batch is inserted into segment
Dialog box is designed based on ObjectARX and MFC, can with the interface AutoCAD perfect combination, at this time by drawing data base
In block name be added in batch insertion segment dialog box, as shown in Figure 2;
Step 2 is selected and is recorded with reference to pattern information:
One or more pieces of names are independently selected in " referring to segment " list in batch insertion segment dialog box,
Following " Quan Xuan " or " selection attribute block " button can be clicked, then this example exists using " selection attribute block " button is clicked
Customized selection operation region on AutoCAD drawing, then program is read automatically corresponding to the block name selected in the operating area
Segment, 11 segments are selected in example, are to create four dynamic array Ai with reference to segment with 11 selected segments:
First dynamic array A1 records 11 X axis coordinates with reference to segment;
Second dynamic array A2 records 11 Y axis coordinates with reference to segment;
Third dynamic array A3 records 11 scalings with reference to segment;
4th dynamic array A4 records 11 rotation radians with reference to segment.
Step 3 calculates and records insertion pattern information:
The offset D in X-axis is inputted in batch insertion segment dialog boxX=-3, the offset D in Y-axisY=
0, scaling coefficient DS=2, angle D is rotatedA=0;
A, using 11 X axis coordinates with reference to segment stored in the first dynamic array A1, the insertion figure is calculated
X axis coordinate A1 '=A1-3e of block, wherein e is 11 dimension unit column vectors
B, using 11 Y axis coordinates with reference to segment stored in the second dynamic array A2, the insertion figure is calculated
Y axis coordinate A2 '=A2+0 × e of block, wherein e is 11 dimension unit column vectors
C, using 11 scalings with reference to segment stored in third dynamic array A3, the insertion figure is calculated
Scaling A3 '=A3 × 2e of block, wherein e is 11 dimension unit column vectors
D, using 11 stored in the 4th dynamic array A4 rotation radians with reference to segment, the insertion figure is calculated
The rotation radian of blockWherein e is 11 dimension unit column vectors
At this point, the storing data of four middle records of dynamic array Ai ' is as follows:
First dynamic array A1 ', the X axis coordinate of the insertion segment of record 11;
Second dynamic array A2 ', the Y axis coordinate of the insertion segment of record 11;
Third dynamic array A3 ', the scaling of the insertion segment of record 11;
4th dynamic array A4 ', the rotation radian of the insertion segment of record 11.
Step 4, selection insertion segment are simultaneously inserted on AutoCAD drawing in batches:
RFID terminal is selected under " selection insertion segment " list in batch insertion segment dialog box, makes its conduct
The insertion segment, program can read in AutoCAD drawing data base the Drawing Object of RFID terminal and non-graphic automatically at this time
The Block Object is instantiated 11 times, makes it as 11 insertion segments, by the number in four dynamic array Ai ' by object
It is added in 11 insertion segments it is believed that breath is corresponding.
" batch is inserted into " button, the end RFID that program can will acquire automatically are clicked in batch insertion segment dialog box
Son is inserted into drawing with the parameter batch in four dynamic arrays, and updates AutoCAD drawing, enables the insertion segment
It is shown on AutoCAD drawing, completes batch insertion process, batch insertion front and back comparison diagram is as shown in Figure 3.
Claims (2)
1. a kind of method of batch insertion AutoCAD segment, which is characterized in that this method comprises:
Step 1 opens AutoCAD drawing and loading application programs:
Existing AutoCAD drawing is opened under AutoCAD environment, select tools simultaneously load " .arx " that writes generation using journey
Preface part operates drawing in the input corresponding operation order of AutoCAD order line;
Step 2 is selected and is recorded with reference to pattern information:
A segment on selected AutoCAD drawing selectes it N number of with reference to figure the step for repetition as with reference to segment
Block creates four dynamic array Ai:
First dynamic array A1 records N number of X axis coordinate with reference to segment;
Second dynamic array A2 records N number of Y axis coordinate with reference to segment;
Third dynamic array A3 records N number of scaling with reference to segment;
4th dynamic array A4 records N number of rotation radian with reference to segment;
Step 3 calculates and records insertion pattern information:
The offset D in X-axis is inputted in AutoCADX, offset D in Y-axisY, scaling coefficient DS, rotation angle DA;
A, using the N number of X axis coordinate with reference to segment stored in the first dynamic array A1, the X of the insertion segment is calculated
Axial coordinate A1 '=A1+DXE, wherein e is N-dimensional unit column vector
B, using the N number of Y axis coordinate with reference to segment stored in the second dynamic array A2, the Y of the insertion segment is calculated
Axial coordinate A2 '=A2+DYE, wherein e is N-dimensional unit column vector
C, using the N number of scaling with reference to segment stored in third dynamic array A3, the insertion segment is calculated
Scaling A3 '=A3 × DSE, wherein e is N-dimensional unit column vector
D, using the N number of rotation radian with reference to segment stored in the 4th dynamic array A4, the insertion segment is calculated
Rotate radianWherein e is N-dimensional unit column vector
At this point, the storing data of four middle records of dynamic array Ai ' is as follows:
First dynamic array A1 ' records the X axis coordinate of N number of insertion segment;
Second dynamic array A2 ' records the Y axis coordinate of N number of insertion segment;
Third dynamic array A3 ' records the scaling of N number of insertion segment;
4th dynamic array A4 ' records the rotation radian of N number of insertion segment;
Step 4, selection insertion segment are simultaneously inserted on AutoCAD drawing in batches:
A kind of Block Object is selected from AutoCAD drawing data base, which is instantiated into n times, makes it as N number of institute
Insertion segment is stated, is added to the data information in four dynamic array Ai ' is corresponding in N number of insertion segment, and will be N number of
The insertion segment batch is inserted into AutoCAD drawing.
2. the method as described in claim 1, which is characterized in that in step 4: for can be in AutoCAD drawing data base
Current AutoCAD drawing data base is also possible to external AutoCAD drawing data base;
The Block Object that is selected in AutoCAD drawing data base and described identical or different with reference to the segment type in segment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610902546.5A CN106528946B (en) | 2016-10-18 | 2016-10-18 | A kind of method of batch insertion AutoCAD segment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610902546.5A CN106528946B (en) | 2016-10-18 | 2016-10-18 | A kind of method of batch insertion AutoCAD segment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106528946A CN106528946A (en) | 2017-03-22 |
CN106528946B true CN106528946B (en) | 2019-06-25 |
Family
ID=58332387
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610902546.5A Expired - Fee Related CN106528946B (en) | 2016-10-18 | 2016-10-18 | A kind of method of batch insertion AutoCAD segment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106528946B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109144650B (en) * | 2018-08-22 | 2022-03-01 | 拉扎斯网络科技(上海)有限公司 | Display object management method and device, electronic equipment and computer storage medium |
CN112883449B (en) * | 2021-01-14 | 2023-09-26 | 中策橡胶集团股份有限公司 | Tire sidewall font graph generation method based on AutoCAD |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101587428A (en) * | 2009-04-08 | 2009-11-25 | 广州中船黄埔造船有限公司 | Method for printing drawing paper with AutoCAD format in batch |
US7702416B2 (en) * | 2006-01-17 | 2010-04-20 | National Instruments Corporation | Automatic creation of motion control commands according to elements in drawing specifications and user input |
CN102799714A (en) * | 2012-06-27 | 2012-11-28 | 西安理工大学 | Method for extracting data of integrated pipeline of metro based on Auto computer-aided design (CAD) drawing |
CN103793145A (en) * | 2014-02-21 | 2014-05-14 | 湖南省交通规划勘察设计院 | Drawing frame parameter identification and drawing output method based on autoCAD |
CN104408269A (en) * | 2014-12-17 | 2015-03-11 | 上海天华建筑设计有限公司 | Design drawing splitting method |
-
2016
- 2016-10-18 CN CN201610902546.5A patent/CN106528946B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7702416B2 (en) * | 2006-01-17 | 2010-04-20 | National Instruments Corporation | Automatic creation of motion control commands according to elements in drawing specifications and user input |
CN101587428A (en) * | 2009-04-08 | 2009-11-25 | 广州中船黄埔造船有限公司 | Method for printing drawing paper with AutoCAD format in batch |
CN102799714A (en) * | 2012-06-27 | 2012-11-28 | 西安理工大学 | Method for extracting data of integrated pipeline of metro based on Auto computer-aided design (CAD) drawing |
CN103793145A (en) * | 2014-02-21 | 2014-05-14 | 湖南省交通规划勘察设计院 | Drawing frame parameter identification and drawing output method based on autoCAD |
CN104408269A (en) * | 2014-12-17 | 2015-03-11 | 上海天华建筑设计有限公司 | Design drawing splitting method |
Non-Patent Citations (1)
Title |
---|
AutoCAD中图块的应用;崔娟;《学科建设》;20131231(第1期);全文 |
Also Published As
Publication number | Publication date |
---|---|
CN106528946A (en) | 2017-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8577655B2 (en) | System and method for constructing virtual NC controllers for machine tool simulation | |
US9141746B1 (en) | System and method to drag instance master physical shell | |
US6888542B1 (en) | Error recovery in a computer aided design environment | |
US7369917B2 (en) | System and method for automatic sorting of elements in drawing specifications for efficient tracing using motion control | |
US8872820B2 (en) | System and method for splitting faces on a solid model | |
CA2667334C (en) | Method and devices for aiding in the modeling of 3d objects | |
JPH0785137A (en) | Generating device for cad library model | |
JP3822044B2 (en) | Design verification system, design verification method, and computer-readable recording medium storing design verification program | |
JP2008217651A (en) | Design support device, design support method and program | |
CN106528946B (en) | A kind of method of batch insertion AutoCAD segment | |
CN114595657A (en) | Chip layout method and device and electronic equipment | |
CN110286901B (en) | CAD-based script generation method, system and storage medium | |
US8990741B2 (en) | Circuit design support device, circuit design support method and program | |
CN109801362B (en) | Mirror image method, system, storage medium and mirror image data processing method | |
US7895561B2 (en) | System and method for text based placement engine for custom circuit design | |
Bocevska et al. | An example of application design using solidworks application programming interface | |
CN107102971A (en) | Pattern clone method, device and equipment | |
CN112632930A (en) | Table data control method and device | |
US20170300303A1 (en) | Linear Programming Formulation for Incremental Layout in a Graphical Program | |
US11074763B2 (en) | Systems and methods for editing shapes of faceted geometries | |
CN111612874B (en) | 3D drawing board for drawing complex model | |
CN111881051B (en) | Method, device, terminal and storage medium for generating test cases | |
US20030182004A1 (en) | Electronically-accessible product description | |
JP2017021571A (en) | Semiconductor integrated circuit, and design support device and design method therefor | |
JP2831816B2 (en) | Display device for correspondence between design information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190625 Termination date: 20201018 |