CN105095599A - DWG format drawing automatic generation method - Google Patents

DWG format drawing automatic generation method Download PDF

Info

Publication number
CN105095599A
CN105095599A CN201510543217.1A CN201510543217A CN105095599A CN 105095599 A CN105095599 A CN 105095599A CN 201510543217 A CN201510543217 A CN 201510543217A CN 105095599 A CN105095599 A CN 105095599A
Authority
CN
China
Prior art keywords
function
command
dwg
needing
designing
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.)
Pending
Application number
CN201510543217.1A
Other languages
Chinese (zh)
Inventor
金欢
王景朝
黄彭
马潇
房正刚
王宪
王轶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
State Grid Tianjin Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
State Grid Tianjin Electric Power Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, China Electric Power Research Institute Co Ltd CEPRI, State Grid Tianjin Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201510543217.1A priority Critical patent/CN105095599A/en
Publication of CN105095599A publication Critical patent/CN105095599A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a DWG format drawing automatic generation method. The method is based on an AutoCAD platform, and comprises the following steps of: using a web Service as a database access technology, storing corresponding data of a to-be-generated DWG format drawing with an INI format, storing a block template in a Block, storing a public template in a Template, calling a block operating function, organizing and assembling block elements in a Block folder, and thereby forming a block object of the to-be-generated DWG format drawing; calling the operating function again, writing the corresponding data of the to-be-generated DWG format drawing in an INI folder into the block object; and using the Template public template mechanically for the block object to generate the drawing. The method provided by the invention can directly write the result of calculation in a design process into the CDA format drawing, thus, designers only need to pay attention to key works, such designing accuracy of algorithms, and are free from repeated works, moreover, generation and modification of the drawing becomes quick and convenient, and accuracy of input information is also guaranteed.

Description

