CN106873922A - The batch order Method of printing and device of a kind of CAD diagram paper - Google Patents

The batch order Method of printing and device of a kind of CAD diagram paper Download PDF

Info

Publication number
CN106873922A
CN106873922A CN201710050008.2A CN201710050008A CN106873922A CN 106873922 A CN106873922 A CN 106873922A CN 201710050008 A CN201710050008 A CN 201710050008A CN 106873922 A CN106873922 A CN 106873922A
Authority
CN
China
Prior art keywords
printing
file
cad diagram
diagram paper
map sheet
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.)
Granted
Application number
CN201710050008.2A
Other languages
Chinese (zh)
Other versions
CN106873922B (en
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.)
Xiangyang CRRC Electric Machinery Co Ltd
CRRC Zhuzhou Mechanical and Electronic Technology Co Ltd
Original Assignee
Zhuzhou Zhongche Electromechanical Technology 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 Zhuzhou Zhongche Electromechanical Technology Co Ltd filed Critical Zhuzhou Zhongche Electromechanical Technology Co Ltd
Priority to CN201710050008.2A priority Critical patent/CN106873922B/en
Publication of CN106873922A publication Critical patent/CN106873922A/en
Application granted granted Critical
Publication of CN106873922B publication Critical patent/CN106873922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1204Improving or facilitating administration, e.g. print management resulting in reduced user or operator actions, e.g. presetting, automatic actions, using hardware token storing data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1268Job submission, e.g. submitting print job order or request not the print data itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/128Direct printing, e.g. sending document file, using memory stick, printing from a camera

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a kind of batch order Method of printing of CAD diagram paper, step is:S01, startup AutoCAD softwares, and be attached with printing device;S02, reading print object;S03, set up page order array;S04, map sheet are set;S05, startup printing device are printed.Invention additionally discloses a kind of batch order printing equipment of CAD diagram paper, including file module, page order processing module, map sheet setup module and printing device are read, reading file module is used to read print object;Page order processing module is used to set up page order array;Map sheet setup module is used to read drawing file pel and drawing list file, obtains printing map sheet and sets;Printing device, prints in order for each CAD diagram paper to be printed into map sheet setting by it.The advantages of CAD diagram paper Method of printing of the invention and device are respectively provided with the printing of easy to operate, achievable CAD diagram paper batch order, improve printing effect.

Description

