CN107943857A - Automatic method, apparatus, terminal device and the storage medium for reading AutoCAD forms - Google Patents

Automatic method, apparatus, terminal device and the storage medium for reading AutoCAD forms Download PDF

Info

Publication number
CN107943857A
CN107943857A CN201711087929.2A CN201711087929A CN107943857A CN 107943857 A CN107943857 A CN 107943857A CN 201711087929 A CN201711087929 A CN 201711087929A CN 107943857 A CN107943857 A CN 107943857A
Authority
CN
China
Prior art keywords
choice set
autocad
forms
ordinate
cell
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
CN201711087929.2A
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.)
CSSC Huangpu Wenchong Shipbuilding Co Ltd
Original Assignee
CSSC Huangpu Wenchong Shipbuilding 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 CSSC Huangpu Wenchong Shipbuilding Co Ltd filed Critical CSSC Huangpu Wenchong Shipbuilding Co Ltd
Priority to CN201711087929.2A priority Critical patent/CN107943857A/en
Publication of CN107943857A publication Critical patent/CN107943857A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of automatic method for reading AutoCAD forms:Read and instruct in response to form, the cell borders that same axis is located in AutoCAD forms are connected into coherent line segment;Using AutoCAD forms as object, establish corresponding choice set S and filter out horizontal line and ordinate that length is more than screening threshold value;Choice set H is established according to the horizontal line that screening obtains, choice set V is established according to the ordinate that screening obtains;The straight line in choice set H and in choice set V is ranked up respectively;According to all horizontal lines after sequence and all ordinates, the position of each cell is determined;Its content is read according to the position of each cell;The content of all cells read is sequentially output in corresponding data file.The method can realize automatic reading AutoCAD forms, and fast and easy, drastically increases work efficiency, and avoid the drawbacks of manually reading easily error.Correspondingly, present invention also offers the device, terminal device and storage medium of the executable above method.

Description