A kind of DWG form drawing automatic generation method
Technical field
The present invention relates to electrical network business categorizing field, be specifically related to a kind of DWG form drawing automatic generation method.
Background technology
At present, usually need to generate a large amount of DWG form construction drawings in the work such as Design Transmission Line, Substation Design, designer generally adopts the mode of traditional-handwork typing to generate DWG drawing, these drawing kinds are many, logging data amount is huge, add huge workload to designer, also easily produce typing mistake simultaneously.
Summary of the invention
For the deficiencies in the prior art, the invention provides a kind of DWG form drawing automatic generation method, can the result calculated in design process be write direct in the drawing of CAD form, thus make designer only need to pay close attention to the core works such as the accuracy of algorithm for design, from repeat work free, also make generation and revisions on drawings become rapid and convenient, entry information accuracy also secure.
The object of the invention is to adopt following technical proposals to realize:
A kind of DWG form drawing automatic generation method, its improvements are, described method comprises:
(1) the drawing creation button needing the DWG form drawing of generation corresponding is selected;
(2) perform the described service logic function needing the DWG form drawing generated, perform every bar function command according to the order of described service logic function;
(3) if described function command is normal commands, then obtain normal commands result and perform next function command; If function command is designing and calculating order, then perform step (4), if function command is write into Databasce order, then perform step (5); If function command for generating drawing order, then performs step (6);
(4) call and perform the described designing and calculating function corresponding to DWG form drawing needing to generate of packing in DLL mode, after obtaining designing and calculating command result, perform next function command of described designing and calculating order and return step (3);
(5) by described normal commands result and designing and calculating command result stored in in database, perform next function command of said write database command and return step (3);
(6) data needing the DWG form drawing of generation corresponding are read in described database, and by these data with in the file of the form of symmetric tags write INI form;
(7) according to the segment handling function in described generation drawing command calls CAD operation set, organize the figure block element in assembled Block file, form the described Block Object needing the DWG form drawing generated;
(8) according to the handling function in described generation drawing command calls CAD operation set, data corresponding for the DWG form drawing needing described in described ini file to generate are write in described Block Object;
(9) described Block Object is applied mechanically Template common template;
(10) the described DWG form drawing needing to generate is generated, and by the described address of the DWG form drawing generated that needs stored in database.
Preferably, described Database access technique adopts layer functions in WebService service encapsulates to the increasing in data storehouse, the operation of deleting, changing, looking into.
Preferably, described designing and calculating function writes on calculation procedure and concentrates, and with the packing of DLL form for described service logic function call.
Preferably, described CAD operation set comprises: basic operation collection of functions and segment handling function collection, wherein, described basic operation function comprises: draw linear function, curve plotting function, the function that sets font, linear measure longimetry function and resize ratio function, described segment handling function comprises: add segment function, splicing segment function, adding device lattice function, acquisition segment size function, data inserting function and segment attribute and arrange function;
Preferably, the data that the described DWG form drawing needing to generate is corresponding comprise: described normal commands result, designing and calculating command result and parameters numeric data.
Compared with immediate prior art, the beneficial effect that the present invention has:
The invention provides a kind of automatic generation method of DWG form drawing, design calculation result directly uses for write CAD drawing stored in database by the method, ensure that the accurate of data; The present invention uses INI user-defined format to store data, and allows, at file Block internal custom basis segment, also to allow to use any language measure for fulfill, ensure that the dirigibility of the method; What the present invention proposed is a kind of automatic generation method of DWG form, and the method also can extend to other field for generation DWG drawing, ensure that the extensibility of the method.
Accompanying drawing explanation
Fig. 1 is a kind of DWG form drawing automatic generation method process flow diagram provided by the invention.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in further detail.
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
The invention provides a kind of DWG form drawing automatic generation method, as shown in Figure 1, comprising:
(1) the drawing creation button needing the DWG form drawing of generation corresponding is selected;
(2) perform the described service logic function needing the DWG form drawing generated, perform every bar function command according to the order of described service logic function;
(3) if described function command is normal commands, then obtain normal commands result and perform next function command; If function command is designing and calculating order, then perform step (4), if function command is write into Databasce order, then perform step (5); If function command for generating drawing order, then performs step (6);
The inventive method allows to use any language measure for fulfill, wherein, described generic function by do not relate to the function of algorithm, write and generating run in use language;
Such as: adopt C language to design described service logic function, in its function command, the action statement except relating to the C language statement of computational algorithm, write and generation is normal commands; Again such as: normal commands is for arranging designated parameter numerical value statement, numeric ratio comparatively size statement etc.;
(4) call and perform the described designing and calculating function corresponding to DWG form drawing needing to generate of packing in DLL mode, after obtaining designing and calculating command result, perform next function command of described designing and calculating order and return step (3);
(5) by described normal commands result and designing and calculating command result stored in in database, perform next function command of said write database command and return step (3);
(6) data needing the DWG form drawing of generation corresponding are read in described database, and by these data with in the file of the form of symmetric tags write INI form;
(7) according to the segment handling function in described generation drawing command calls CAD operation set, organize the figure block element in assembled Block file, form the described Block Object needing the DWG form drawing generated;
(8) according to the handling function in described generation drawing command calls CAD operation set, data corresponding for the DWG form drawing needing described in described ini file to generate are write in described Block Object;
(9) described Block Object is applied mechanically Template common template;
(10) the described DWG form drawing needing to generate is generated, and by the described address of the DWG form drawing generated that needs stored in database.
Such as: the button selecting mechanical property table drawing creation, then obtain the service logic function that this drawing is corresponding, popular theory, service logic function here just performs the operation steps calculated, and service logic function is as follows:
luoji()
{
Sag under // calculating meteorological condition 1
Tension force under // calculating meteorological condition 1
……
Sag under // calculating meteorological condition n
Tension force under // calculating meteorological condition n
……
}
Wherein, the designing and calculating algorithm in service logic function, comprise the algorithm calculating sag and calculate tension force, be all packetized in DLL, be called by DLL mode, meteorological condition 1-n is then the normal commands in service logic function;
Concrete, described Database access technique adopts layer functions in WebService service encapsulates to the increasing in data storehouse, the operation of deleting, changing, looking into.
Described designing and calculating function writes on calculation procedure and concentrates, and with the packing of DLL form for described service logic function call.
Described CAD operation set comprises: basic operation collection of functions and segment handling function collection, wherein, described basic operation function comprises: draw linear function, curve plotting function, the function that sets font, linear measure longimetry function and resize ratio function, described segment handling function comprises: add segment function, splicing segment function, adding device lattice function, acquisition segment size function, data inserting function and segment attribute and arrange function;
The data that the described DWG form drawing needing to generate is corresponding comprise: described normal commands result, designing and calculating command result and parameters numeric data.
Wherein, described parameters numeric data can have user to arrange according to actual conditions.
Finally should be noted that: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit; although with reference to above-described embodiment to invention has been detailed description; those of ordinary skill in the field are to be understood that: still can modify to the specific embodiment of the present invention or equivalent replacement; and not departing from any amendment of spirit and scope of the invention or equivalent replacement, it all should be encompassed within claims of the present invention.

