CN112069956A - Method for identifying and outputting pipeline number from AutoCAD format process flow chart - Google Patents

Method for identifying and outputting pipeline number from AutoCAD format process flow chart Download PDF

Info

Publication number
CN112069956A
CN112069956A CN202010873925.2A CN202010873925A CN112069956A CN 112069956 A CN112069956 A CN 112069956A CN 202010873925 A CN202010873925 A CN 202010873925A CN 112069956 A CN112069956 A CN 112069956A
Authority
CN
China
Prior art keywords
rectangular frame
process flow
pipeline
autocad
line character
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
CN202010873925.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.)
Sinopec Engineering Group Co Ltd
Sinopec Shanghai Engineering Co Ltd
Original Assignee
Sinopec Engineering Group Co Ltd
Sinopec Shanghai Engineering 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 Sinopec Engineering Group Co Ltd, Sinopec Shanghai Engineering Co Ltd filed Critical Sinopec Engineering Group Co Ltd
Priority to CN202010873925.2A priority Critical patent/CN112069956A/en
Publication of CN112069956A publication Critical patent/CN112069956A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Computational Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method for identifying and outputting a pipeline number from an AutoCAD format process flow chart, in particular to a process pipeline table compiling part in medical engineering design, which realizes the secondary development of the AutoCAD and a DLL program through VB.Net, and comprises the following implementation steps: opening an AutoCAD, loading a DLL program, reading in process flow chart file data, creating a layer, drawing a picture frame rectangular frame, selecting a rectangular frame layer, framing all drawings to be processed, obtaining a block list record, filtering the layer, obtaining a rectangular frame object set and angular point coordinates, traversing all rectangular frames, obtaining a single-line character object set in the angular point coordinates of the rectangular frames, traversing all single-line character objects, judging whether the single-line character text is a pipeline number, storing the single-line character text into a data list, outputting the single-line character text to an Excel file, and storing the Excel file. The method is rapid and efficient, convenient to use, high in accuracy and good in reliability, improves the automation degree and accuracy of the professional process work, and ensures the timeliness of the completion of the professional process pipeline meter compilation work.

Description

