Disclosure of Invention
In view of the above, the embodiments of the present invention provide a method, a system, a device, and a medium for generating an electrical drawing with high reliability and high efficiency.
The first aspect of the invention provides a method for generating an electrical drawing, which comprises the following steps:
determining an equipment object and manufacturing Eplan drawing templates of the equipment object;
manufacturing equipment tree specifications and Eplan drawing conversion rules according to Eplan drawing templates of equipment objects;
Converting project planning content into a device tree;
And generating an electrical drawing by the equipment in the equipment tree according to the Eplan drawing conversion rule.
In some embodiments, the determining the device object, making Eplan drawing templates of the device object, includes:
Acquiring different types of equipment objects;
Determining Eplan drawing templates of the different types of equipment objects;
And manufacturing Eplan drawings of the equipment object according to the Eplan drawing templates.
In some embodiments, the creating the device tree specification and Eplan drawing conversion rule according to the Eplan drawing templates of the device object includes:
Configuring a structural model of the equipment tree according to the project structure;
configuring the attribute of the equipment tree according to the structure model;
And according to the attribute of the equipment tree, correlating the electrical drawing elements corresponding to the equipment object, and determining a conversion rule between the equipment and the Eplan drawing template.
In some embodiments, the converting project plan content into a device tree includes:
Acquiring project content, and determining the equipment type, equipment name and equipment number in the project content;
Determining an attribute specification file of the equipment, wherein the attribute specification file is used for determining the affiliation, naming mode and attribute composition of the equipment;
converting the project content into a project tree according to the attribute specification file;
And determining a device tree according to the item tree.
In some embodiments, the generating the electrical drawing by the devices in the device tree according to the Eplan drawing conversion rule includes:
Acquiring data of a device tree;
Matching the data of the equipment tree with the equipment tree setting specification;
obtaining Eplan drawing templates according to the matching result;
and generating drawing pages according to the Eplan drawing templates and the data of the equipment tree.
In some embodiments, the generating a drawing page according to the Eplan drawing templates and the data of the device tree includes:
and carrying out parameter adjustment on the generated drawing page to obtain an optimized drawing page.
A second aspect of the present invention provides a system for generating an electrical drawing, including:
The drawing template making module is used for determining an equipment object and making Eplan drawing templates of the equipment object;
the rule configuration module is used for manufacturing equipment tree specifications and Eplan drawing conversion rules according to Eplan drawing templates of the equipment objects;
the equipment tree conversion module is used for converting project planning contents into equipment trees;
And the drawing generation module is used for generating an electrical drawing for the equipment in the equipment tree according to the Eplan drawing conversion rule.
A third aspect of the invention provides an apparatus comprising a processor and a memory;
the memory is used for storing programs;
The processor is configured to perform the method according to the first aspect of the invention according to the program.
A fourth aspect of the present invention provides a storage medium storing a program for execution by a processor to perform the method of the first aspect of the present invention.
According to the invention, through determining the equipment object, a Eplan drawing template of the equipment object is manufactured; then, according to Eplan drawing templates of the equipment objects, manufacturing equipment tree specifications and Eplan drawing conversion rules; then converting project planning content into a device tree; and finally, generating an electrical drawing for the equipment in the equipment tree according to the Eplan drawing conversion rule. The invention can automatically generate the electrical drawing, improves the reliability of the drawing content, reduces the workload of engineers and improves the drawing efficiency.
Detailed Description
The invention is further explained and illustrated below with reference to the drawing and the specific embodiments of the present specification. The step numbers in the embodiments of the present invention are set for convenience of illustration, and the order of steps is not limited in any way, and the execution order of the steps in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
Aiming at the problems existing in the prior art, the invention provides a method for generating an electrical drawing, which is shown in fig. 1, and comprises the following steps:
S1, determining an equipment object, and manufacturing Eplan drawing templates of the equipment object;
step S1 of the present embodiment includes S11-S13:
S11, acquiring equipment objects of different types;
s12, determining Eplan drawing templates of the equipment objects of different types;
s13, manufacturing a Eplan drawing of the equipment object according to the Eplan drawing template.
Specifically, the Eplan drawing template of the embodiment is a graphic module manufactured based on a common application object; before the project begins, engineers make corresponding templates for different types of device objects.
S2, manufacturing equipment tree specifications and Eplan drawing conversion rules according to Eplan drawing templates of equipment objects;
step S2 of the present embodiment includes S21 to S23:
s21, configuring a structural model of the equipment tree according to the project structure;
s22, configuring the attribute of the equipment tree according to the structure model;
s23, according to the attribute of the equipment tree, correlating the electrical drawing elements corresponding to the equipment object, and determining a conversion rule between the equipment and Eplan drawing templates.
Specifically, since each project is composed of different types, names and numbers of devices, the project is guided to be converted into a project tree by virtue of the affiliation, naming mode and attribute of the file specification devices.
The device tree of this embodiment resides in Eplan software.
S3, converting project planning contents into equipment trees;
step S3 of the present embodiment includes S31 to S34:
s31, acquiring project content, and determining the equipment type, equipment names and equipment quantity in the project content;
S32, determining an attribute specification file of the equipment, wherein the attribute specification file is used for determining the affiliation, naming mode and attribute composition of the equipment;
s33, converting the project content into a project tree according to the attribute specification file;
s34, determining a device tree according to the item tree.
Specifically, the rule file generated in this embodiment may correspond the device tree to the drawing template, and fill the device attribute into the corresponding position of the drawing, so as to generate a correct drawing.
S4, generating an electrical drawing for the equipment in the equipment tree according to the Eplan drawing conversion rule.
Step S4 of the present embodiment includes:
S41, acquiring data of a device tree;
s42, matching the data of the equipment tree with the equipment tree setting specification;
the equipment tree setting specification of the embodiment is stored in an XML file format, the content can be adjusted according to the drawing structure, and the equipment tree setting specification can be conveniently read by software.
S43, acquiring Eplan drawing templates according to the matching result;
S44, generating drawing pages according to the Eplan drawing templates and the data of the equipment tree.
Specifically, in this embodiment, the device in the device tree is combined with the drawing template through the parsing tool according to the generation rule to generate the electrical drawing, and the parsing tool may exist in the form of Eplan software plug-ins.
In some embodiments, step S44 is specifically:
and carrying out parameter adjustment on the generated drawing page to obtain an optimized drawing page.
By the technical scheme, engineers can browse equipment conveniently, and the quantity and parameters of the equipment can be adjusted; the electric drawing conforming to the design specification can be designed by an engineer; the method is beneficial to improving the design efficiency of the drawing, rapidly coping with process modification and reducing the design change cost.
In conclusion, the method and the device realize flexible configuration of drawing generation rules through the equipment model and the analysis tool. The difficulty in automatic drawing generation is that the structure of the drawing is changeable, and usually the generating software is generated based on the drawing with a specific structure, and when the structure of the drawing is changed, the program code is required to be modified to adapt to the change. The scheme can define the equipment model, and realizes the conversion of the equipment tree and the drawing structure through the conversion tool, so that the change of the drawing structure can be completed by modifying the parameters of the equipment model, and the flexibility and the usability of automatic generation are improved while the drawing is automatically generated to improve the drawing manufacturing efficiency.
The embodiment of the invention also provides a system for generating the electrical drawing, which comprises the following steps:
The drawing template making module is used for determining an equipment object and making Eplan drawing templates of the equipment object;
the rule configuration module is used for manufacturing equipment tree specifications and Eplan drawing conversion rules according to Eplan drawing templates of the equipment objects;
the equipment tree conversion module is used for converting project planning contents into equipment trees;
And the drawing generation module is used for generating an electrical drawing for the equipment in the equipment tree according to the Eplan drawing conversion rule.
The embodiment of the invention also provides a device, which comprises a processor and a memory;
the memory is used for storing programs;
The processor is configured to execute the method according to the program.
The embodiment of the invention also provides a storage medium, wherein the storage medium stores a program, and the program is executed by a processor to complete the method.
In some alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may in fact be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flowcharts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed, and in which sub-operations described as part of a larger operation are performed independently.
Furthermore, while the invention is described in the context of functional modules, it should be appreciated that, unless otherwise indicated, one or more of the described functions and/or features may be integrated in a single physical device and/or software module or one or more functions and/or features may be implemented in separate physical devices or software modules. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary to an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be apparent to those skilled in the art from consideration of their attributes, functions and internal relationships. Accordingly, one of ordinary skill in the art can implement the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative and are not intended to be limiting upon the scope of the invention, which is to be defined in the appended claims and their full scope of equivalents.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the invention, the scope of which is defined by the claims and their equivalents.
While the preferred embodiment of the present application has been described in detail, the present application is not limited to the embodiments described above, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit of the present application, and these equivalent modifications and substitutions are intended to be included in the scope of the present application as defined in the appended claims.