Method and device for constructing project drawing based on unit equipment and storage medium

文档序号:136207 发布日期:2021-10-22 浏览:11次 中文

阅读说明:本技术 基于单元设备构造项目图纸的方法、装置及存储介质 (Method and device for constructing project drawing based on unit equipment and storage medium ) 是由 吴向阳 刘扬 陈昱辰 易向华 邹元广 于 2021-06-09 设计创作,主要内容包括:本发明涉及电气绘图的技术领域,具体涉及一种基于单元设备构造项目图纸的方法、装置及存储介质。创建新项目;确定项目的基本信息和图纸信息;选择项目类型,指定项目模板;确定项目部件品牌;确定项目功能组;添加区域;添加区域的电柜;添加区域的PLC站;添加区域的单元设备;根据添加的单元设备的参数,从单元设备配置文件中解析出对应的图形宏名称和图形宏地址;将对应的图形宏插入至项目,生成单元设备图纸;逐项添加其余单元设备,得到完整项目图纸。通过属性取值来为单元设备的可选配置添加电气原理图,根据单元设备的XML文件解析出单元设备的页宏和窗口宏地址,实现标准化的页宏和窗口宏在指定页面中的自动插入,减少了手工绘图的工作量。(The invention relates to the technical field of electrical drawing, in particular to a method and a device for constructing a project drawing based on unit equipment and a storage medium. Creating a new project; determining basic information and drawing information of a project; selecting a project type, and designating a project template; determining a project component brand; determining a project function group; an addition area; an electrical cabinet of the addition zone; adding a PLC station of the area; a unit device of an addition area; analyzing a corresponding graphic macro name and a graphic macro address from the unit equipment configuration file according to the added parameters of the unit equipment; inserting the corresponding graphic macro into the project to generate a unit device drawing; and adding other unit equipment item by item to obtain a complete project drawing. The electrical schematic diagram is added for the optional configuration of the unit equipment through attribute dereferencing, the page macro and the window macro address of the unit equipment are analyzed according to the XML file of the unit equipment, the automatic insertion of the standardized page macro and the standardized window macro in the designated page is realized, and the workload of manual drawing is reduced.)

1. A method for constructing project drawings based on unit equipment is characterized in that: comprises that

Creating a new project;

determining basic information and drawing information of the project;

selecting a project type, and designating a project template;

determining a project component brand;

determining a project function group;

an addition area;

an electrical cabinet of the addition zone;

adding a PLC station of the area;

a unit device of an addition area;

analyzing a graphic macro name and a graphic macro address corresponding to the unit equipment from the unit equipment configuration file according to the added parameters of the unit equipment;

inserting the corresponding graphic macro into a project according to the graphic macro name and the graphic macro address, and generating a unit device drawing;

and adding other unit equipment item by item to obtain a complete project drawing composed of a plurality of unit equipment drawings.

2. The method for constructing a project drawing based on unit devices according to claim 1, wherein before creating a new project, the method further comprises:

designing a standard page macro and a window macro of a unit device in a macro project;

defining different parts corresponding to different parameters in the page macro and the window macro through a value set of a placeholder;

and generating the page macro and/or the window macro corresponding to each part under the specified path folder.

3. The method of constructing a project drawing based on unit devices of claim 1, wherein: one such item comprises a number of unit devices that can implement one or more functions, the unit devices comprising a number of components that are linked to different page macros or window macros by configurable attribute parameters.

4. The method for constructing a project drawing based on unit devices as claimed in claim 1, wherein the graphic macro is inserted into the project by adding page by page, which comprises:

adding page macro circuits page by page;

and calling a corresponding page macro circuit according to the analyzed page macro address, and inserting the page macro circuit into the current page of the drawing.

5. The method of constructing a project drawing based on unit devices of claim 4, wherein: and when the page macro contains the window macro, calling a corresponding window macro circuit according to the analyzed window macro address, and inserting the window macro circuit into the page macro circuit.

6. The method of constructing a project drawing based on unit devices of claim 4, wherein: and when the current page to be added contains the placeholder, outputting a configurable unit device attribute on the UI interface, wherein the configurable unit device attribute is used for a user to select the attribute and carrying out attribute value distribution on the attribute.

7. The method for constructing a project drawing based on unit devices as claimed in claim 5, wherein the page macro circuit and the window macro circuit are both prefabricated circuits containing electrical symbols and graphics.

8. A system for constructing a project drawing based on unit devices, comprising:

project configuration input module for

Creating a new project;

determining basic information and drawing information of the project;

selecting a project type, and designating a project template;

determining a project component brand;

determining a project function group;

an addition area;

an electrical cabinet of the addition zone;

adding a PLC station of the area;

a unit device of an addition area;

the analysis module is used for analyzing the graphic macro name and the graphic macro address corresponding to the unit equipment from the unit equipment configuration file according to the added parameters of the unit equipment;

the drawing generation module is used for inserting the corresponding graphic macro into the project according to the graphic macro name and the graphic macro address to generate a unit device drawing; and adding other unit equipment item by item to obtain a complete project drawing composed of a plurality of unit equipment drawings.

9. An apparatus/terminal device for constructing a project drawing based on unit devices, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.

Technical Field

The invention relates to the technical field of electrical drawing, in particular to a method and a device for constructing a project drawing based on unit equipment and a storage medium.

Background

In the field of electrical drawing, when a designer makes a device schematic diagram, the designer can draw specific same graphs into a graph macro, and when the designer specifically designs the device schematic diagram, the same schematic diagram can be inserted into the corresponding graph macro without repeatedly drawing the same graphs, so that the drawing efficiency and quality are greatly improved. Still need designer's manual insertion figure, when the equipment system is bulky, the figure that the corresponding needs drawing and the graphic macro of inserting also become very much. When a plurality of designers are needed to design in a cooperative mode, the coordinates of the electrical schematic diagram are different, and the final schematic diagram style is not uniform. This not only brings heavy manufacturing work to designers, but also brings huge work to proofers and auditors.

Therefore, how to realize the quick automatic drawing of the drawing is a difficult problem to be solved.

Disclosure of Invention

The invention aims to provide a method, a device and a storage medium for constructing a project drawing based on unit equipment, aiming at the defects of the prior art.

The invention relates to a method for constructing project drawings based on unit equipment, which adopts the technical scheme that: comprises that

Creating a new project;

determining basic information and drawing information of the project;

selecting a project type, and designating a project template;

determining a project component brand;

determining a project function group;

an addition area;

an electrical cabinet of the addition zone;

adding a PLC station of the area;

a unit device of an addition area;

analyzing a graphic macro name and a graphic macro address corresponding to the unit equipment from the unit equipment configuration file according to the added parameters of the unit equipment;

inserting the corresponding graphic macro into a project according to the graphic macro name and the graphic macro address, and generating a unit device drawing;

and adding other unit equipment item by item to obtain a complete project drawing composed of a plurality of unit equipment drawings.

Preferably, before creating the new project, the method further includes:

designing a standard page macro and a window macro of a unit device in a macro project;

defining different parts corresponding to different parameters in the page macro and the window macro through a value set of a placeholder;

and generating the page macro and/or the window macro corresponding to each part under the specified path folder.

Preferably, one of the items comprises a plurality of unit devices capable of implementing one or more functions, and each unit device comprises a plurality of units, and the units are associated to different page macros or window macros through configurable attribute parameters.

Preferably, the graphic macro is inserted into the project in a manner of adding page by page, and includes:

adding page macro circuits page by page;

and calling a corresponding page macro circuit according to the analyzed page macro address, and inserting the page macro circuit into the current page of the drawing.

Preferably, when the page macro includes a window macro, the corresponding window macro circuit is called according to the analyzed window macro address, and is inserted into the page macro circuit.

Preferably, when the current page to be added contains a placeholder, a configurable unit device attribute is output on the UI interface, and the configurable unit device attribute is used for a user to select the attribute and carry out attribute value distribution of the attribute.

Preferably, the page macro circuit and the window macro circuit are both prefabricated circuits containing electrical symbols and graphs.

This scheme still provides a system based on unit equipment constructs project drawing, and its technical scheme does, includes:

project configuration input module for

Creating a new project;

determining basic information and drawing information of the project;

selecting a project type, and designating a project template;

determining a project component brand;

determining a project function group;

an addition area;

an electrical cabinet of the addition zone;

adding a PLC station of the area;

a unit device of an addition area;

the analysis module is used for analyzing the graphic macro name and the graphic macro address corresponding to the unit equipment from the unit equipment configuration file according to the added parameters of the unit equipment;

the drawing generation module is used for inserting the corresponding graphic macro into the project according to the graphic macro name and the graphic macro address to generate a unit device drawing; and adding other unit equipment item by item to obtain a complete project drawing composed of a plurality of unit equipment drawings.