Method for identifying and outputting pipeline number from AutoCAD format process flow chart
Technical Field
The invention relates to Excel and AutoCAD secondary development technology, in particular to a method for identifying and outputting a pipeline number in an AutoCAD format process flow chart of VB.Net secondary development.
Background
The process design in the current medical engineering design project has the characteristics of large number of pipelines, multiple types, repeatability and the like, and particularly relates to a raw material medicine project. The pipeline number is the basis for compiling 'pipeline characteristic summary table' in the technical profession, proposing instrument conditions, compiling a pipeline table of pressure pipelines and the like. In practical projects, the time for compiling the data is relatively strict, and the situations of time tightness and heavy tasks are often faced.
In the prior art CN201911167688.1, a batch process flow card generation method based on AutoCAD and Excel is provided, which establishes a standard process flow card detail list file. In the file, processes of various conditions are established in a form established for each typical part, a unique typical process number is established for each condition, the required process is quickly inquired by virtue of a VBA program, and the information of the former is directly called to the latter or is quickly modified after being called by another blank template file. However, when the pipeline number needs to be extracted from the process flow diagram in the process profession, the pipeline number is usually manually compiled, and the pipeline number in the process flow diagram (AutoCAD format file) is copied into an Excel file one by one, so that the workload is large, the labor is high, and the correctness is questionable. Especially in the raw material medicine project, if the pipeline number cannot be programmed in time, the submission of subsequent professional conditions can be influenced, and the project progress is influenced. Therefore, a new method is needed to output the pipeline number in the process flow diagram (AutoCAD format file) to the Excel file quickly and accurately, so as to improve the automation degree and accuracy of the professional work of the process and ensure the timeliness of completing the professional data of the process. In the programming technology in the field, VBA, vb.net and the like are mainly used, wherein VBA only supports the Windows environment, the use condition is limited, and vb.net can be applied to software in the Windows, Web, Linux and other environments, and the application range is wide.
Disclosure of Invention
The invention provides a method for identifying and outputting a pipeline number from an AutoCAD format process flow chart, which aims to solve the problems that in the prior art, in the process design of a traditional Chinese medicine engineering design project, the number of process pipelines is huge, the types are complex, the task is heavy when a process pipeline table is compiled, and the accuracy cannot be guaranteed.
In order to solve the problems, the invention adopts the following technical scheme:
the invention provides a method for identifying and outputting a pipeline number from an AutoCAD format process flow diagram, which comprises the following steps:
s100: opening an AutoCAD program, loading a DLL program, and reading in the AutoCAD format process flow chart file data of the serial number of the pipeline to be output;
s101: building a layer, and sequentially drawing a rectangular frame which is overlapped with the outmost drawing frame of each drawing in the AutoCAD format process flow chart input in the step S100 on the layer;
s102: selecting any one rectangular frame drawn in the step S101 to obtain the name of the layer;
s103: framing all drawings to be processed, and obtaining object sets of all rectangular frames through block table records of all drawings in the AutoCAD format process flow diagram input in the step S100 through the layer name screening and filtering determined in the step S102; traversing objects in the rectangular frame object set, and acquiring a data set consisting of four corner point coordinates of each rectangular frame;
s104: inputting and determining the address and the file name of the finally output Excel file;
s105: selecting four corner coordinates of a single rectangular frame aiming at the four corner coordinate data sets of all rectangular frames obtained in the step S103, and obtaining object sets of all objects in the four corner coordinates of the rectangular frame;
s106: screening and filtering the object sets of all the objects in the four corner coordinates of the single rectangular frame obtained in the step S105, wherein the types of the object sets are 'single-line characters', and acquiring all the object sets of 'single-line characters' in the four corner coordinates of the rectangular frame;
s107: judging the text content of a single-line character object in the set of all the single-line character objects in the coordinates of the four corner points of the single rectangular frame obtained in the step S106, if the text content of the single-line character is a pipeline number, storing the text content of the single-line character object as a text data type into a data list, and judging all the single-line characters in the data of the four corner points of the rectangular frame;
s108: judging whether the traversal of all the single-line character object sets in the single rectangular frame obtained in the step S106 is finished, if so, performing the step S109, and if not, jumping to the step S107;
s109: judging whether the traversal of all the rectangular frame object sets acquired in the step S103 is completed, if so, performing the step S110, and if not, jumping to the step S105;
s110: outputting the pipeline number data list acquired in the step S107 to an Excel file;
s111: and saving the Excel file output in the step S110 by the name and address of the Excel file determined in the step S104, and finally obtaining the Excel file containing all pipeline numbers in the process flow diagram.
Further, the DLL program in step S100 is written in vb.
Further, in step S107, it is determined whether the text content is a pipeline number, the number of the characters "-" in the text content of a single "single-line character" object is determined, and if the number of the characters "-" is greater than or equal to 3, the text content of the "single-line character" object is determined to be the pipeline number.
By adopting the technical scheme, compared with the prior art, the invention has the following technical effects:
1. the invention provides a quick application for identifying and outputting a pipeline number from a process flow diagram, and the pipeline number can be identified and output to an Excel file by opening the process flow diagram in an AutoCAD format;
2. the method can draw the drawing in the process flow diagram in the AutoCAD format through the rectangular frame, extract the data set formed by the coordinate data of the four corner points of the rectangular frame, then obtain all the objects in the coordinates of the four corner points of each rectangular frame, and judge the single-line character object in the objects, thereby accurately and completely screening and outputting the pipeline number of all the drawings in one process flow diagram;
3. the pipeline number in the process flow chart is directly output to the Excel, so that the workload of process designers is reduced, and the overall speed of the work of compiling the design data related to the pipeline table is increased. The manual error is reduced, and the compiling error caused by the manual compiling error can be avoided by means of the working accuracy and the fatigue resistance of the computer. The invention improves the accuracy of the related design data of the pipeline table in the medical engineering project, and greatly improves the accuracy of the process design data.
Drawings
Fig. 1 is a flow chart of an implementation of the method for identifying and outputting a pipeline number from an AutoCAD format process flow chart provided by the invention.
Detailed Description
Referring to fig. 1, the present invention provides a method for identifying and outputting a pipe number from an AutoCAD formatted process flow diagram. The method comprises the following steps:
s100: opening an AutoCAD program, loading a DLL program, and reading in the AutoCAD format process flow chart file data of the serial number of the pipeline to be output;
s101: building a layer, and sequentially drawing a rectangular frame which is overlapped with the outmost drawing frame of each drawing in the AutoCAD format process flow chart input in the step S100 on the layer;
s102: selecting any one rectangular frame drawn in the step S101 to obtain the name of the layer;
s103: framing all drawings to be processed, and obtaining object sets of all rectangular frames through block table records of all drawings in the AutoCAD format process flow diagram input in the step S100 through the layer name screening and filtering determined in the step S102; traversing objects in the rectangular frame object set, and acquiring a data set consisting of four corner point coordinates of each rectangular frame;
s104: inputting and determining the address and the file name of the finally output Excel file;
s105: selecting four corner coordinates of a single rectangular frame aiming at the four corner coordinate data sets of all rectangular frames obtained in the step S103, and obtaining object sets of all objects in the four corner coordinates of the rectangular frame;
s106: screening and filtering the object sets of all the objects in the four corner coordinates of the single rectangular frame obtained in the step S105, wherein the types of the object sets are 'single-line characters', and acquiring all the object sets of 'single-line characters' in the four corner coordinates of the rectangular frame;
s107: judging the text content of a single-line character object in the set of all the single-line character objects in the coordinates of the four corner points of the single rectangular frame obtained in the step S106, if the text content of the single-line character is a pipeline number, storing the text content of the single-line character object as a text data type into a data list, and judging all the single-line characters in the data of the four corner points of the rectangular frame;
s108: judging whether the traversal of all the single-line character object sets in the single rectangular frame obtained in the step S106 is finished, if so, performing the step S109, and if not, jumping to the step S107;
s109: judging whether the traversal of all the rectangular frame object sets acquired in the step S103 is completed, if so, performing the step S110, and if not, jumping to the step S105;
s110: outputting the pipeline number data list acquired in the step S107 to an Excel file;
s111: and saving the Excel file output in the step S110 by the name and address of the Excel file determined in the step S104, and finally obtaining the Excel file containing all pipeline numbers in the process flow diagram.
In a preferred embodiment of the present invention, the DLL program in step S100 is written in vb.
In a preferred embodiment of the present invention, in step S107, it is determined whether the text content is a pipeline number, the number of the characters "-" in the text content of a single "single-line character" object is determined, and if the number of the characters "-" is greater than or equal to 3, the text content of the "single-line character" object is determined to be the pipeline number.
The following examples further illustrate embodiments of the present invention to provide a better understanding of the present invention, but are not intended to limit the scope of the present invention.
Example 1
In a certain medical engineering design project, 95 process flow charts are shared in process major, and the process major relates to 1800 pipelines, and the following data are obtained by adopting the pipeline number identification and output method of the invention:
the designer: 1 person.
The method comprises the steps of opening an AutoCAD program, loading a DLL program, reading in process flow chart data, completing drawing and selecting of a picture frame and a picture layer, automatically completing identification of a pipeline number in a selected drawing by a computer, outputting the pipeline number to an Excel file, consuming about 20 minutes, avoiding manual errors or omissions, and improving the working efficiency and accuracy of designers.
Example 2
According to the conditions in the embodiment 1, in a certain medical engineering design project, 15 process flow charts are shared by process professionals, and 200 pipelines are involved, and the following data are obtained by adopting the pipeline number identification and output method of the invention:
the designer: 1 person.
The method comprises the steps of opening an AutoCAD program, loading a DLL program, reading in process flow chart data, completing drawing and selecting of a picture frame and a picture layer, automatically completing identification of a pipeline number in a selected drawing by a computer, outputting the pipeline number to an Excel file, consuming about 5 minutes, avoiding manual errors or omissions, and improving the working efficiency and accuracy of designers.
Comparative example 1
In a certain pharmaceutical engineering design project, 95 process flow charts are shared in process major, and relate to 1800 pipelines, and pipeline numbers are copied and pasted to an Excel file one by adopting a manual input method to obtain the following data:
the designer: 1 person.
The operation time is as follows: and (4) continuous.
And opening the AutoCAD program, manually copying and pasting the pipeline numbers in the process flow chart to an Excel file one by one, and completing the input of all the pipeline numbers, wherein six working days are consumed in total, and omission or errors are possible.
Comparative example 2
In a certain medical engineering design project, 15 process flow charts are shared in the process major, 200 pipelines are involved, and the pipeline numbers are copied and pasted to an Excel file one by adopting a manual input method, so that the following data are obtained:
the designer: 1 person.
The operation time is as follows: and (4) continuous.
And opening the AutoCAD program, manually copying and pasting the pipeline numbers in the process flow chart to an Excel file one by one, and completing the input of all the pipeline numbers, wherein the total time is one working day, and omission or errors are possible.
The embodiments of the present invention have been described in detail, but the embodiments are merely examples, and the present invention is not limited to the embodiments described above. Any equivalent modifications and substitutions to those skilled in the art are also within the scope of the present invention. Accordingly, equivalent changes and modifications made without departing from the spirit and scope of the present invention should be covered by the present invention.