Claims (5)

1. a DWG form drawing automatic generation method, is characterized in that, described method comprises:
(1) the drawing creation button needing the DWG form drawing of generation corresponding is selected;
(2) perform the described service logic function needing the DWG form drawing generated, perform every bar function command according to the order of described service logic function;
(3) if described function command is normal commands, then obtain normal commands result and perform next function command; If function command is designing and calculating order, then perform step (4), if function command is write into Databasce order, then perform step (5); If function command for generating drawing order, then performs step (6);
(4) call and perform the described designing and calculating function corresponding to DWG form drawing needing to generate of packing in DLL mode, after obtaining designing and calculating command result, perform next function command of described designing and calculating order and return step (3);
(5) adopt Database access technique by described normal commands result and designing and calculating command result stored in in database, perform next function command of said write database command and return step (3);
(6) Database access technique is adopted to read in described database the data needing the DWG form drawing of generation corresponding, and by these data with in the file of the form of symmetric tags write INI form;
(7) according to the segment handling function in described generation drawing command calls CAD operation set, organize the figure block element in assembled Block file, form the described Block Object needing the DWG form drawing generated;
(8) according to the basic operation function in described generation drawing command calls CAD operation set, data corresponding for the DWG form drawing needing described in described ini file to generate are write in described Block Object;
(9) described Block Object is applied mechanically Template common template;
(10) generate the described DWG form drawing needing to generate, and adopt Database access technique by the described address of the DWG form drawing generated that needs stored in database.
2. the method for claim 1, is characterized in that, described Database access technique adopts layer functions in WebService service encapsulates to the increasing in data storehouse, the operation of deleting, changing, looking into.
3. the method for claim 1, is characterized in that, described designing and calculating function writes on calculation procedure and concentrates, and with the packing of DLL form for described service logic function call.
4. the method for claim 1, it is characterized in that, described CAD operation set comprises: basic operation collection of functions and segment handling function collection, wherein, described basic operation function comprises: draw linear function, curve plotting function, the function that sets font, linear measure longimetry function and resize ratio function, described segment handling function comprises: add segment function, splicing segment function, adding device lattice function, acquisition segment size function, data inserting function and segment attribute and arrange function.
5. the method for claim 1, is characterized in that, the data that the described DWG form drawing needing to generate is corresponding comprise: described normal commands result, designing and calculating command result and parameters numeric data.
CN201510543217.1A 2015-08-28 2015-08-28 DWG format drawing automatic generation method Pending CN105095599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510543217.1A CN105095599A (en) 2015-08-28 2015-08-28 DWG format drawing automatic generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510543217.1A CN105095599A (en) 2015-08-28 2015-08-28 DWG format drawing automatic generation method

Publications (1)

Publication Number Publication Date
CN105095599A true CN105095599A (en) 2015-11-25

Family

ID=54576024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510543217.1A Pending CN105095599A (en) 2015-08-28 2015-08-28 DWG format drawing automatic generation method

Country Status (1)