The scheme also provides a device/terminal device for constructing project drawings based on unit devices, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and is characterized in that the processor implements the steps of the method when executing the computer program.

The present solution also provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the above method.

The invention has the beneficial effects that: the modular structured standardization is utilized to decompose the equipment into unit equipment, and the XML technology is utilized to macro-combine the graphs to form the electrical schematic diagram of the unit equipment. According to the structural characteristics of the electrical schematic diagrams of different unit devices, various graphic macros are associated with the attribute parameters of the unit devices, the electrical schematic diagrams are added for the optional configuration of the unit devices through attribute values, and corresponding material components are selected. The page macro and the window macro address of the unit equipment are analyzed according to the XML file of the unit equipment, the standardized page macro and the standardized window macro are automatically inserted into the designated page, and the workload of manual drawing is reduced. Designers do not need to consider the realization of different standard details, and simultaneously, do not need to repeatedly design a basic circuit for each project, thereby not only improving the drawing efficiency, but also ensuring the drawing quality.

Drawings

FIG. 1 is a schematic flow chart of a project drawing based on unit equipment construction according to the present invention;

FIG. 2 is a schematic flow chart of a drawing generated based on parameters of a unit device according to the present invention;

FIG. 3 is a schematic composition diagram of the project drawing of the present invention;

FIG. 4 is a schematic diagram of the configuration of a cell device in terms of parameters, components and graphic macros;

FIG. 5 is a schematic diagram of a mapping relationship between a unit device configuration file and a drawing of a graphic macro and a unit device;

FIG. 6 is a diagram illustrating a mapping relationship between attribute parameters of unit devices and configuration files of the unit devices;

FIG. 7 is a schematic diagram of a unit device profile;

FIG. 8 is a diagram of various graphic macros under a folder;

FIG. 9 is a property definition in project configuration software;

FIG. 10 is a graphical macro combinational logic in project configuration software.

Detailed Description

In order to make the technical problems, technical solutions and advantageous effects to be solved by the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

It will be understood that when an element is referred to as being "secured to" or "disposed on" another element, it can be directly on the other element or be indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or be indirectly connected to the other element.

It will be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like, refer to an orientation or positional relationship illustrated in the drawings for convenience in describing the present application and to simplify description, and do not indicate or imply that the referenced device or element must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the present application.

Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.

The scheme takes physically operable mechanical equipment as an object, defines equipment for realizing certain function(s) as unit equipment (Unitdevice), the unit equipment can be equipment with single function, such as an electromagnetic valve, or equipment with complex function, such as a lifter (comprising corresponding combined parts of a lifting motor, a rolling machine motor, a positioner, a sensor and the like), electrical drawings of the unit equipment are combined by a plurality of basic circuits, and the method of the scheme is to define the combination of the electrical patterns of the unit equipment by adopting extensible markup language and construct a project by combining a plurality of unit equipment.

An item is a collection of documents and data of many kinds, including pages, parts, symbols, tables, and frames. Creating a new project, a template is specified, and the template comprises the setting of the project, the project data and the type of the equipment. The project types are divided into process type equipment and conveying type equipment. The method comprises the steps of creating a project in project configuration UI software, setting project type parameters, setting part brands, setting function groups, setting areas, setting PLC stations, adding unit equipment, setting unit equipment parameters, generating a project file XML, importing the project file into a drawing generation plug-in, analyzing the project file by drawing generation software, and creating a project drawing.

Example one

As shown in fig. 1-2, the flow of constructing a project drawing based on unit devices is as follows:

creating a new project in the project configuration software;

determining basic information and drawing information of the project;

selecting a project type, and designating a project template;

determining a project component brand;

determining a project function group;

determining the installation position of a part in a project;

an addition area;

an electrical cabinet of the addition zone;

adding a PLC station of the area;

a unit device of an addition area;

exporting the project file;

and importing the project file into the drawing generation plug-in to generate a project drawing.

The method for importing the project file and generating the project drawing comprises the following steps:

analyzing a graphic macro name and a graphic macro address corresponding to the unit equipment from the unit equipment configuration file according to the added parameters of the unit equipment;

inserting the corresponding graphic macro into the project according to the graphic macro name and the graphic macro address to generate a unit device drawing;

and adding other unit equipment item by item to obtain a complete project drawing composed of a plurality of unit equipment drawings.

The project file contains drawing information, template information, part brand replacement information, project function groups, installation positions, area information, electric cabinet information, PLC station information and an xml code (containing a parameter set value of a user) of each added unit device.