Claims (3)

1. A method for identifying and outputting a pipeline number from an AutoCAD format process flow diagram is characterized by comprising the following steps:
step S100: opening an AutoCAD program, loading a DLL program, and reading in the AutoCAD format process flow chart file data of the serial number of the pipeline to be output;
step S101: building a layer, and sequentially drawing a rectangular frame which is overlapped with the outmost drawing frame of each drawing in the AutoCAD format process flow chart input in the step S100 on the layer;
step S102: selecting any one rectangular frame drawn in the step S101 to obtain the name of the layer;
step S103: framing all drawings to be processed, and obtaining object sets of all rectangular frames through block table records of all drawings in the AutoCAD format process flow diagram input in the step S100 through the layer name screening and filtering determined in the step S102; traversing objects in the rectangular frame object set, and acquiring a data set consisting of four corner point coordinates of each rectangular frame;
step S104: inputting and determining the address and the file name of the finally output Excel file;
step S105: selecting four corner coordinates of a single rectangular frame aiming at the four corner coordinate data sets of all rectangular frames obtained in the step S103, and obtaining object sets of all objects in the four corner coordinates of the rectangular frame;
step S106: screening and filtering the object sets of all the objects in the four corner coordinates of the single rectangular frame obtained in the step S105, wherein the types of the object sets are 'single-line characters', and acquiring all the object sets of 'single-line characters' in the four corner coordinates of the rectangular frame;
step S107: judging the text content of a single-line character object in the set of all the single-line character objects in the coordinates of the four corner points of the single rectangular frame obtained in the step S106, if the text content of the single-line character is a pipeline number, storing the text content of the single-line character object as a text data type into a data list, and judging all the single-line characters in the data of the four corner points of the rectangular frame;
step S108: judging whether the traversal of all the single-line character object sets in the single rectangular frame obtained in the step S106 is finished, if so, performing the step S109, and if not, jumping to the step S107;
step S109: judging whether the traversal of all the rectangular frame object sets acquired in the step S103 is completed, if so, performing the step S110, and if not, jumping to the step S105;
step S110: outputting the pipeline number data list acquired in the step S107 to an Excel file;
step S111: and saving the Excel file output in the step S110 by the name and address of the Excel file determined in the step S104, and finally obtaining the Excel file containing all pipeline numbers in the process flow diagram.
2. The method of identifying and exporting pipe numbers from an AutoCAD formatted process flow graph according to claim 1 wherein said DLL program in step S100 is written in vb.
3. The method as claimed in claim 1, wherein in step S107, it is determined whether the text content is a pipeline number, by determining the number of the characters "-" in the text content of a single "single-line word" object, and if the number of the characters "-" is greater than or equal to 3, determining that the text content of the "single-line word" object is a pipeline number.
CN202010873925.2A 2020-08-26 2020-08-26 Method for identifying and outputting pipeline number from AutoCAD format process flow chart Pending CN112069956A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010873925.2A CN112069956A (en) 2020-08-26 2020-08-26 Method for identifying and outputting pipeline number from AutoCAD format process flow chart

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010873925.2A CN112069956A (en) 2020-08-26 2020-08-26 Method for identifying and outputting pipeline number from AutoCAD format process flow chart