The batch order Method of printing and device of a kind of CAD diagram paper
Technical field
The invention mainly relates to printing technique field, the batch order Method of printing and device of a kind of CAD diagram paper are refered in particular to.
Background technology
Based on AutoCAD it is efficient, accurate, many advantages, such as be easily managed, current most of design industries are all used AutoCAD draws engineering drawing, and the engineering drawing quantity of many industries is all hundreds and thousands of, but the spy for software in itself Point, the printing (being output as paper document or other formatted files) of traditional CAD diagram paper can only be carried out manually one by one, no Can in batches, continuously, automatically print, bulk print can not be carried out according to specified order.Wherein individual drawing is printed, its Key step is as follows:
(1) open drawing file (drawing file folder file is searched time consuming when many);
(2) printing device is selected;
(3) type style is selected;
(4) drawing size is selected;
(5) setting of printing (including print range, longitudinal/horizontal, scaling offsets, number etc.);
(6) printing device is sent to, printing is completed;
(7) drawing file is closed.
Accordingly, for a whole set of drawing, traditional Method of printing can be summarized as three steps:Manual locating file, set manually Put printing (above-mentioned 7 steps), next drawing.As it was previously stated, the engineering drawing quantity of many industries is all hundreds and thousands of, this Method of printing is planted, significantly limit project goes out figure efficiency.
Knowable to above printing step, there is following shortcoming in traditional this manual Method of printing one by one:
1st, printing effect is low, and designer's workload is big.
Different drawing files, its map sheet size, default print pattern, print range, longitudinal direction/transverse direction, scaling etc. Setting of printing is all different, and almost every drawing will reset once, the printing side of traditional this manual setting Method, particularly in the case where drawing quantity is a lot, can spend designer's substantial amounts of time in printing, substantially reduce out figure effect Rate, increase designer's workload.Even if having the small plug-in units of part CAD can automatically set printing, but can not realize by directory order Printing, after the completion of drawing printing, after the completion of drawing printing, designer's palpus Manual arranging drawing, this can also waste designer The substantial amounts of time.
2nd, easily occur beating less, no marking, the problem beaten again.
Large number of rows industrial engineering (IE) drawing is all a lot, and corresponding file is also larger, and this allows for searching opens drawing file very It is time-consuming, and be easy to occur to beat less, no marking, the problem beaten again.
3rd, Restriction Design efficiency, influences designing quality.
Low due to going out figure efficiency, in the case where the design cycle is certain, the time for leaving other design links for is relative just few, Influence designing quality.
At present, based on this conventional printing methods, in the market has the small plug-in units of some CAD can continuously to be beaten with achievement unit component paper Print, but there is problems with these small plug-in units:
1st, picture frame identification (namely determine printing border) ability, it is impossible to recognize non-standard picture frame (be not segment, or Picture frame boundary dimensions has error with standard map size).
2nd, recognition methods is single, and printing effect is low;At present these small plug-in units identification picture frames otherwise be exactly to recognize segment picture frame, Otherwise be exactly to read maximum boundary point coordinates, by contrast, the first speed faster but accommodation very little, when picture frame is not mark With regard to None- identified during quasi- segment;Although second wide adaptation range, reading speed is very slow, because to read the end of many pels Point coordinates, then compares one by one, determines maximum boundary.
3rd, drawing size can not be automatically configured, a set of engineering drawing, each drawing file is all not necessarily identical, such as always Dress is probably A0, and finding is probably A4, and current program is all big according to the unified drawing that is set before print command is sent It is small to be printed, when a set of engineering drawing contains various drawing sizes, the size of each drawing file just must be first distinguished, then Print in batches, printing effect is relatively low.
4th, can not be printed according to directory order, after the completion of drawing printing, designer's palpus Manual arranging drawing, especially in figure When paper quantity is a lot, this can waste designer's substantial amounts of time.
The content of the invention
The technical problem to be solved in the present invention is that:For the technical problem that prior art is present, the present invention provides one It is kind easy to operate, can the printing of batch order, the batch order Method of printing of the CAD diagram paper of high working efficiency, and accordingly provide one Plant the batch order printing equipment of the CAD diagram paper of simple structure.
In order to solve the above technical problems, technical scheme proposed by the present invention is:
A kind of CAD diagram paper Method of printing, step is:
S01, startup or linked with AutoCAD software, and be attached with printing device, complete setting for bulk print information Put;
S02, reading print object:When it is " printing active document " to choose print object, AutoCAD softwares are read current All moving objects;When it is " printing list content " to choose print object, then all CAD for searching under specified range or path File, and read appropriate address;
S03, set up page order array:Print object is ranked up in order, generates a two-dimensional array Dysz (1 To N, 1 to 3), wherein one-dimensional representation sequence number, the drawing information of two-dimensional representation each file, including drawing file is complete Path, size and number;
S04, map sheet are set:The drawing file pel and drawing list file of each CAD diagram paper are read, each CAD is calculated The printing map sheet of drawing is set, and the printing map sheet sets and includes drawing size, graphic limit, figure direction and pantograph ratio Example;
S05, startup printing device, print each CAD diagram paper map sheet setting and are printed by it successively by page order.
As the further improvement of above-mentioned technical proposal:
In step S02, when it is " printing list content " to choose print object, search specified range or path include three The mode of kind:Search only for first class catalogue, search to two grades of subdirectories and search to bottom.
In step S04, it is determined that the method for the graphic limit in printing map sheet is:Obtained using GetVariable methods The border of drawing file, then obtains graphic limit with scope printing type.
In step S04, it is determined that the method for the graphic limit in printing map sheet is:Read all figures in drawing file Block, then obtains all pieces of border point coordinates using GetBoundingBox methods, and these points are compared one by one, draws The coordinate of drawing boundary point, then obtain graphic limit with window printing type.
In step S04, it is determined that the method for the graphic limit in printing map sheet is:It is all in reading drawing file first Horizontally and vertically then these points are compared by the extreme coordinates of straight line one by one, draw the coordinate of drawing boundary point, then use window Mouth printing type obtains graphic limit.
After graphic limit is obtained, figure direction is determined by the length-width ratio of graphic limit.
In step S04, drawing file of the drawing size in the length-width ratio or two-dimensional array of graphic limit Size is determined.
The invention also discloses a kind of batch order printing equipment of CAD diagram paper, including read file module, page order Processing module, map sheet setup module and printing device,
The reading file module, for reading print object:When it is " printing active document " to choose print object, read Take the current all moving objects of AutoCAD softwares;When it is " printing list content " to choose print object, then specified range is searched for Or all cad files under path, and read appropriate address;
The page order processing module, for setting up page order array:Print object is ranked up in order, is closed One two-dimensional array Dysz (1to N, 1to 3) of generation, wherein one-dimensional representation sequence number, the drawing of two-dimensional representation each file Information, including the complete trails of drawing file, size and number;
The map sheet setup module, drawing file pel and drawing list file for reading each CAD diagram paper, calculates To each CAD diagram paper printing map sheet set, it is described printing map sheet set include drawing size, graphic limit, figure direction and Scaling;
The printing device, is printed for each CAD diagram paper to be printed into map sheet setting by it successively by page order.
As the further improvement of above-mentioned technical proposal:
The printing device includes virtual printer.
Also include display module, the display module is connected by communication with the map sheet setup module.
Compared with prior art, the advantage of the invention is that:
The batch order Method of printing of CAD diagram paper of the invention, can be continuous, automatic to set printing according to directory order Information, rapidly and efficiently print drawing (being output as paper document or extended formatting file), can not be by solve AutoCAD Continuously, in a designated order, bulk print, it is low to go out figure efficiency, and designer's workload is big, and easily occurs beating less, no marking, beats again Problem.The batch order printing equipment of CAD diagram paper of the invention equally has the advantages that described in as above method, and structure letter Singly, it is easily achieved.
Brief description of the drawings
Fig. 1 is flow chart of the method for the present invention.
Fig. 2 is the flow chart of page order array generation in the inventive method.
Fig. 3 is to search only for the flow chart of first class catalogue in the inventive method.
Fig. 4 be the inventive method in search for two grades of flow charts of subdirectory.
Fig. 5 be the inventive method in search for the flow chart of bottom.
Fig. 6 is the frame assumption diagram of printing equipment of the invention.
Specific embodiment
Below in conjunction with Figure of description and specific embodiment, the invention will be further described.
As shown in figure 1, the batch order Method of printing of the CAD diagram paper of the present embodiment, step is:
S01, startup or linked with AutoCAD software, and be attached with printing device, complete setting for bulk print information Put;
S02, reading print object:When it is " printing active document " to choose print object, AutoCAD softwares are read current All moving objects;When it is " printing list content " to choose print object, then all CAD for searching under specified range or path File, and read appropriate address;
S03, set up page order array:Print object is ranked up in order, generates a two-dimensional array Dysz (1 To N, 1 to 3), wherein one-dimensional representation sequence number, the drawing information of two-dimensional representation each file, including drawing file is complete Path, size and number;
S04, map sheet are set:The drawing file pel and drawing list file of each CAD diagram paper are read, each CAD is calculated The printing map sheet of drawing is set, and printing map sheet sets and includes drawing size, graphic limit, figure direction and scaling;
S05, startup printing device, print each CAD diagram paper map sheet setting and are printed by it successively by page order.
In the present embodiment, in step S02, when it is " printing list content " to choose print object, specified range is searched for Or path includes three kinds of modes:Search only for first class catalogue, search to two grades of subdirectories and search to bottom.
As shown in figure 1, being further described to Method of printing of the invention with reference to an example:
1st, set before printing
As shown in figure 1, user can unrestricted choice printer, print object, page order and printing model, additionally, such as Fruit is not special printing, and user can select " key setting " function, be configured according to the mode of system default, further carry High efficiency.
2nd, startup/linked with AutoCAD, sets up internal data connection
After completing to set, automatic AutoCAD (AutoCAD is closed) is realized by interface language, or Person's linked with AutoCAD (AutoCAD has been started up), sets up internal connection, to complete the transmission of bulk print information and data, anti- Feedback.
3rd, search, read print object
Set according to user and judged:
If a) user's selection print object is " printing active document ", the current all work of AutoCAD softwares are read Dynamic (opening) object, and its quantity N, and pop-up dialogue box are counted so that user confirms.
If b) user's selection print object is " printing list content ", start search, the search model specified by user Enclose with all of cad file under searching route, read its address and shown, statistics file quantity N, for user confirm.
4th, page order array is obtained
As shown in Fig. 2 if selection is printed by drawing list, point out user specify drawing list file (excel or Cad file), internal connection is then set up by interface language and this document application program, its data is read, it is right according to its order The print object sequence that upper step is obtained, a newly-built two-dimensional array Dysz (1 to N, 1 to 3), wherein one-dimensional representation sequence Number, the drawing information of two-dimensional representation each file, including the complete trails of drawing file, size and number;Otherwise, according to acquiescence Order sets up array.
Meanwhile, initialize currently processed file index n=1, successful print quantity of documents d=0.
5th, on active file P (n) is beaten, pel is read, border, drawing size is calculated, vertical/horizontal, printing type is determined
As shown in figure 1, being first according to the order of the order array of above flow acquisition, since n=1, opening (is not beaten Open), or activation (opening) file P (n), drawing file pel is then read by VB program languages and interface language and is believed Breath, automatically determines printing border and printing type (present invention provides three kinds of modes, sees below), and by its features, with most Good mode is combined, it is ensured that most can quickly calculate, determine the printing border of nearly all effective drawing, and determine it Graphic printing direction.
6th, print, count type information,
Above-mentioned reading result of calculation is judged, if without mistake, to printing device (including virtual printer, Such as Adobe PDF) print command is sent, printed, while this document is removed in lists, successful print quantity of documents d=d +1;Fruit does not read any effective pel (file is empty file or only contains illustrative words) in this document, does not do any Action, is directly entered next flow.
7th, close current file and enter next circulation until Print All, exports print result information
If selecting " having played closing " in man-machine interface, current document is first closed, do not closed otherwise, then judge to work as Preceding document index n whether etc. total file to be printed number (n=N), if n<N, then n=n+1, continues cycling through execution flow 5, flow 6;If n=N, illustrate that all documents have printed completion, export print result information:Mimeograph documents quantity d has been completed, it is not complete Print quantity of documents N-d in dozen, and it is non-mimeograph documents to point out file in list, asks user to check or manually complete printing;Program Terminate.
As shown in fig. 6, the present invention further correspondingly discloses a kind of batch order printing equipment of CAD diagram paper, including read text Part module, page order processing module, map sheet setup module and printing device,
File module is read, for reading print object:When it is " printing active document " to choose print object, read The current all moving objects of AutoCAD softwares;When choose print object be " printing list content " when, then search for specified range or All cad files under path, and read appropriate address;
Page order processing module, for setting up page order array:Print object is ranked up in order, closes generation One two-dimensional array Dysz (1 to N, 1 to 3), wherein one-dimensional representation sequence number, the drawing letter of two-dimensional representation each file Breath, including the complete trails of drawing file, size and number;
Map sheet setup module, drawing file pel and drawing list file for reading each CAD diagram paper are calculated each The printing map sheet of CAD diagram paper is set, and printing map sheet sets and includes drawing size, graphic limit, figure direction and scaling;
Printing device, is printed for each CAD diagram paper to be printed into map sheet setting by it successively by page order.
In the present embodiment, printing device includes virtual printer.
In the present embodiment, also including display module, display module is connected by communication with map sheet setup module.
Printing equipment of the invention is further described with reference to above-mentioned Method of printing:
Read file module:Needed for different lookups, (assigned catalogue can be searched only for by three kinds of hunting zone modes Under all cad files, search assigned catalogue and its all cad file of next stage catalogue, search assigned catalogue and its all specific items Record all cad files), bulk lookup wants mimeograph documents, it is also possible to single search, so that user's lookup rapidly and efficiently will be printed File, reads its address and is conducted into printing list.
Read file module and mainly first call CommonDialog controls, eject Path selection dialog box, user specifies Destination folder, is then freely scanned for by following three mode as needed.
(1) first class catalogue is searched only for:
As shown in figure 3, the manner searches only for all cad files under specified folder.
The path first specified to user carries out string processing, so that it becomes effective document path Fd, assignment searching route Mypath=Fd, then reads All Files name Myname=Dir (MyPath, vbDirectory Or under Mypath VbHidden Or vbNormal Or vbReadOnly), then judge whether this document is cad file (Right one by one (Myname, 4)=" .dwg "), it is that its complete trails is added to list.Quantity of documents in finally statistics list, so as to user It is confirmed whether there is no marking.
(2) search for second-level directory:
As shown in figure 4, the manner search only under specified folder and its next stage file under all cad files.
The path first specified to user carries out string processing, so that it becomes effective document path Fd, assignment searching route Mypath=Fd, then reads All Files and sub-folder name Myname=Dir (MyPath, vbDirectory under Mypath Or vbHidden Or vbNormal Or vbReadOnly);With GetAttr (MyPath&Myname) And VbDirectory)=vbDirectory determines whether subdirectory one by one, if second-level directory, then catalogue number idir= Idir+1, the index of this document folder is idir-1, i.e. dir (idir-1)=Myname;
If file, then judge whether this document is cad file (Right (Myname, 4)=" .dwg "), then will be Its complete trails is added to list.
After having searched for all first class catalogues, assignment Mypath=Fd+dir (n) repeats the above steps, i.e., to each two grades File search only for the whole process of first class catalogue;Quantity of documents in finally statistics list, so that user is confirmed whether have No marking.
(3) search for specified folder bottom
As shown in figure 5, the manner is searched only under specified folder and its all cad files under all subdirectory files.
The path first specified to user carries out string processing, so that it becomes effective document path Fd, assignment searching route Mypath=Fd, then reads All Files and sub-folder name Myname=Dir (MyPath, vbDirectory under Mypath Or vbHidden Or vbNormal Or vbReadOnly);With GetAttr (MyPath&Myname) And VbDirectory)=vbDirectory determines whether subdirectory one by one, if second-level directory, then catalogue number idir= Idir+1, the index of this document folder is idir-1, i.e. dir (idir-1)=Myname.
If file, then judge whether this document is cad file (Right (Myname, 4)=" .dwg "), then will be Its complete trails is added to list.
After having searched for all first class catalogues, assignment Mypath=Mypath+dir (n) is circulated to all subdirectories and performed Above-mentioned steps, the cad file under searching specified path and its all bottom subdirectories;Number of files in finally statistics list Amount, so that user is confirmed whether there is no marking.
Page order processing module:The cad file for importing list by user's specified path can be printed (to open, Huo Zheguan Closed state can), it is also possible to print AutoCAD softwares when front opening all active documents.The treatment of its page order is all It is the same, is all the sequential system selected according to user, generates an order two-dimensional array Szdy (To of 1 To 10000,1 3), wherein the print sequence number (PSN) of one-dimensional representation this document, expression file name (including complete trails) of the second dimension 1,2 represent this documents Drawing size, 3 represent line number of this document in printing list.
As shown in Fig. 2 it implements flow:If user's selection is printed by tab sequential, successively by list Chinese The full name of part be assigned to print array Dysz (i, 1)=list1.list (i), for active document Dysz (i, 1)= AcadAPP.Documents (i), if selection is printed by catalogue, calls CommonDialog controls, sets its screening conditions It is Excel or cad file, the drawing list of Excel or CAD types can only be selected to limit user, after user's selection, connection Excel (or CAD) .Application, be successively read from top to bottom designation of drawing row file name Tzmc (i), then and row Table content or active document are contrasted one by one, because list content is the full name of file (including complete trails, and drawing list before this In be only filename, it is necessary to list content is processed (first obtain array, then extraction document name with split functions), if Tzmc (i) is present in the list1.list (n) of printing list, or active document AcadAPP.Documents (n), then Dysz (i, 1)=list1.list (n) or Dysz (i, 1)=AcadAPP.Documents (n), Dysz (i, 2)=Ml.Tzdx, Dysz (i, 3)=n.
The sequence number that can be tieed up by array first after genesis sequence array carries out subsequent printing operation to All Files successively, so The drawing for typing it out, it is not necessary to which manual sorting again sequentially, improves printing effect, is especially become apparent from when drawing quantity is larger.
It is automatic that map sheet module is set:As shown in figure 1, the printing map sheet of CAD diagram paper is set mainly includes drawing size, figure The determination on border (picture frame), figure direction (longitudinal direction/horizontal) and scaling, traditional manual print method is all by printing Drawing file carries out these settings to person one by one according to actual needs.This printing equipment is read by VB program languages and interface language Drawing file pel and drawing list file, the map sheet that calculating is designed when determining that drawing is drawn are set, and with optimal printing Set and send print command to printing device, complete the automatic printing of drawing.
1. the determination of graphic limit (picture frame)
Printing map sheet set in, most critical be also it is most basic be graphic limit (picture frame) determination, now there is provided three Plant the method that graphic limit is automatically determined, and calculating speed and range of application and the feelings of specific drawing according to each method Condition, the method that selection Optimal Boundary is automatically determined, it is ensured that with most fast speed, most wide use scope realizes bulk print.Under Face is three kinds automatically determines the specific practice and feature of boundary method:
(1) border of drawing file is obtained using GetVariable (" EXTMAX/EXTMIN ") method;
This method is first with the side for coordinating GetVariable (" EXTMAX/EXTMIN ") method to obtain drawing file Boundary, is then printed with scope printing type (PlotType=acExtents), is the fast speed of service the characteristics of its is maximum, It is well suited for pel all inside picture frame, drawing of the picture frame outside without any pel, but when other pels are contained outside picture frame, it is this The border that method determines is exactly the region for including outer frame pel, and actually in most cases we are only needed in printing picture frame The content in face.
(2) drawing border is determined using segment
This method reads all segments in drawing file first, then obtains institute using GetBoundingBox methods There is the border point coordinates of block, these points are compared one by one, draw the coordinate of drawing boundary point (lower-left point and upper right point), then Printed with window printing type (PlotType=acWindow).This printing type accommodation is wider, but operation speed Degree is slower.
(3) drawing border is drawn using horizontally and vertically straight line
This method reads the extreme coordinates of all horizontally and vertically straight lines in drawing file first, then to these points It is compared one by one, draws the coordinate of drawing boundary point (lower-left point and upper right point), then with window printing type (PlotType= AcWindow) printed.This printing type accommodation is very wide, almost adapts to the printing of all cad files, but because of it Computationally intensive, the speed of service is slow.
When specifically used, the side of drawing file is obtained with GetVariable (" EXTMAX/EXTMIN ") method first Boundary, calculates its length-width ratio Ckb, if Ckb is the Aspect Ratio of standard map size, such as the length-width ratio of A3 drawings is 1.41414 (transverse direction) or 0.70714 (longitudinal direction), then illustrate that pel all in picture frame, is adapted to scope printing, now uses first way efficiency Highest.
If Ckb is not standard map size, it is judged as whether drawing file has Block Object, if then utilizing second The mode of kind determines drawing border, first reads all segments in drawing file, is then obtained using GetBoundingBox methods These points are compared by all pieces of border point coordinates one by one, draw the coordinate of drawing boundary point (lower-left point and upper right point), Drawing Aspect Ratio Ckb is calculated, then is printed with window printing type (PlotType=acWindow);
If the drawing border Aspect Ratio Ckb that first two method all cannot or be obtained is not the length of quasi- drawing size Ratio wide, then use the third method, the extreme coordinates of all horizontally and vertically straight lines in drawing file is read, then to these Point is compared one by one, draws the coordinate of drawing boundary point (lower-left point and upper right point), calculates its length-width ratio Ckb, then use window Printing type (PlotType=acWindow) is printed (or being output as other formatted files).
So, three kinds of respective advantages of method are just combined, with most fast speed, most wide use scope realizes that batch is beaten Print.
2. the determination of figure direction (longitudinal direction/horizontal)
The length-width ratio Ckb of the graphic limit that the present invention is obtained by 1. process is still horizontal to determine being longitudinally arranged for drawing Arrangement, works as Ckb>1, then it is laterally (PlotRotation=ac90degrees), otherwise, to be set to longitudinal direction to set figure direction (PlotRotation=ac0degrees).
3. the determination of drawing size is exported
Output drawing size can be specified by user in man-machine interface, it is also possible to be automatically determined, when automatically determining, if The printing of drawing list order is pressed in selection, then the two-dimensional element 2 of the page order array for being obtained by page order processing module is (i.e. Dysz (i, 2)) selection drawing size, if tab sequential is pressed in selection, the length-width ratio of the graphic limit obtained according to 1. process Ckb and standard map length-width ratio relatively determine that such as length-width ratio is 1.41414 (transverse directions) or 0.70714 (longitudinal direction), it is determined that defeated Go out drawing A3 drawings.
Additionally, in addition to above-mentioned several important settings, remaining map sheet of the invention and print setting are all at interface by user On the setting specified set, be configured in the way of present invention acquiescence if specifying, such as default print pattern It is PCCAD.ctb patterns:StyleSheet=" PCCAD.ctb ";It is scaled to drawing size:StandardScale= acScaleToFit;Printing placed in the middle:CenterPlot=True;Print object line width:PlotWithLineweights=True Etc., user can realize all settings with " key setting " order button, and need to only set and just can once be automatically obtained batch Amount printing.
In sum, printing equipment of the invention has following function:
1st, search for, read file function
The invention provides three kinds of ways of search, user can as needed specify corresponding way of search, so as to it is quick, All CAD diagram paper files to be printed accurately are searched for, calculator memory is read in into its address, be simultaneously displayed on people of the invention Machine interactive interface, and statistics file quantity, so as to user's confirmation, user can in batches import, empty;Also can add, remove it is single File is in print queue.
The ff that this function solves conventional printing methods is slow, easily occurs beating less, the problem of no marking file.
2nd, files in batch operation, information read functions
Bulk print device of the present invention, can realize automatic AutoCAD (AutoCAD by interface language It is closed), or linked with AutoCAD (AutoCAD has been started up), internal connection is set up, in a designated order automatically The addressing cad file to be printed, reads its information (setting Printing Qptions so as to automatic), and file is closed after the completion of printing (can also select not close).It is also possible to operate and read the drawing list (excel or CAD that user specifies Table) fileinfo, to realize the printing in order of batch drawing.
3rd, independently of the setting of printing function of AutoCAD
Defect (it only adapts to the setting of individual print) based on AutoCAD setting of printing options, the present invention is for batch Print and meet different printing demands, there is provided independently of AutoCAD, more, more succinct setting of printing option, to use Family quick (multiple files are only set once), flexibly carry out setting of printing.As user can freely choose text in printing list Part, or AutoCAD current active documents, or the two is all printed.
4th, automatic, efficient identification picture frame, it is automatic that vertical/horizontal drawing, drawing size, type information statistical function are set
The method that drawing file prints border is obtained the invention discloses three kinds, and by its features, with optimal side Formula is combined, it is ensured that most can quickly calculate, determine the printing border of nearly all effective drawing, and determine that its figure is beaten India side to, the drawing size of (including specify manually and specified by catalogue file) can be specified by user, also can be automatic, be different Drawing different drawing sizes are set, carry out bulk print.
In addition the present invention can count common mimeograph documents quantity, and remaining file (partly without figure after the completion of bulk print Frame fails to print drawing without pel pure words type) quantity, and including in human-computer interaction interface of the invention, so that user is true Recognize, so as not to beat less, no marking.
5th, bulk print order specifies function
User's unrestricted choice is supplied the invention provides three kinds of page orders, by tab sequential, by active document order, by figure Sample directory order, solve the problems, such as current subprogram can batch but can not print in a designated order.
The above is only the preferred embodiment of the present invention, protection scope of the present invention is not limited merely to above-described embodiment, All technical schemes belonged under thinking of the present invention belong to protection scope of the present invention.It should be pointed out that for the art For those of ordinary skill, some improvements and modifications without departing from the principles of the present invention should be regarded as protection of the invention Scope.

Claims (10)

1. the batch order Method of printing of a kind of CAD diagram paper, it is characterised in that step is:
S01, startup or linked with AutoCAD software, and be attached with printing device, complete the setting of bulk print information;
S02, reading print object:When it is " printing active document " to choose print object, reads AutoCAD softwares and currently own Moving object;When it is " printing list content " to choose print object, then all CAD texts searched under specified range or path Part, and read appropriate address;
S03, set up page order array:Print object is ranked up in order, one two-dimensional array Dysz of generation (1to N, 1 to 3), wherein one-dimensional representation sequence number, the drawing information of two-dimensional representation each file, drawing information includes drawing file Complete trails, size and number;
S04, map sheet are set:The drawing file pel and drawing list file of each CAD diagram paper are read, each CAD diagram paper is calculated Printing map sheet set, it is described printing map sheet set include drawing size, graphic limit, figure direction and scaling;
S05, startup printing device, print each CAD diagram paper map sheet setting and are printed by it successively by page order.
2. the batch order Method of printing of CAD diagram paper according to claim 1, it is characterised in that in step S02, when When choosing print object for " printing list content ", search specified range or path include three kinds of modes:Search only for first class catalogue, Search is to two grades of subdirectories and searches for bottom.
3. the batch order Method of printing of CAD diagram paper according to claim 1, it is characterised in that in step S04, really Surely the method for the graphic limit in printing map sheet is:The border of drawing file is obtained using GetVariable methods, model is then used Enclose printing type and obtain graphic limit.
4. the batch order Method of printing of CAD diagram paper according to claim 1, it is characterised in that in step S04, really Surely the method for the graphic limit in printing map sheet is:The all segments in drawing file are read, is then utilized GetBoundingBox methods obtain all pieces of border point coordinates, and these points are compared one by one, draw drawing boundary point Coordinate, then obtain graphic limit with window printing type.
5. the batch order Method of printing of CAD diagram paper according to claim 1, it is characterised in that in step S04, really Surely the method for the graphic limit in printing map sheet is:The end points for reading all horizontally and vertically straight lines in drawing file first is sat Then these points are compared by mark one by one, draw the coordinate of drawing boundary point, then obtain graph edge with window printing type Boundary.
6. the batch order Method of printing of the CAD diagram paper according to any one in claim 3 to 5, it is characterised in that After obtaining graphic limit, figure direction is determined by the length-width ratio of graphic limit.
7. the CAD diagram paper Method of printing according to any one in claim 3 to 5, it is characterised in that in step S04, Drawing file size of the drawing size in the length-width ratio or two-dimensional array of graphic limit is determined.
8. the batch order printing equipment of a kind of CAD diagram paper, it is characterised in that including reading file module, page order treatment Module, map sheet setup module and printing device,
The reading file module, for reading print object:When it is " printing active document " to choose print object, read The current all moving objects of AutoCAD softwares;When choose print object be " printing list content " when, then search for specified range or All cad files under path, and read appropriate address;
The page order processing module, for setting up page order array:Print object is ranked up in order, closes generation One two-dimensional array Dysz (1 to N, 1 to 3), wherein one-dimensional representation sequence number, the drawing letter of two-dimensional representation each file Breath, including the complete trails of drawing file, size and number;
The map sheet setup module, drawing file pel and drawing list file for reading each CAD diagram paper are calculated each The printing map sheet of CAD diagram paper is set, and the printing map sheet sets and includes drawing size, graphic limit, figure direction and scaling Ratio;
The printing device, is printed for each CAD diagram paper to be printed into map sheet setting by it successively by page order.
9. the batch order printing equipment of CAD diagram paper according to claim 8, it is characterised in that the printing device bag Include virtual printer.
10. the batch order paper printing equipment of CAD diagram paper according to claim 8, it is characterised in that also including display mould Block, the display module is connected by communication with the map sheet setup module.
CN201710050008.2A 2017-01-20 2017-01-20 Batch sequential printing method and device for CAD drawings Active CN106873922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710050008.2A CN106873922B (en) 2017-01-20 2017-01-20 Batch sequential printing method and device for CAD drawings

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710050008.2A CN106873922B (en) 2017-01-20 2017-01-20 Batch sequential printing method and device for CAD drawings

Publications (2)

Publication Number Publication Date
CN106873922A true CN106873922A (en) 2017-06-20
CN106873922B CN106873922B (en) 2020-04-10

Family

ID=59158762

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710050008.2A Active CN106873922B (en) 2017-01-20 2017-01-20 Batch sequential printing method and device for CAD drawings

Country Status (1)

Country Link
CN (1) CN106873922B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168659A (en) * 2017-06-21 2017-09-15 百望电子***数据服务有限公司 A kind of method and system of bulk print layout files
CN109872199A (en) * 2017-12-05 2019-06-11 航天信息股份有限公司 Invoice issuing method and system
CN110083875A (en) * 2019-04-01 2019-08-02 浙江省水利水电勘测设计院 A kind of survey design integration figure automatic map framing method based on AutoCAD layout
CN110119256A (en) * 2019-04-26 2019-08-13 无锡蓝信自动化工程有限公司 A method of rapid batch is printed as Analysis of Nested Design drawing in electronic control
CN110244920A (en) * 2019-06-18 2019-09-17 中铁工程装备集团有限公司 Cad file bulk print device and method with intelligent clipping function
CN110704625A (en) * 2019-09-30 2020-01-17 哈尔滨工程大学 CAD (computer-aided design) -based drawing information batch automatic processing method
CN111026704A (en) * 2019-12-05 2020-04-17 上海维宏电子科技股份有限公司 Method for realizing generation and storage processing of machining tool path information in numerical control system and storage medium thereof
CN111291541A (en) * 2020-03-03 2020-06-16 山东省交通规划设计院有限公司 Method and system for realizing rapid publishing of drawing catalog based on EXCEL
CN111708500A (en) * 2020-06-15 2020-09-25 荣智工企智能技术(昆山)有限公司 Drawing printing method and device, electronic equipment and storage medium
CN112181325A (en) * 2020-09-18 2021-01-05 胜宏科技(惠州)股份有限公司 Automatic generation method of PCB printing drawing
CN112306424A (en) * 2019-07-31 2021-02-02 中铁第五勘察设计院集团有限公司 Method for printing Web graphic format file
CN113190192A (en) * 2020-11-28 2021-07-30 刘坤 Batch printing method of CAD drawings
CN113495700A (en) * 2021-07-02 2021-10-12 上海中交海德交通科技股份有限公司 Batch printing method, system and equipment of drawings and computer readable storage medium
CN113655972A (en) * 2021-07-14 2021-11-16 中冶南方都市环保工程技术股份有限公司 Drawing file standardized control and batch printing method based on CAD plug-in
CN115423991A (en) * 2022-08-22 2022-12-02 惠州市海葵信息技术有限公司 Engineering drawing layout method, controller and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
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
CN102135865A (en) * 2011-04-25 2011-07-27 柳州五菱汽车有限责任公司 Method and device for printing engineering drawings in batches
CN102495753A (en) * 2011-10-21 2012-06-13 江苏省交通科学研究院股份有限公司 Interactive computer-aided design (CAD) engineering drawing batch processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
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
CN102135865A (en) * 2011-04-25 2011-07-27 柳州五菱汽车有限责任公司 Method and device for printing engineering drawings in batches
CN102495753A (en) * 2011-10-21 2012-06-13 江苏省交通科学研究院股份有限公司 Interactive computer-aided design (CAD) engineering drawing batch processing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何德平等: "AutoCAD 批量打印的实现", 《城市勘测》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168659A (en) * 2017-06-21 2017-09-15 百望电子***数据服务有限公司 A kind of method and system of bulk print layout files
CN109872199A (en) * 2017-12-05 2019-06-11 航天信息股份有限公司 Invoice issuing method and system
CN109872199B (en) * 2017-12-05 2023-01-17 航天信息股份有限公司 Invoice issuing method and system
CN110083875A (en) * 2019-04-01 2019-08-02 浙江省水利水电勘测设计院 A kind of survey design integration figure automatic map framing method based on AutoCAD layout
CN110119256A (en) * 2019-04-26 2019-08-13 无锡蓝信自动化工程有限公司 A method of rapid batch is printed as Analysis of Nested Design drawing in electronic control
CN110244920A (en) * 2019-06-18 2019-09-17 中铁工程装备集团有限公司 Cad file bulk print device and method with intelligent clipping function
CN110244920B (en) * 2019-06-18 2022-11-01 中铁工程装备集团有限公司 CAD file batch printing equipment with intelligent cutting function and method
CN112306424A (en) * 2019-07-31 2021-02-02 中铁第五勘察设计院集团有限公司 Method for printing Web graphic format file
CN110704625A (en) * 2019-09-30 2020-01-17 哈尔滨工程大学 CAD (computer-aided design) -based drawing information batch automatic processing method
CN111026704A (en) * 2019-12-05 2020-04-17 上海维宏电子科技股份有限公司 Method for realizing generation and storage processing of machining tool path information in numerical control system and storage medium thereof
CN111026704B (en) * 2019-12-05 2023-11-14 上海维宏电子科技股份有限公司 Method for generating and storing processing of processing tool path information in numerical control system and storage medium thereof
CN111291541A (en) * 2020-03-03 2020-06-16 山东省交通规划设计院有限公司 Method and system for realizing rapid publishing of drawing catalog based on EXCEL
CN111291541B (en) * 2020-03-03 2023-04-25 山东省交通规划设计院集团有限公司 Method and system for realizing rapid publishing of drawing catalogue based on EXCEL
CN111708500A (en) * 2020-06-15 2020-09-25 荣智工企智能技术(昆山)有限公司 Drawing printing method and device, electronic equipment and storage medium
CN112181325A (en) * 2020-09-18 2021-01-05 胜宏科技(惠州)股份有限公司 Automatic generation method of PCB printing drawing
CN113190192A (en) * 2020-11-28 2021-07-30 刘坤 Batch printing method of CAD drawings
CN113495700A (en) * 2021-07-02 2021-10-12 上海中交海德交通科技股份有限公司 Batch printing method, system and equipment of drawings and computer readable storage medium
CN113655972A (en) * 2021-07-14 2021-11-16 中冶南方都市环保工程技术股份有限公司 Drawing file standardized control and batch printing method based on CAD plug-in
CN115423991A (en) * 2022-08-22 2022-12-02 惠州市海葵信息技术有限公司 Engineering drawing layout method, controller and storage medium
CN115423991B (en) * 2022-08-22 2023-09-12 惠州市海葵信息技术有限公司 Engineering drawing layout method, controller and storage medium

Also Published As

Publication number Publication date
CN106873922B (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN106873922A (en) The batch order Method of printing and device of a kind of CAD diagram paper
JP4339602B2 (en) A system that converts digital ink images for use in structured text / graphic editors
JP2536966B2 (en) Text editing system
JP4266695B2 (en) Image processing apparatus and image processing method
CN103793145B (en) A kind of modifying picture frame parameters identification based on AutoCAD and drawing output intent
US9058318B2 (en) Flexible web page template building system and method
US5369742A (en) Image file and retrieving apparatus and method
US7620247B2 (en) Image processing apparatus, image processing method, program, and storage medium
US6351559B1 (en) User-enclosed region extraction from scanned document images
JP2003228718A (en) Method and apparatus to convert bitmapped image for use in structured text/graphics editor
JP2005004724A (en) Image processing apparatus, control method and program thereof
JP2006179002A (en) Dynamic document icon
CN101377855A (en) Document image processing apparatus, and information processing method
US8910038B2 (en) Apparatus and method for image separation, layout, and templating
JP2008022159A (en) Document processing apparatus and document processing method
US20100131841A1 (en) Document image layout apparatus
JP2011070558A (en) Document image processor, document image processing method and document image processing program
US8400466B2 (en) Image retrieval apparatus, image retrieving method, and storage medium for performing the image retrieving method in the image retrieval apparatus
CN109726369A (en) A kind of intelligent template questions record Implementation Technology based on normative document
US7983485B2 (en) System and method for identifying symbols for processing images
US20130329263A1 (en) Image processing apparatus, and image processing method and program therefor
CN101183372A (en) Style list processing system and method
EP0585332A1 (en) Method and apparatus for automated page layout of text and graphic elements.
JP5098614B2 (en) Method for controlling sentence processing apparatus and sentence processing apparatus
CN106648481B (en) Processing method and its device, print control program and device

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220802

Address after: 441000 No.1 Wolong Avenue North, high tech Zone, Xiangyang City, Hubei Province

Patentee after: XIANGYANG CRRC ELECTRIC MACHINERY CO.,LTD.

Address before: The age of 412001 in Hunan Province, Zhuzhou Shifeng District Road No. 169

Patentee before: CRRC ZHUZHOU MECHANICAL AND ELECTRONIC TECHNOLOGY CO.,LTD.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230620

Address after: 441000 No.1 Wolong Avenue North, high tech Zone, Xiangyang City, Hubei Province

Patentee after: XIANGYANG CRRC ELECTRIC MACHINERY CO.,LTD.

Patentee after: CRRC ZHUZHOU MECHANICAL AND ELECTRONIC TECHNOLOGY CO.,LTD.

Address before: 441000 No.1 Wolong Avenue North, high tech Zone, Xiangyang City, Hubei Province

Patentee before: XIANGYANG CRRC ELECTRIC MACHINERY CO.,LTD.