Country Link
CN (1) CN105095599A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777808A (en) * 2017-01-13 2017-05-31 浪潮通信信息系统有限公司 A kind of Internet resources generation method based on standardization CAD diagram paper
CN109446695A (en) * 2018-11-08 2019-03-08 中铁山桥集团有限公司 A method of based on the quick picture mosaic of ACAD
CN110084179A (en) * 2019-04-24 2019-08-02 上海外高桥造船有限公司 Picture frame recognition methods and system
CN111709104A (en) * 2020-05-22 2020-09-25 中国电子科技集团公司第二十九研究所 Cable assembly drawing rapid generation method based on AutoCAD secondary development
CN114117612A (en) * 2021-11-30 2022-03-01 广州优比建筑咨询有限公司 Detection method, device, medium and equipment for DWG drawing and Revit model correlation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779175A (en) * 2012-06-26 2012-11-14 北京尔宜居科技有限责任公司 Method for processing image in CAD (Computer Aided Design) format by using data in XML (Extensive Makeup Language) format
CN102831259A (en) * 2012-07-18 2012-12-19 北京中科辅龙科技股份有限公司 Automatic generation method of drawing for three-dimensional concrete structural reinforcement
CN103714203A (en) * 2013-12-20 2014-04-09 柳州腾龙煤电科技股份有限公司 Drilling histogram automatic mapping method based on CAD template binding technology

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779175A (en) * 2012-06-26 2012-11-14 北京尔宜居科技有限责任公司 Method for processing image in CAD (Computer Aided Design) format by using data in XML (Extensive Makeup Language) format
CN102831259A (en) * 2012-07-18 2012-12-19 北京中科辅龙科技股份有限公司 Automatic generation method of drawing for three-dimensional concrete structural reinforcement
CN103714203A (en) * 2013-12-20 2014-04-09 柳州腾龙煤电科技股份有限公司 Drilling histogram automatic mapping method based on CAD template binding technology

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777808A (en) * 2017-01-13 2017-05-31 浪潮通信信息系统有限公司 A kind of Internet resources generation method based on standardization CAD diagram paper
CN106777808B (en) * 2017-01-13 2020-06-09 浪潮天元通信信息系统有限公司 Network resource generation method based on standardized CAD drawing
CN109446695A (en) * 2018-11-08 2019-03-08 中铁山桥集团有限公司 A method of based on the quick picture mosaic of ACAD
CN110084179A (en) * 2019-04-24 2019-08-02 上海外高桥造船有限公司 Picture frame recognition methods and system
CN110084179B (en) * 2019-04-24 2021-07-23 上海外高桥造船有限公司 Frame identification method and system
CN111709104A (en) * 2020-05-22 2020-09-25 中国电子科技集团公司第二十九研究所 Cable assembly drawing rapid generation method based on AutoCAD secondary development
CN114117612A (en) * 2021-11-30 2022-03-01 广州优比建筑咨询有限公司 Detection method, device, medium and equipment for DWG drawing and Revit model correlation
CN114117612B (en) * 2021-11-30 2022-06-24 广州优比建筑咨询有限公司 Detection method, device, medium and equipment for correlation between DWG (discrete wavelet transform) drawing and Revit model

Similar Documents

Publication Publication Date Title
CN105095599A (en) DWG format drawing automatic generation method
CN101661460B (en) Method and device for generating management system report
CN104036060B (en) A kind of online checking method of engineering drawing and system
US10885237B2 (en) Network simulation device, network simulation method, and network simulation program
CN104063495A (en) Form extension method and form extension device
CN104346502B (en) A kind of method based on ODB++ file translations for editable PCB domains
WO2016141685A1 (en) Telecommunications engineering drawing generation method and drawing design client
CN108829653A (en) A kind of generation method of report, device, equipment and medium
CN104978411A (en) Train model development method and apparatus for high-speed train
CN105653255A (en) Method arranging report template to automatically generate report files in office frame
CN112818457A (en) BIM (building information modeling) model intelligent generation method and system based on CAD (computer-aided design) drawing
CN106682879A (en) Integrated design flow standard system
CN104636537A (en) Pretreatment system and method for umbilical cable finite element model
CN101739498B (en) Method for accurately designing and building ArcGIS symbol library
CN104375814A (en) Generation method and device of an interface document
KR20150030810A (en) Method of generating pmi in light model
CN106484388A (en) The implementation method of user interface and device
CN103106313A (en) Method for sequentially reconstructing rolled pieces
US20190146457A1 (en) System and method for finite element analysis of parts having variable spatial density graded regions produced via 3d printers
CN113761859A (en) Electronic report definition method and device and electronic equipment
CN101847166A (en) Nuclear power control strategy diagram forming platform system and method
CN105488052A (en) Method and system for converting structural data into layout form file
CN107480364B (en) BIM (building information modeling) model dynamic organization method for engineering construction information management
CN115471582A (en) Map generation method and device, computer equipment and storage medium
CN101105818A (en) Wiring data generating system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20151125