Publications (1)

Publication Number Publication Date
CN112069956A true CN112069956A (en) 2020-12-11

Family

ID=73660139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010873925.2A Pending CN112069956A (en) 2020-08-26 2020-08-26 Method for identifying and outputting pipeline number from AutoCAD format process flow chart

Country Status (1)

Country Link
CN (1) CN112069956A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883446A (en) * 2021-03-23 2021-06-01 广东电网有限责任公司 Set diagram screening method, device, equipment and storage medium
CN113190888A (en) * 2021-04-20 2021-07-30 东风柳州汽车有限公司 Process documentation method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883446A (en) * 2021-03-23 2021-06-01 广东电网有限责任公司 Set diagram screening method, device, equipment and storage medium
CN112883446B (en) * 2021-03-23 2023-07-07 广东电网有限责任公司 Set-up diagram screening method, device, equipment and storage medium
CN113190888A (en) * 2021-04-20 2021-07-30 东风柳州汽车有限公司 Process documentation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US8055995B2 (en) System and method of defining a hierarchical datamodel and related computation and instruction rules using spreadsheet like user interface
US5659723A (en) Entity/relationship to object oriented logical model conversion method
CN112069956A (en) Method for identifying and outputting pipeline number from AutoCAD format process flow chart
CN104731588B (en) Page layout document generating method and page layout file creating apparatus
Chen et al. Naming objects in BIM: A convention and a semiautomatic approach
US20110022613A1 (en) Method and System for Qualifying CAD Objects
CN110717207B (en) Labeling method, system and storage medium for pipeline design
CN110502735B (en) Method and system for quickly manufacturing universal process file of electronic equipment
CN108920367B (en) Visual debugging method for data structure
CN110826185A (en) Method for establishing bearing part library based on CAD secondary development
CN115115787A (en) Method for converting two-dimensional drawing into 3D model based on DirectVR
Bocevska et al. An example of application design using solidworks application programming interface
CN116956838A (en) Project determining method and device for engineering quantity list
CN106528946A (en) Method for inserting AutoCAD graph blocks in batches
CN113254455A (en) Dynamic configuration method and device of database, computer equipment and storage medium
AU760395B2 (en) Program reproducing method and device, and medium on which program for program reproduction recording
CN111966431A (en) Calculation formula self-defining method applied to laboratory management system
CN107844639B (en) Project standard structure automatic generation method and system
CN116431142B (en) High-efficiency programming method capable of being quickly constructed and not prone to error
CN111797576B (en) Batch construction and submission method for aerospace multivariable CFD operation
CN117373025A (en) Method for identifying and outputting instrument number from process flow chart
Paprotny et al. Reducing model creation cycle time by automated conversion of a CAD AMHS layout design
CN115828866A (en) Excel data importing and exporting method and device
CN115587419A (en) Ship elbow model quality inspection method based on digital rules
Singh et al. EXTRACTING CODE COMPLIANCE DATA FROM IFC WITH PYTHON LANGUAGE

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