Inserting graphic macros into items in a page-by-page addition manner, which comprises

Adding page macro circuits page by page;

calling a corresponding page macro circuit according to the analyzed page macro address, and inserting the page macro circuit into the current page of the drawing;

and when the page macro contains the window macro, calling a corresponding window macro circuit according to the analyzed window macro address, and inserting the window macro circuit into the page macro circuit.

When the unit device in the area is added, the parameter configuration needs to be performed on the displayed attribute in the UI interface, after the parameter configuration is performed, the parameter configuration is stored into the Value node of each attribute of the unit device configuration file, and according to the Value set of each attribute placeholder, the corresponding page macro or window macro can be mapped from the designated path.

The unit device configuration file is a file which is not configured in advance, and the configuration of the unit device configuration file comprises the following steps:

designing a standard page macro and a window macro of the unit device in a macro project, defining different parts corresponding to different parameters in the macro through a value set of a placeholder, and generating the page macro and the window macro to be under a specified path folder. The logical properties of the editing unit device and the graphic macro combination logic of the editing unit device are that in the process of writing the XML, the properties are defined (as shown in fig. 9) and then the graphic macro combination is defined (as shown in fig. 10). The graphic macro references from under the specified path folder.

And subsequently, adding a unit equipment XML file in the project configuration software, selecting equipment attribute logic in the XML file in the software, analyzing the attribute logic configuration of the unit equipment by the software in the project drawing generation process, calling the corresponding page macro/window macro, and combining to generate a complete unit equipment drawing.

As shown in fig. 3, the scheme is based on the idea of module design, unit devices are abstracted, a circuit of a project is composed of a plurality of unit devices, a plurality of pages of macro/window macro constitute the unit devices, and a set of project drawings is finally composed of a plurality of unit devices.

As shown in fig. 4, the unit device is a basic object of the drawing, and includes different components, and the components of different specifications are selected by setting values of the attributes (parameters) of the unit device. Different parameters are set for each unit device, different component parameters can be switched, and the unit devices have parameterization properties.

As shown in fig. 5, the abstract unit device is described by an extensible markup language. Extensible Markup Language (XML), which is a structural Language for marking various types of information that can be processed by a computer, is an effective tool for processing distributed structural information. Unit devices that meet XML grammar specification definitions, various page macros/window macros that organize unit devices by custom tags, optional window macros that select by attribute (logical parameter), power, and other configurable logical attributes. The actual mechanical equipment electrical schematic diagram is converted into a logic combination described by XML, and the software selects a page macro/window macro according to the XML to generate the mechanical equipment electrical schematic diagram.

In the scheme, the compiling process of the unit equipment configuration file is as follows:

the first step composes a display of a UI interface for visualizing the unit device and the editing device.

And the second part writes XML to call macro groups and build unit equipment. All XML nodes are presented in pairs, the description content is under the Root node, and the Root node contains several ValueList (collection of parameter values) and UnitDevice (definition Unit device) nodes. A UnitDevice contains a Properties node and DTIndex nodes (describing the macros used by the Unit devices).

ValueList is used to define the collection of parameter values, index with Id attribute as the unique identifier, the value of the collection is identified by Val, and the actual value is filled in the node of Val, such as < Val >37KW </Val >.

The UnitDevice is used to define the unit devices, and all configurations take the unit devices as the core, including the display defining the UI interface, the parameter values, the referenced macro groups or page macros and window macros, as well as the definition of PLC and cable boxes. Under a UnitDevice node, a < Properties > node and a plurality of < DTIndex > nodes are included.

In the Property setting of the UI, each Property node has a Value attribute, and the setting is not required here, and the program is left to record the actual input of the user (i.e. the attribute parameters input in the add unit device).

As shown in FIG. 6, the frameworks of different types of unit devices are consistent, and the transformation and definition of the frameworks are realized by using the custom tag nodes of XML.

As shown in fig. 7, the unit device configuration file may obtain the graphic macro name and the address of the graphic macro of the unit device through parsing, and may obtain the corresponding graphic macro according to the graphic macro name and the graphic macro address.

As shown in fig. 8, under a folder, there may be a plurality of graphic macros, which can be located by the graphic macro address, and the corresponding graphic macro can be obtained from the graphic macros in the folder by the graphic macro name.

It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.

Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.

The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于CAD外部参照协同模式的住宅核心筒面积计算方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类