Automatic method, apparatus, terminal device and the storage medium for reading AutoCAD forms
Technical field
The present invention relates to the automatic method for reading form, and in particular to the automatic method, apparatus for reading AutoCAD forms, Terminal device and storage medium.
Background technology
AutoCAD is widely used in industry mapping, Graphing of Engineering, building as a computer aided design software The fields such as building, electronics industry.Making figure that AutoCAD is drawn, installation diagram, generally comprise figure and parts list two in layout drawing Part.Parts list includes the object amount information of drawing, and data therein are very numerous and diverse.The method of traditional statistics object amount needs craft Parts list content is filled up in the forms such as Excel one by one, then carries out finishing analysis.The method operation is very cumbersome and holds very much Error-prone, efficiency is very low, it is necessary to expend staff's substantial amounts of time.
The content of the invention
The technical problem to be solved in the present invention is design a kind of automatic method, apparatus, terminal for reading AutoCAD forms Equipment and storage medium, can realize automatic reading AutoCAD forms, fast and easy, drastically increases work efficiency, and keeps away The drawbacks of artificial reading easily malfunctions is exempted from.
In order to solve the above technical problems, on the one hand the embodiment of the present invention provides a kind of automatic reading AutoCAD forms Method, the described method comprises the following steps:
Read and instruct in response to form, the cell borders of same axis are located in the AutoCAD forms that user is opened Connect into coherent line segment;
Using the AutoCAD forms as object, the choice set S corresponding to the AutoCAD forms is established;
Horizontal line and ordinate that length is more than screening threshold value are filtered out from the choice set S, wherein, the horizontal line and described Ordinate corresponds to different screening threshold values;
All horizontal lines according to being filtered out from the choice set S establish choice set H, are sieved according to from the choice set S All ordinates selected establish choice set V;
All horizontal lines in the choice set H are ranked up according to the ordinate of the horizontal line, according to the ordinate Abscissa is ranked up all ordinates in the choice set V;
It is all vertical in the choice set V after all horizontal lines and sequence in the choice set H after sequence Line, determines the regional location shared by each cell of the AutoCAD forms;
Regional location according to shared by each cell reads the content of the corresponding cell, to obtain State the content of all cells in AutoCAD forms;
The content of all cells read is sequentially output in corresponding data file.
In a kind of optional embodiment, all horizontal lines and sequence in the choice set H according to after sequence All ordinates in the choice set V afterwards, determine the regional location shared by each cell of the AutoCAD forms, Including:
Determine nth bar horizontal line and the intersection point d that the m articles ordinate intersects in the choice set V in the choice set HN, mSeat Mark;
Determine the intersection point of (n+1)th article of straight line and the m+1 articles straight line intersection in the choice set V in the choice set H dN+1, m+1Coordinate;Wherein 1≤n≤N-1;1≤m≤M-1;N is the maximum of the quantity of the horizontal line in the choice set H;M is The maximum of the quantity of ordinate in the choice set V;
According to intersection point dN, mCoordinate and intersection point dN+1, m+1Coordinate determination unit lattice Dn,mShared regional location, with Determine the regional location shared by each cell of the AutoCAD forms.
In a kind of optional embodiment, the corresponding screening threshold value of the horizontal line is that length is most in the choice set S The half of the length of long horizontal line, the corresponding screening threshold value of the ordinate is the longest ordinate of length in the choice set S Length half.
In a kind of optional embodiment, the content by all cells read is sequentially output corresponding It is specially in data file:Content in all cells read is sequentially output in corresponding Excel forms.
Correspondingly, in order to solve identical technical problem, an embodiment of the present invention provides a kind of automatic reading AutoCAD tables The device of lattice, described device include:
Form processing modules, instruct for being read in response to form, positioned at same in the AutoCAD forms that user is opened The cell borders of axis connect into coherent line segment;
First set processing module, for using the AutoCAD forms as object, foundation to correspond to the AutoCAD tables The choice set S of lattice;
Screening module, the horizontal line and ordinate of screening threshold value are more than for filtering out length from the choice set S, wherein, The horizontal line and the ordinate correspond to different screening threshold values;
Second set processing module, for establishing choice set H according to all horizontal lines filtered out from the choice set S, All ordinates according to being filtered out from the choice set S establish choice set V;
Sorting module, is ranked up all horizontal lines in the choice set H for the ordinate according to the horizontal line, root All ordinates in the choice set V are ranked up according to the abscissa of the ordinate;
Locating module, for all horizontal lines in the choice set H after sequence and the selection after sequence Collect all ordinates in V, determine the regional location shared by each cell of the AutoCAD forms;
Read module, the corresponding cell is read for the regional location according to shared by each cell Content, to obtain the content of all cells in the AutoCAD forms;
Output module, the content of all cells read is sequentially output in corresponding data file.
In a kind of optional embodiment, the locating module includes:
First intersection point positioning unit, for determining that nth bar horizontal line is indulged with the m articles in the choice set V in the choice set H The intersection point d that line intersectsN, mCoordinate;
Second intersection point positioning unit, for determining (n+1)th article of straight line and m+1 in the choice set V in the choice set H The intersection point d of bar straight line intersectionN+1, m+1Coordinate;Wherein 1≤n≤N-1;1≤m≤M-1;N is the horizontal line in the choice set H The maximum of quantity;M is the maximum of the quantity of the ordinate in the choice set V;
Cell positioning unit, for according to intersection point dN, mCoordinate and intersection point dN+1, m+1Coordinate determination unit lattice Dn,m Shared regional location, to determine the regional location shared by each cell of the AutoCAD forms.
In a kind of optional embodiment, the screening threshold value of the screening module is specially:The horizontal line is corresponding The screening threshold value is the half of the length of the longest horizontal line of length in the choice set S, the corresponding screening of the ordinate Threshold value is the half of the length of the longest ordinate of length in the choice set S.
In a kind of optional embodiment, the output module is specifically used for the content in all cells that will read It is sequentially output in corresponding Excel forms.
Correspondingly, the embodiment of the present invention additionally provides a kind of automatic terminal device for reading AutoCAD forms, including processing Device, memory and the computer program performed by the processor is stored in the memory and is configured as, the place Reason device realizes the above-mentioned automatic method for reading AutoCAD forms when performing the computer program.
Correspondingly, the embodiment of the present invention additionally provides a kind of computer-readable recording medium, the computer-readable storage Medium includes the computer program of storage, wherein, control the computer-readable storage medium when the computer program is run Equipment where matter performs the above-mentioned automatic method for reading AutoCAD forms.
Compared with the prior art, the embodiment of the present invention has the advantages that:An embodiment of the present invention provides one kind certainly The dynamic method for reading AutoCAD forms, the described method comprises the following steps:Read and instruct in response to form, user is opened Cell borders in AutoCAD forms positioned at same axis connect into coherent line segment;Using the AutoCAD forms as pair As establishing the choice set S corresponding to the AutoCAD forms;Length is filtered out from the choice set S and is more than screening threshold value Horizontal line and ordinate, wherein, the horizontal line and the ordinate correspond to different screening threshold values;Screened according to from the choice set S All horizontal lines gone out establish choice set H, and choice set V is established according to all ordinates filtered out from the choice set S;According to institute The ordinate for stating horizontal line is ranked up all horizontal lines in the choice set H, according to the abscissa of the ordinate to the choosing All ordinates selected in collection V are ranked up;Described in after all horizontal lines and sequence in the choice set H after sequence All ordinates in choice set V, determine the regional location shared by each cell of the AutoCAD forms;According to each Regional location shared by the cell reads the content of the corresponding cell, to obtain in the AutoCAD forms The content of all cells;The content of all cells read is sequentially output in corresponding data file.The method It can realize automatic reading AutoCAD forms, fast and easy, drastically increases work efficiency, and avoids manually to read and hold The drawbacks of error-prone.Correspondingly, the embodiment of the present invention additionally provides the executable above-mentioned automatic method for reading AutoCAD forms Device, terminal device and computer-readable recording medium.
Brief description of the drawings
Fig. 1 is a kind of flow diagram of automatic method for reading AutoCAD forms provided in an embodiment of the present invention;
Fig. 2 is a kind of structure diagram of automatic device for reading AutoCAD forms provided in an embodiment of the present invention;
Fig. 3 is a kind of structure of the locating module of automatic device for reading AutoCAD forms provided in an embodiment of the present invention Block diagram;
Fig. 4 is a kind of structure diagram of automatic terminal device for reading AutoCAD forms provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts Embodiment, belongs to the scope of protection of the invention.
Show referring to Fig. 1, it is a kind of flow of automatic method for reading AutoCAD forms provided in an embodiment of the present invention It is intended to, the described method comprises the following steps:
S1, in response to form read instruct, will user open AutoCAD forms in be located at same axis cell side Frame connects into coherent line segment;
S2, using the AutoCAD forms as object, establish corresponding to the AutoCAD forms choice set S;
S3, filter out from the choice set S horizontal line and ordinate that length is more than screening threshold value, wherein, the horizontal line and The ordinate corresponds to different screening threshold values;
All horizontal lines that S4, basis are filtered out from the choice set S establish choice set H, according to from the choice set S All ordinates filtered out establish choice set V;
S5, according to the ordinate of the horizontal line be ranked up all horizontal lines in the choice set H, according to the ordinate Abscissa all ordinates in the choice set V are ranked up;
It is all in S6, all horizontal lines in the choice set H after sequence and the choice set V after sequence Ordinate, determines the regional location shared by each cell of the AutoCAD forms;
S7, the regional location according to shared by each cell read the content of the corresponding cell, to obtain Take the content of all cells in the AutoCAD forms;
The content of all cells read, be sequentially output in corresponding data file by S8.
The classification of the horizontal line and ordinate is classified according to angle, and wherein angle is that 0 ° of straight line is horizontal line, and angle is 90 ° of straight line is ordinate.
In a kind of optional embodiment, the corresponding screening threshold value of horizontal line described in step S3 is the choice set S The half of the length of the middle longest horizontal line of length, the corresponding screening threshold value of the ordinate are that length is most in the choice set S The half of the length of long ordinate.
In a kind of optional embodiment, all horizontal lines described in step S6 in the choice set H after sequence And all ordinates in the choice set V after sequence, determine the area shared by each cell of the AutoCAD forms Domain position, including:
Determine nth bar horizontal line and the intersection point d that the m articles ordinate intersects in the choice set V in the choice set HN, mSeat Mark;
Determine the intersection point of (n+1)th article of straight line and the m+1 articles straight line intersection in the choice set V in the choice set H dN+1, m+1Coordinate;Wherein 1≤n≤N-1;1≤m≤M-1;N is the maximum of the quantity of the horizontal line in the choice set H;M is The maximum of the quantity of ordinate in the choice set V;
According to intersection point dN, mCoordinate and intersection point dN+1, m+1Coordinate determination unit lattice Dn,mShared regional location, with Determine the regional location shared by each cell of the AutoCAD forms.
In a kind of optional embodiment, the content in all cells read is sequentially output described in step S8 It is specially into corresponding data file:Content in all cells read is sequentially output corresponding Excel tables In lattice.
Referring to Fig. 2, it is a kind of structural frames of automatic device for reading AutoCAD forms provided in an embodiment of the present invention Figure, described device include:
Form processing modules 1, instruct for being read in response to form, positioned at same in the AutoCAD forms that user is opened The cell borders of one axis connect into coherent line segment;
First set processing module 2, for using the AutoCAD forms as object, foundation to correspond to the AutoCAD tables The choice set S of lattice;
Screening module 3, the horizontal line and ordinate of screening threshold value are more than for filtering out length from the choice set S, wherein, The horizontal line and the ordinate correspond to different screening threshold values;
Second set processing module 4, for establishing choice set H according to all horizontal lines filtered out from the choice set S, All ordinates according to being filtered out from the choice set S establish choice set V;
Sorting module 5, is ranked up all horizontal lines in the choice set H for the ordinate according to the horizontal line, All ordinates in the choice set V are ranked up according to the abscissa of the ordinate;
Locating module 6, for all horizontal lines in the choice set H after sequence and the selection after sequence Collect all ordinates in V, determine the regional location shared by each cell of the AutoCAD forms;
Read module 7, the corresponding cell is read for the regional location according to shared by each cell Content, to obtain the content of all cells in the AutoCAD forms;
Output module 8, the content of all cells read is sequentially output in corresponding data file.
In a kind of optional embodiment, the screening threshold value of the screening module 3 is specially:The horizontal line is corresponding The screening threshold value is the half of the length of the longest horizontal line of length in the choice set S, the corresponding screening of the ordinate Threshold value is the half of the length of the longest ordinate of length in the choice set S.
In a kind of optional embodiment, in the output module 8 is specifically used in all cells that will read Appearance is sequentially output in corresponding Excel forms.
Referring to Fig. 3, it is a kind of positioning mould of automatic device for reading AutoCAD forms provided in an embodiment of the present invention The structure diagram of block 6, the locating module 6 include:
First intersection point positioning unit 601, for determining nth bar horizontal line and m in the choice set V in the choice set H The intersection point d that bar ordinate intersectsN, mCoordinate;
Second intersection point positioning unit 602, for determining in the choice set H (n+1)th article of straight line and in the choice set V the The intersection point d of m+1 bar straight line intersectionsN+1, m+1Coordinate;Wherein 1≤n≤N-1;1≤m≤M-1;N is the horizontal stroke in the choice set H The maximum of the quantity of line;M is the maximum of the quantity of the ordinate in the choice set V;
Cell positioning unit 603, for according to intersection point dN, mCoordinate and intersection point dN+1, m+1Coordinate determination unit lattice Dn,mShared regional location, to determine the regional location shared by each cell of the AutoCAD forms.
Referring to Fig. 4, a kind of its automatic terminal device 9 for reading AutoCAD forms that to be the embodiment of the present invention also provide, Including processor 901, memory 902 and it is stored in the memory 902 and is configured as being performed by the processor 901 Computer program, such as the automatic program for reading AutoCAD forms.When the processor 901 performs the computer program Realize the step in above-mentioned each automatic embodiment of the method for reading AutoCAD forms, for example, the step S1 shown in Fig. 1 in response to Form reads instruction, and the cell borders in the AutoCAD forms that user is opened positioned at same axis connect into coherent line Section.Alternatively, the processor 901 realizes that the above-mentioned automatic device for reading AutoCAD forms is real when performing the computer program Apply the function of each module/unit in example, such as the form processing modules 1 described in Fig. 2.
Exemplary, the computer program can be divided into one or more module/units, one or more A module/unit is stored in the memory 902, and is performed by the processor 901, to complete the present invention.Described one A or multiple module/units can be the series of computation machine programmed instruction section that can complete specific function, which is used for Implementation procedure of the computer program in the automatic terminal device 9 for reading AutoCAD forms is described.It is for example, described Computer program can be divided into form processing modules 1 as shown in Figure 2, first set processing module 2, screening module 3, Two process of aggregation modules 4, sorting module 5, locating module 6, read module 7 and output module 8, each module concrete function are as follows:
Form processing modules 1, instruct for being read in response to form, positioned at same in the AutoCAD forms that user is opened The cell borders of one axis connect into coherent line segment;
First set processing module 2, for using the AutoCAD forms as object, foundation to correspond to the AutoCAD tables The choice set S of lattice;
Screening module 3, the horizontal line and ordinate of screening threshold value are more than for filtering out length from the choice set S, wherein, The horizontal line and the ordinate correspond to different screening threshold values;
Second set processing module 4, for establishing choice set H according to all horizontal lines filtered out from the choice set S, All ordinates according to being filtered out from the choice set S establish choice set V;
Sorting module 5, is ranked up all horizontal lines in the choice set H for the ordinate according to the horizontal line, All ordinates in the choice set V are ranked up according to the abscissa of the ordinate;
Locating module 6, for all horizontal lines in the choice set H after sequence and the selection after sequence Collect all ordinates in V, determine the regional location shared by each cell of the AutoCAD forms;
Read module 7, the corresponding cell is read for the regional location according to shared by each cell Content, to obtain the content of all cells in the AutoCAD forms;
Output module 8, the content of all cells read is sequentially output in corresponding data file.
The automatic terminal device 9 for reading AutoCAD forms can be desktop PC, notebook, palm PC And the computing device such as cloud server.The automatic terminal device 9 for reading AutoCAD forms may include, but be not limited only to, and locate Manage device 901, memory 902.It will be understood by those skilled in the art that the schematic diagram is only automatic reading AutoCAD forms Terminal device 9 example, do not form the restriction to the automatic terminal device 9 for reading AutoCAD forms, can include than figure Show more or fewer components, either combine some components or different components, such as the automatic reading AutoCAD tables The terminal device 9 of lattice can also include input-output equipment, network access equipment, bus etc..
The processor 901 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor The control centre of the automatic terminal device 9 for reading AutoCAD forms Deng, the processor 901, using various interfaces and Connection entirely reads the various pieces of the terminal device 9 of AutoCAD forms automatically.
The memory 902 can be used for storing the computer program and/or module, and the processor 901 passes through operation Or the computer program and/or module being stored in the memory 902 are performed, and call and be stored in memory 902 Data, realize the various functions of the automatic terminal device 9 for reading AutoCAD forms.The memory 902 can mainly include Storing program area and storage data field, wherein, storing program area can storage program area, the application journey needed at least one function Sequence (such as sound-playing function, image player function etc.) etc.;Storage data field can be stored uses what is created according to mobile phone Data (such as voice data, phone directory etc.) etc..In addition, the memory 902 can include high-speed random access memory, also It can include nonvolatile memory, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) blocks, flash card (Flash Card), at least one disk memory, sudden strain of a muscle Memory device or other volatile solid-state parts.
Wherein, if the integrated module/unit of the automatic terminal device 9 for reading AutoCAD forms is with software function The form of unit is realized and is used as independent production marketing or in use, can be stored in a computer read/write memory medium In.Based on such understanding, the present invention realizes all or part of flow in above-described embodiment method, can also pass through computer Program instructs relevant hardware to complete, and the computer program can be stored in a computer-readable recording medium, should Computer program by the processor 901 when being performed, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the meter Calculation machine program includes computer program code, the computer program code can be source code form, object identification code form, can Perform file or some intermediate forms etc..The computer-readable medium can include:The computer program generation can be carried Any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disc, CD, computer storage, the read-only storage of code (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, electricity Believe signal and software distribution medium etc..It should be noted that the content that the computer-readable medium includes can be according to department Legislation and the requirement of patent practice carry out appropriate increase and decrease in method administrative area, such as in some jurisdictions, according to legislation and Patent practice, computer-readable medium do not include electric carrier signal and telecommunication signal.
Correspondingly, the embodiment of the present invention additionally provides a kind of computer-readable recording medium, the computer-readable storage Medium includes the computer program of storage, wherein, control the computer-readable storage medium when the computer program is run Equipment where matter performs the above-mentioned automatic method for reading AutoCAD forms.
Compared with the prior art, the embodiment of the present invention has the advantages that:An embodiment of the present invention provides one kind certainly The dynamic method for reading AutoCAD forms, the described method comprises the following steps:Read and instruct in response to form, user is opened Cell borders in AutoCAD forms positioned at same axis connect into coherent line segment;Using the AutoCAD forms as pair As establishing the choice set S corresponding to the AutoCAD forms;Length is filtered out from the choice set S and is more than screening threshold value Horizontal line and ordinate, wherein, the horizontal line and the ordinate correspond to different screening threshold values;Screened according to from the choice set S All horizontal lines gone out establish choice set H, and choice set V is established according to all ordinates filtered out from the choice set S;According to institute The ordinate for stating horizontal line is ranked up all horizontal lines in the choice set H, according to the abscissa of the ordinate to the choosing All ordinates selected in collection V are ranked up;Described in after all horizontal lines and sequence in the choice set H after sequence All ordinates in choice set V, determine the regional location shared by each cell of the AutoCAD forms;According to each Regional location shared by the cell reads the content of the corresponding cell, to obtain in the AutoCAD forms The content of all cells;The content of all cells read is sequentially output in corresponding data file.Can be real AutoCAD forms are now read automatically, and fast and easy, drastically increases work efficiency, and avoids and manually read easily error The drawbacks of.Correspondingly, the embodiment of the present invention additionally provide the executable above-mentioned automatic method for reading AutoCAD forms device, Terminal device and computer-readable recording medium.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
It should be noted that device embodiment described above is only schematical, wherein described be used as separating component The unit of explanation may or may not be physically separate, can be as the component that unit is shown or can also It is not physical location, you can with positioned at a place, or can also be distributed in multiple network unit.Can be according to reality Need to select some or all of module therein to realize the purpose of this embodiment scheme.In addition, device provided by the invention In embodiment attached drawing, the connection relation between module represents there is communication connection between them, specifically can be implemented as one or A plurality of communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, you can to understand And implement.
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as Protection scope of the present invention.

Claims (10)

  1. A kind of 1. automatic method for reading AutoCAD forms, it is characterised in that comprise the following steps:
    Read and instruct in response to form, the cell borders in the AutoCAD forms that user is opened positioned at same axis connect Into coherent line segment;
    Using the AutoCAD forms as object, the choice set S corresponding to the AutoCAD forms is established;
    Horizontal line and ordinate that length is more than screening threshold value are filtered out from the choice set S, wherein, the horizontal line and the ordinate Corresponding different screening threshold value;
    All horizontal lines according to being filtered out from the choice set S establish choice set H, are filtered out according to from the choice set S All ordinates establish choice set V;
    All horizontal lines in the choice set H are ranked up according to the ordinate of the horizontal line, according to the horizontal seat of the ordinate Mark is ranked up all ordinates in the choice set V;
    All ordinates in the choice set V after all horizontal lines and sequence in the choice set H after sequence, really Regional location shared by each cell of the fixed AutoCAD forms;
    Regional location according to shared by each cell reads the content of the corresponding cell, with described in acquisition The content of all cells in AutoCAD forms;
    The content of all cells read is sequentially output in corresponding data file.
  2. 2. the as claimed in claim 1 automatic method for reading AutoCAD forms, it is characterised in that it is described according to sequence after All ordinates in the choice set V after all horizontal lines and sequence in the choice set H, determine the AutoCAD tables Regional location shared by each cell of lattice, including:
    Determine nth bar horizontal line and the intersection point d that the m articles ordinate intersects in the choice set V in the choice set HN, mCoordinate;
    Determine the intersection point d of (n+1)th article of straight line and the m+1 articles straight line intersection in the choice set V in the choice set HN+1, m+1Seat Mark;Wherein 1≤n≤N-1;1≤m≤M-1;N is the maximum of the quantity of the horizontal line in the choice set H;M is the choice set The maximum of the quantity of ordinate in V;
    According to intersection point dN, mCoordinate and intersection point dN+1, m+1Coordinate determination unit lattice Dn,mShared regional location, to determine Regional location shared by each cell of the AutoCAD forms.
  3. 3. the as claimed in claim 1 automatic method for reading AutoCAD forms, it is characterised in that the corresponding institute of the horizontal line State the half that screening threshold value is the length of the longest horizontal line of length in the choice set S, the corresponding screening threshold of the ordinate It is worth for the half of the length of the longest ordinate of length in the choice set S.
  4. 4. the automatic method for reading AutoCAD forms as claimed in claim 1, it is characterised in that the institute that will be read There is the content in cell to be sequentially output in corresponding data file specially:By the content in all cells read It is sequentially output in corresponding Excel forms.
  5. 5. a kind of automatic device for reading AutoCAD forms, it is characterised in that described device includes:
    Form processing modules, instruct for being read in response to form, are located at same axis in the AutoCAD forms that user is opened Cell borders connect into coherent line segment;
    First set processing module, for using the AutoCAD forms as object, establishing corresponding to the AutoCAD forms Choice set S;
    Screening module, the horizontal line and ordinate of screening threshold value are more than for filtering out length from the choice set S, wherein, it is described Horizontal line and the ordinate correspond to different screening threshold values;
    Second set processing module, for establishing choice set H according to all horizontal lines filtered out from the choice set S, according to All ordinates filtered out from the choice set S establish choice set V;
    Sorting module, is ranked up all horizontal lines in the choice set H for the ordinate according to the horizontal line, according to institute The abscissa for stating ordinate is ranked up all ordinates in the choice set V;
    Locating module, in all horizontal lines in the choice set H after sequence and the choice set V after sequence All ordinates, determine the regional location shared by each cell of the AutoCAD forms;
    Read module, reads in the corresponding cell for the regional location according to shared by each cell Hold, to obtain the content of all cells in the AutoCAD forms;
    Output module, the content of all cells read is sequentially output in corresponding data file.
  6. 6. the automatic device for reading AutoCAD forms as claimed in claim 5, it is characterised in that the locating module includes:
    First intersection point positioning unit, for determining nth bar horizontal line and the m articles ordinate phase in the choice set V in the choice set H The intersection point d of friendshipN, mCoordinate;
    Second intersection point positioning unit, for determining in the choice set H that (n+1)th article of straight line and the m+1 articles in the choice set V are straight The intersection point d that line intersectsN+1, m+1Coordinate;Wherein 1≤n≤N-1;1≤m≤M-1;N is the quantity of the horizontal line in the choice set H Maximum;M is the maximum of the quantity of the ordinate in the choice set V;
    Cell positioning unit, for according to intersection point dN, mCoordinate and intersection point dN+1, m+1Coordinate determination unit lattice Dn,mIt is shared Regional location, to determine the regional location shared by each cell of the AutoCAD forms.
  7. 7. the automatic device for reading AutoCAD forms as claimed in claim 5, it is characterised in that the institute of the screening module Stating screening threshold value is specially:The corresponding screening threshold value of the horizontal line is the length of the longest horizontal line of length in the choice set S The half of degree, the corresponding screening threshold value of the ordinate are the half of the length of the longest ordinate of length in the choice set S.
  8. 8. the automatic device for reading AutoCAD forms as claimed in claim 5, it is characterised in that the output module is specific For the content in all cells read to be sequentially output in corresponding Excel forms.
  9. 9. a kind of terminal device, it is characterised in that including processor, memory and be stored in the memory and be configured For the computer program performed by the processor, the processor realizes such as claim 1 when performing the computer program To the automatic method for reading AutoCAD forms any one of 4.
  10. 10. a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium includes the calculating of storage Machine program, wherein, equipment where controlling the computer-readable recording medium when the computer program is run is performed as weighed Profit requires the automatic method for reading AutoCAD forms any one of 1 to 4.
CN201711087929.2A 2017-11-07 2017-11-07 Automatic method, apparatus, terminal device and the storage medium for reading AutoCAD forms Pending CN107943857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711087929.2A CN107943857A (en) 2017-11-07 2017-11-07 Automatic method, apparatus, terminal device and the storage medium for reading AutoCAD forms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711087929.2A CN107943857A (en) 2017-11-07 2017-11-07 Automatic method, apparatus, terminal device and the storage medium for reading AutoCAD forms

Publications (1)

Publication Number Publication Date
CN107943857A true CN107943857A (en) 2018-04-20

Family

ID=61933434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711087929.2A Pending CN107943857A (en) 2017-11-07 2017-11-07 Automatic method, apparatus, terminal device and the storage medium for reading AutoCAD forms

Country Status (1)

Country Link
CN (1) CN107943857A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763768A (en) * 2018-05-30 2018-11-06 中船黄埔文冲船舶有限公司 A kind of method and system of automatic reading AutoCAD fitting-out layout drawings
CN110008809A (en) * 2019-01-04 2019-07-12 阿里巴巴集团控股有限公司 Acquisition methods, device and the server of list data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249307A1 (en) * 2008-03-26 2009-10-01 Kabushiki Kaisha Toshiba Program analysis apparatus, program analysis method, and program storage medium
CN103258198A (en) * 2013-04-26 2013-08-21 四川大学 Extraction method for characters in form document image
CN103377177A (en) * 2012-04-27 2013-10-30 北大方正集团有限公司 Method and device for identifying forms in digital format files
CN104484643A (en) * 2014-10-27 2015-04-01 中国科学技术大学 Intelligent identification method and system for hand-written table
CN106156761A (en) * 2016-08-10 2016-11-23 北京交通大学 The image form detection of facing moving terminal shooting and recognition methods

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249307A1 (en) * 2008-03-26 2009-10-01 Kabushiki Kaisha Toshiba Program analysis apparatus, program analysis method, and program storage medium
CN103377177A (en) * 2012-04-27 2013-10-30 北大方正集团有限公司 Method and device for identifying forms in digital format files
CN103258198A (en) * 2013-04-26 2013-08-21 四川大学 Extraction method for characters in form document image
CN104484643A (en) * 2014-10-27 2015-04-01 中国科学技术大学 Intelligent identification method and system for hand-written table
CN106156761A (en) * 2016-08-10 2016-11-23 北京交通大学 The image form detection of facing moving terminal shooting and recognition methods

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763768A (en) * 2018-05-30 2018-11-06 中船黄埔文冲船舶有限公司 A kind of method and system of automatic reading AutoCAD fitting-out layout drawings
CN110008809A (en) * 2019-01-04 2019-07-12 阿里巴巴集团控股有限公司 Acquisition methods, device and the server of list data

Similar Documents

Publication Publication Date Title
CN110196404B (en) Charging pile metering chip calibration method and device and terminal equipment
DE102019112772A1 (en) TECHNOLOGIES FOR A SERVICE QUALITY-CONSCIOUS END-TO-END I / O PLANNING
CN108259637A (en) A kind of NAT device recognition methods and device based on decision tree
CN102262664A (en) Quality estimating method and quality estimating device
CN107943857A (en) Automatic method, apparatus, terminal device and the storage medium for reading AutoCAD forms
CN105338540A (en) Base station data modeling method and terminal
CN112200471A (en) Charging pile quantity configuration method and device and charging pile distribution system
CN112633842A (en) Task pushing method, device and system
CN103885977A (en) Webpage data classification method, device and system
CN108614933A (en) Moulding bed reversible deformation data capture method, device and computer readable storage medium
CN108833592A (en) Cloud host schedules device optimization method, device, equipment and storage medium
CN108694413A (en) Adaptively sampled unbalanced data classification processing method, device, equipment and medium
CN107943756A (en) A kind of computational methods and Related product
CN107944731A (en) The method for building up and device of typical project cost template
CN110378336A (en) Semantic class mask method, device and the storage medium of target object in training sample
CN108268937A (en) A kind of neural network and its computational methods, equipment and computer-readable medium
CN108830663B (en) Electric power customer value evaluation method and system and terminal equipment
CN107800816A (en) A kind of IP address database method for building up and terminal device
CN103984614B (en) A kind of monitoring method and supervising device, electronic equipment
CN108171417B (en) Planting task adjusting method, electronic device and storage medium
CN109344875A (en) Based on clustering day wind power output timing generation method, device and medium
CN110213123A (en) A kind of flux monitoring method, device and equipment
CN103455910B (en) The work linguistic context of service application
CN103984779A (en) Data updating method and device
CN108052754A (en) The analysis method and terminal device of tunnel-liner mechanical response

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180420