CN115544980A - Method and device for generating document by Excel file based on Revit - Google Patents

Method and device for generating document by Excel file based on Revit Download PDF

Info

Publication number
CN115544980A
CN115544980A CN202211334309.5A CN202211334309A CN115544980A CN 115544980 A CN115544980 A CN 115544980A CN 202211334309 A CN202211334309 A CN 202211334309A CN 115544980 A CN115544980 A CN 115544980A
Authority
CN
China
Prior art keywords
excel
revit
generating
family
file
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
CN202211334309.5A
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.)
China City Environment Protection Engineering Ltd
Original Assignee
China City Environment Protection Engineering 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 China City Environment Protection Engineering Ltd filed Critical China City Environment Protection Engineering Ltd
Priority to CN202211334309.5A priority Critical patent/CN115544980A/en
Publication of CN115544980A publication Critical patent/CN115544980A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • 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
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention provides a method and equipment for generating a document by an Excel file based on Revit. The method comprises the following steps: step 1 to step 6. The drawing generation method and the drawing generation device can effectively improve drawing plotting efficiency based on the form in the actual engineering project through the processes of converting the Excel file into the drawing, printing PDF, automatically signing and the like.

Description

Method and device for generating document by Excel file based on Revit
Technical Field
The embodiment of the invention relates to the technical field of BIM design, in particular to a method and equipment for generating a document by an Excel file based on Revit.
Background
The Building Information Modeling (BIM) is a complete Information model, and can integrate engineering Information, processes and resources of engineering projects at different stages in a full life cycle into one model, so that the Building Information Modeling is convenient for all engineering participants to use. The real information of the building is simulated through the three-dimensional digital technology, and information models which are coordinated with each other and consistent in interior are provided for engineering design and construction, so that the models are integrated with design and construction, all specialties work cooperatively, the engineering production cost is reduced, and the construction period and the quality of the engineering are guaranteed. Revit is the most popular piece of software for BIM applications. Most of the current Revit-based icon design methods and printing methods only aim at common drawing frames in projects, but in actual production projects, besides the use of common drawing frames, drawing requirements of various forms of material tables, equipment tables, valve tables and the like can also exist, so that the requirements of generating, batch printing and realizing automatic signature and signature of PDF (portable document format) based on the form drawings are reasonable and necessary. Therefore, developing a method and device for generating a document from an Excel file based on Revit effectively fills the technical gap in the related art, and is a technical problem to be solved in the industry.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a method and equipment for generating a document by an Excel file based on Revit.
In a first aspect, an embodiment of the present invention provides a method for generating a document based on an Excel file of Revit, including: step 1, establishing a general Excel template manufacturing standard, completing manufacturing of Excel form files commonly used by various specialties of a company according to the standard, establishing a company unified standard and a first Excel template, wherein the first Excel template is applied to all other Excel templates increased along with the service; step 2, establishing a serialized and parameterized standard Revit family, and making a corresponding Revit family for each Excel template, wherein the family names are the same as the names of the corresponding Excel table bodies and correspond to one another one by one; step 3, selecting an Excel file to be imported, automatically loading a corresponding family in the current Revit project, creating a new drawing, and creating a new family instance; step 4, importing the Excel form into a Revit project drawing according to the step 3, completing automatic line division of form contents and automatic page division of super-long sheet, and automatically generating drawing numbers in the Revit drawing into drawing numbers-pages; step 5, printing drawings in batch, and realizing one-time batch printing of drawings with different sizes and directions by matching and automatically adding the drawings and the paper size of the PDF virtual printer during printing; and 6, uploading the PDF file after the printing and the addition of the keywords to a project management platform of the image sending platform, and finishing the subsequent automatic signing and plotting through coordinates and sizes in the keywords of the file and calling the electronic signature of the corresponding personnel.
On the basis of the content of the embodiment of the method, the method for generating a document by an Excel file based on Revit provided by the embodiment of the invention specifically comprises the following steps of 1: and dividing each Excel table into a header and a body for respective processing, defining the range and the name of the header and the body in a name manager respectively, and setting a uniform corresponding name for each field value of the header part.
On the basis of the content of the embodiment of the method, the method for generating the document by the Excel file based on the Revit provided by the embodiment of the invention specifically comprises the following steps of 2: each standard Revit family comprises a fixed header, an outer frame and a dynamic table body part corresponding to the Excel table, wherein the header comprises each name field and a label corresponding to the field value of the Excel table, and is associated with shared parameters; the standard Revit family also comprises a table body first line field positioning line and a line height parameter, and the line and the table body content are respectively generated by adopting DetailCurve and TextNote elements for dynamic positioning, so that automatic line division of the table content and automatic paging of the ultra-long table are supported.
On the basis of the content of the embodiment of the method, in the method for generating a document by using an Excel file based on Revit provided by the embodiment of the invention, the step 3 specifically comprises the following steps: reading and analyzing all content information of the Excel file, acquiring all fields in a name manager and corresponding values of the fields, and setting the values of the fields as tag contents in a sharing parameter form which is the same as the name fields in a Revit family; and storing the read Excel information table body part into a memory in a DataTable format, and performing algorithm analysis on each line of content in the memory.
On the basis of the content of the embodiment of the method, the method for generating a document by using an Excel file based on Revit provided by the embodiment of the invention comprises the following steps of: and (3) generating calculation of coordinates at the TextNote position by each field content in the row, aligning the TextNote values of each row, and drawing a DetailCurve row line at the maximum row after automatic row changing if a plurality of field contents in the same row contain single or a plurality of row changing symbols.
On the basis of the content of the embodiment of the method, in the method for generating a document based on an Excel file of Revit provided by the embodiment of the invention, the step 5 further comprises the following steps: after printing the PDF, adding keywords in the PDF document attribute.
On the basis of the content of the embodiment of the method, the method for generating the document by the Excel file based on Revit provided by the embodiment of the invention comprises the following key words: the coordinates of the signing places of the designer, the auditor and the checker, and the drawing frame size information.
In a second aspect, an embodiment of the present invention provides an apparatus for generating a document based on an Excel file of Revit, including: the first main module is used for realizing the step 1, establishing a general Excel template manufacturing standard, completing manufacturing according to the standard for common Excel form files of various specialties of a company, establishing a company unified standard and a first Excel template, and applying the first Excel template to all other Excel templates increased along with the business; the second main module is used for realizing the step 2, establishing a serialized and parameterized standard Revit family, and manufacturing a corresponding Revit family for each Excel template, wherein the family names are the same as the names of the table bodies of the corresponding Excel tables and are in one-to-one correspondence; step 3, selecting an Excel file to be imported, automatically loading a corresponding family in the current Revit project, creating a new drawing, and creating a new family instance; the third main module is used for realizing the step 4, importing the Excel form into a Revit project drawing according to the step 3, completing automatic line division of the form content and automatic page division of the ultra-long sheet, and automatically generating a drawing number in the Revit drawing into a drawing number-page number; step 5, printing drawings in batch, and realizing one-time batch printing of drawings with different sizes and directions by matching and automatically adding the drawings with the paper size of the PDF virtual printer during printing; and the fourth main module is used for realizing the step 6, uploading the PDF file after the printing and the addition of the keywords to the image sending platform project management platform, and finishing the subsequent automatic signing and plotting through the coordinates and the sizes in the keywords of the file and the electronic signature of the calling corresponding personnel.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method for generating the document based on the Revit Excel file provided by any one of the various implementation modes of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method for generating a document based on a Revit Excel file provided in any one of the various implementation manners of the first aspect.
According to the method and the device for generating the document by the Excel file based on the Revit, provided by the embodiment of the invention, the drawing generation efficiency based on the form in the actual engineering project can be effectively improved through the processes of converting the Excel file into the drawing, printing PDF, automatically signing and the like.
Drawings
To illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, a brief description will be given below of the drawings used in the description of the embodiments or the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings are obtained based on these drawings without creative efforts.
FIG. 1 is a flowchart of a method for generating a document based on an Excel file of Revit according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a device for generating a document based on an Excel file of Revit according to an embodiment of the present invention;
fig. 3 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a secondary development process using a Revit API according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an algorithm principle for importing an Excel file into a generated Revit drawing according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a PDF algorithm for printing Revit drawings according to an embodiment of the present invention;
fig. 7 is a schematic flow diagram illustrating an Excel file import parallel online publishing diagram according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The technical features of the various embodiments or individual embodiments provided in the present invention are arbitrarily combined with each other to form a feasible technical solution, and the combination is not limited by the sequence of steps and/or the structural composition mode, but based on the realization of the technical solution by a person skilled in the art, when the technical solution combination is contradictory or cannot be realized, the technical solution combination should be considered to be absent and not to be within the protection scope of the present invention.
And completing the conversion, batch printing and automatic signature method with the project drawing based on the required forms in the production project. The family and sharing parameters are important and common means in Revit, so that the corresponding families can be respectively manufactured for different forms to realize the primary conversion between the forms and the drawings, and then the labels in Revit are adopted to fill the designated labels, but due to the inconsistency of the content format and the Revit character format in the form file, the read form content is correspondingly processed and refilled into the Revit drawings, and the size, the printing rule, the coordinates and the corresponding information of each signature position of each drawing are obtained, so that the generation, batch printing and automatic signature of PDF (Portable document Format) of the form drawings are realized. Based on the thought, the embodiment of the invention provides a method for generating a document by an Excel file based on Revit, and referring to FIG. 1, the method comprises the following steps: step 1, establishing a general Excel template manufacturing standard, completing manufacturing of Excel form files commonly used by various specialties of a company according to the standard, establishing a company unified standard and a first Excel template, wherein the first Excel template is applied to all other Excel templates increased along with the service; step 2, establishing a serialized and parameterized standard Revit family, and manufacturing a corresponding Revit family for each Excel template, wherein the family names are the same as the names of the table bodies of the corresponding Excel tables and correspond to one another; step 3, selecting an Excel file to be imported, automatically loading a corresponding family in the current Revit project, creating a new drawing, and creating a new family instance; step 4, importing the Excel form into a Revit project drawing according to the step 3, completing automatic line division of form contents and automatic page division of super-long sheet, and automatically generating drawing numbers in the Revit drawing into drawing numbers-pages; step 5, printing drawings in batch, and realizing one-time batch printing of drawings with different sizes and directions by matching and automatically adding the drawings and the paper size of the PDF virtual printer during printing; and 6, uploading the PDF file after the printing and the addition of the keywords to a project management platform of the image sending platform, and finishing the subsequent automatic signing and plotting through coordinates and sizes in the keywords of the file and calling the electronic signature of the corresponding personnel.
Based on the content of the above method embodiment, as an optional embodiment, in the method for generating a document based on an Excel file of Revit provided in the embodiment of the present invention, step 1 specifically includes: and dividing each Excel table into a header and a body for respective processing, defining the range and the name of the header and the body in a name manager respectively, and setting a uniform corresponding name for each field value of the header part.
Based on the content of the above method embodiment, as an optional embodiment, in the method for generating a document based on an Excel file of Revit provided in the embodiment of the present invention, step 2 specifically includes: each standard Revit family comprises a fixed header, an outer frame and a dynamic table body part corresponding to the Excel table, wherein the header comprises each name field and a label corresponding to the field value of the Excel table, and is associated with shared parameters; the standard Revit family also comprises a table body first line field positioning line and a line height parameter, and the line and the table body content are respectively generated by adopting DetailCurve and TextNote elements for dynamic positioning, so that automatic line division of the table content and automatic paging of the ultra-long table are supported.
Based on the content of the above method embodiment, as an optional embodiment, in the method for generating a document based on an Excel file of Revit provided in the embodiment of the present invention, step 3 specifically includes: reading and analyzing all content information of the Excel file, acquiring all fields in a name manager and corresponding values of the fields, and setting the values of the fields as tag contents in a sharing parameter form which is the same as the name fields in a Revit family; and storing the read Excel information table body part in a dataTable format to a memory, and performing algorithm analysis on each line of content.
Based on the content of the above method embodiment, as an optional embodiment, the method for generating a document based on an Excel file of Revit provided in the embodiment of the present invention, where performing algorithm analysis on each line of content includes: and (3) generating calculation of coordinates at the TextNote position by each field content in the row, aligning the TextNote values of each row, and drawing a DetailCurve row line at the maximum row after automatic row changing if a plurality of field contents in the same row contain single or a plurality of row changing symbols.
Based on the content of the above method embodiment, as an optional embodiment, in the method for generating a document based on an Excel file of Revit provided in the embodiment of the present invention, step 5 further includes: after printing the PDF, keywords are added to the PDF document attributes.
Based on the content of the above method embodiment, as an optional embodiment, the method for generating a document based on an Excel file of Revit provided in the embodiment of the present invention includes: the coordinates of the signing places of the designer, the auditor and the checker, and the drawing frame size information.
According to the method for generating the document by the Excel file based on the Revit, provided by the embodiment of the invention, the drawing generation efficiency based on the form in the actual engineering project can be effectively improved through the processes of converting the Excel file into the drawing, printing PDF, automatically signing and the like.
In another embodiment, fig. 4 is a schematic diagram of a secondary development flow using the Revit API. First, a Visual Studio is used to create a class library project. After a RevitAPI.dll and a RevitPIUI.dll are added into a project to refer to a program set, files such as cs, xaml and xaml.cs can be created and edited by using a provided Revit API, logic service development is completed by using the cs files of the project, and plug-in WPF interface development is completed by using the xaml and xaml.cs files of the project. The method includes the steps that an add file is created and edited, and Revit plug-in registration is achieved through the add file, and the add file is essentially a file in an XML format. And (4) starting the Revit loading plug-in, tracking a continuous execution process through debugging, continuously improving the plug-in program, and after all functions are completed, making and releasing a plug-in installation package to complete development.
And manufacturing a corresponding serialized and parameterized standard Revit family according to the Excel standard template. Each family should include a corresponding header, frame, and dynamic body portion. Wherein, the header of the table should contain each name field of the Excel table and a label corresponding to the field value, and is associated with the shared parameter; the Revit family also comprises a table body first line field positioning line and a line height parameter, which is beneficial to generating a line and a character by using the dynamic positioning of DetailCurve and TextNote elements in a drawing and supports automatic line division of table contents and automatic paging of a super-page table.
FIG. 5 is a schematic diagram of an algorithm principle of importing and generating Revit drawings by an Excel file. The algorithm can be roughly divided into two parts of reading Excel information and importing and generating a drawing. After the Excel form is filled in under the subscriber line, a file which needs to be imported into a drawing can be selected through a user interface. And after the file list to be imported is obtained, the information in each file is sequentially and circularly read by adopting a program. After the header icon range name and the data range name of each legal sheet are obtained by screening all legal names in the file name manager, each header name and corresponding numerical value are stored in a Dictionary key value pair, table information is stored in a DataTable, and all information is temporarily stored in a memory. The Excel file information reading algorithm is completed. When a form drawing frame group is manufactured, the bound shared parameters are all stored in an appointed file, parameters required by automatic loading are added into Revit project parameters in an algorithm, and a form group file with the same name as a form data name is loaded, so that the preparation process before the drawing is imported and generated is completed. And automatically creating a new drawing, inserting the group example of the table group just loaded, setting parameters of header drawing label information in the drawing frame according to the read key value of Excel header information, obtaining a positioning line drawn in the group file, converting to obtain coordinates of each row and each column of the head line of the title data in the drawing, and dynamically drawing the drawing according to each coordinate and the information in the DataTable. And according to the calculation of whether the line change of each line number value of each line is carried out or not and the maximum line change number, drawing characters and lines by using TextNote and DetailCurve elements and realizing automatic line change, automatically paging if the coordinate in the dynamic drawing process exceeds the frame range, creating a new drawing and circularly finishing the setting of drawing parameters and the drawing of residual data so as to finish the process of importing the Excel file into the generated Revit drawing algorithm.
FIG. 6 is a schematic diagram of the PDF algorithm for printing Revit drawings. The PDF for printing the drawing is different from the batch printing function provided by Revit software, and complicated processes such as batch printer setting, printing setting modification, drawing size setting and the like are not needed. And after the user selects all the drawings to be printed, automatically acquiring the list and circularly printing. In the single printing process, the width, the height and the direction of the drawing are automatically acquired, the printing size of the drawing is calculated according to the set margin width, and if the size does not exist in the printer, the printing setting is automatically added and acquired to print the temporary file. And reading 33 items of information such as the height, width, name, signature and countersign coordinates of a picture frame in the drawing by calling an algorithm, copying a temporary file, adding the obtained information into a document attribute keyword, and finally deleting the temporary file to realize the process of printing the PDF file on the drawing.
FIG. 7 is a schematic diagram of an Excel file import parallel online publishing diagram flow. The Excel file importing, online publishing and drawing method comprises the steps that a user selects an Excel file to be imported through a functional interface, and multiple files are supported, and the file comprises a plurality of sheets. And sequentially reading file information in the Excel file list and automatically importing the file information to generate a Revit drawing. After generating the drawing, selecting the drawing needing drawing publishing in all drawing lists in the Revit project by a user through a functional interface for printing, uploading the printed PDF file to a server through a function interface uploading function after printing is completed, completing the signature of the drawing through PDF document attribute keywords, and completing online drawing publishing of an Excel form file subsequently like a common drawing frame.
After the Excel is imported, a drawing with the same style as the original Excel and the same header drawing information is automatically generated, and the original table information is automatically paged according to the fixed line number of each page.
The implementation basis of the various embodiments of the present invention is realized by programmed processing performed by a device having a processor function. Therefore, in engineering practice, the technical solutions and functions thereof of the embodiments of the present invention are packaged into various modules. Based on such a practical situation, on the basis of the above embodiments, an embodiment of the present invention provides a device for generating a document from an Excel file based on Revit, where the device is configured to execute the method for generating a document from an Excel file based on Revit in the above method embodiments. Referring to fig. 2, the apparatus includes: the first main module is used for realizing the step 1, establishing a general Excel template manufacturing standard, completing manufacturing according to the standard for common Excel form files of various specialties of a company, establishing a company unified standard and a first Excel template, and applying the first Excel template to all other Excel templates increased along with the business; the second main module is used for realizing the step 2, establishing a serialized and parameterized standard Revit family, and making a corresponding Revit family for each Excel template, wherein the family names are the same as the names of the table bodies of the corresponding Excel tables and correspond to one another; step 3, selecting an Excel file to be imported, automatically loading a corresponding family in the current Revit project, creating a new drawing, and creating a new family instance; the third main module is used for realizing the step 4, importing the Excel form into a Revit project drawing according to the step 3, completing automatic line division of the form content and automatic page division of the ultra-long sheet, and automatically generating a drawing number in the Revit drawing into a drawing number-page number; step 5, printing drawings in batch, and realizing one-time batch printing of drawings with different sizes and directions by matching and automatically adding the drawings with the paper size of the PDF virtual printer during printing; and the fourth main module is used for realizing the step 6, uploading the PDF file after the printing and the addition of the keywords to the image sending platform project management platform, and finishing the subsequent automatic signing and plotting through the coordinates and the sizes in the keywords of the file and the electronic signature of the calling corresponding personnel.
The device for generating the document by the Excel file based on the Revit provided by the embodiment of the invention adopts a plurality of modules in the figure 2, and can effectively improve drawing plotting efficiency based on the form in an actual engineering project through the processes of converting the Excel file into a drawing, printing PDF, automatically signing and the like.
It should be noted that, the apparatus in the apparatus embodiment provided by the present invention is also used for implementing the method in the other method embodiments provided by the present invention, except for implementing the method in the above method embodiment, the difference is only that a corresponding function module is provided, and the principle thereof is basically the same as that of the above apparatus embodiment provided by the present invention, as long as a person skilled in the art obtains a corresponding technical means by combining technical features on the basis of the above apparatus embodiment and referring to a specific technical scheme in the other method embodiments, and a technical scheme formed by these technical means, on the premise of ensuring that the technical scheme has practicability, the apparatus in the above apparatus embodiment is improved to obtain a corresponding apparatus class embodiment, which is used for implementing the method in the other method class embodiments. For example:
based on the content of the above device embodiment, as an optional embodiment, the device for generating a document based on an Excel file of Revit provided in the embodiment of the present invention further includes: the first sub-module is configured to implement step 1 and specifically includes: and uniformly dividing each Excel table into a header and a body for respective processing, respectively defining the range and the name of the header and the body in a name manager, and setting a uniform corresponding name for each field value of the header part.
Based on the content of the above device embodiment, as an optional embodiment, the device for generating a document based on an Excel file of Revit provided in the embodiment of the present invention further includes: the second sub-module is configured to implement step 2 and specifically includes: each standard Revit family comprises a fixed header, an outer frame and a dynamic table body part corresponding to the Excel table, wherein the header comprises each name field and a label corresponding to the field value of the Excel table, and is associated with shared parameters; the standard Revit family also comprises a table body first line field positioning line and a line height parameter, the line and the table body content are respectively generated by dynamic positioning of DetailCurve and TextNote elements, and automatic line division of the table content and automatic page division of the ultra-long table are supported.
Based on the content of the above device embodiment, as an optional embodiment, the device for generating a document based on an Excel file of Revit provided in the embodiment of the present invention further includes: the third sub-module is configured to implement step 3 and specifically includes: reading and analyzing all content information of the Excel file, acquiring all fields in a name manager and corresponding values of the fields, and setting the values of the fields as tag contents in a sharing parameter form which is the same as the name fields in a Revit family; and storing the read Excel information table body part in a dataTable format to a memory, and performing algorithm analysis on each line of content.
Based on the content of the above device embodiment, as an optional embodiment, the device for generating a document based on an Excel file of Revit provided in the embodiment of the present invention further includes: a fourth sub-module, configured to implement the algorithmic analysis of each line of content, including: and (3) generating calculation of coordinates at the TextNote position by each field content in the row, aligning the TextNote values of each row, and drawing a DetailCurve row line at the maximum row after automatic row changing if a plurality of field contents in the same row contain single or a plurality of row changing symbols.
Based on the content of the above device embodiment, as an optional embodiment, the device for generating a document based on an Excel file of Revit provided in the embodiment of the present invention further includes: the fifth sub-module, configured to implement step 5, further includes: after printing the PDF, keywords are added to the PDF document attributes.
Based on the content of the above device embodiment, as an optional embodiment, the device for generating a document based on an Excel file of Revit provided in the embodiment of the present invention further includes: a sixth sub-module, configured to implement the keyword, including: the coordinates of the signing places of the designer, the auditor and the checker, and the drawing frame size information.
The method of the embodiment of the invention is realized by depending on the electronic equipment, so that the related electronic equipment is necessarily introduced. To this end, an embodiment of the present invention provides an electronic apparatus, as shown in fig. 3, including: the system comprises at least one processor (processor), a communication Interface (communication Interface), at least one memory (memory) and a communication bus, wherein the at least one processor, the communication Interface and the at least one memory are communicated with each other through the communication bus. The at least one processor invokes logic instructions in the at least one memory to perform all or a portion of the steps of the methods provided by the various method embodiments described above.
In addition, the logic instructions in the at least one memory are implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention is essentially or partially contributed to by the prior art, or is embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (such as a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the method embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media storing program codes.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate parts are or are not physically separate, and the parts shown as units are or are not physical units, are located in one place, or are also distributed over a plurality of network units. According to the actual selection of some or all of the modules, the purpose of the scheme of the embodiment is achieved. One of ordinary skill in the art will understand and implement the present invention without inventive faculty.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly by hardware. With this understanding in mind, the above technical solutions substantially or otherwise contributing to the prior art are embodied in the form of a software product stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and including instructions for causing a computer device (which is a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of implementations of systems, methods and computer program products according to various embodiments of the present invention. Based on this recognition, each block in the flowchart or block diagrams is a module, a program segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. 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 involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It is noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of the same element in a process, method, article, or apparatus that comprises the element.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention is 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 are still modified, or some technical features are equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for generating a document by an Excel file based on Revit is characterized by comprising the following steps: step 1, establishing a general Excel template manufacturing standard, completing manufacturing of Excel form files commonly used by various specialties of a company according to the standard, establishing a company unified standard and a first Excel template, wherein the first Excel template is applied to all other Excel templates increased along with the service; step 2, establishing a serialized and parameterized standard Revit family, and manufacturing a corresponding Revit family for each Excel template, wherein the family names are the same as the names of the table bodies of the corresponding Excel tables and correspond to one another; step 3, selecting an Excel file to be imported, automatically loading a corresponding family in the current Revit project, creating a new drawing, and creating a family example; step 4, importing the Excel form into a Revit project drawing according to the step 3, completing automatic line division of form contents and automatic page division of super-long sheet, and automatically generating drawing numbers in the Revit drawing into drawing numbers-pages; step 5, printing drawings in batch, and realizing one-time batch printing of drawings with different sizes and directions by matching and automatically adding the drawings with the paper size of the PDF virtual printer during printing; and 6, uploading the PDF file after the printing and the addition of the keywords to a project management platform of the image sending platform, and finishing the subsequent automatic signing and plotting through coordinates and sizes in the keywords of the file and calling the electronic signature of the corresponding personnel.
2. The method for generating a document from an Excel file based on Revit according to claim 1, wherein step 1 specifically comprises: and dividing each Excel table into a header and a body for respective processing, defining the range and the name of the header and the body in a name manager respectively, and setting a uniform corresponding name for each field value of the header part.
3. The method for generating a document from an Excel file based on Revit according to claim 2, wherein the step 2 specifically comprises: each standard Revit family comprises a fixed header, an outer frame and a dynamic table body part corresponding to the Excel table, wherein the header comprises each name field and a label corresponding to the field value of the Excel table, and is associated with shared parameters; the standard Revit family also comprises a table body first line field positioning line and a line height parameter, the line and the table body content are respectively generated by dynamic positioning of DetailCurve and TextNote elements, and automatic line division of the table content and automatic page division of the ultra-long table are supported.
4. The method for generating a document from an Excel file based on Revit according to claim 3, wherein step 3 specifically comprises: reading and analyzing all content information of the Excel file, acquiring all fields in a name manager and corresponding values of the fields, and setting the values of the fields as tag contents in a sharing parameter form which is the same as the name fields in a Revit family; and storing the read Excel information table body part into a memory in a DataTable format, and performing algorithm analysis on each line of content in the memory.
5. The method for generating a document according to claim 4, wherein the performing algorithm analysis on each line of content comprises: and (3) generating calculation of coordinates at the TextNote position by each field content in the row, aligning the TextNote values of each row, and drawing a DetailCurve row line at the maximum row after automatic row changing if a plurality of field contents in the same row contain single or a plurality of row changing symbols.
6. The method for generating a document according to claim 5, wherein the step 5 further comprises: after printing the PDF, adding keywords in the PDF document attribute.
7. The method for generating a document according to claim 6, wherein the keywords comprise: the coordinates of the signing places of the designer, the auditor and the checker, and the drawing frame size information.
8. An Excel file generating document device based on Revit is characterized by comprising the following components: the first main module is used for realizing the step 1, establishing a general Excel template manufacturing standard, completing manufacturing according to the standard for common Excel form files of various specialties of a company, establishing a company unified standard and a first Excel template, and applying the first Excel template to all other Excel templates increased along with the business; the second main module is used for realizing the step 2, establishing a serialized and parameterized standard Revit family, and making a corresponding Revit family for each Excel template, wherein the family names are the same as the names of the table bodies of the corresponding Excel tables and correspond to one another; step 3, selecting an Excel file to be imported, automatically loading a corresponding family in the current Revit project, creating a new drawing, and creating a new family instance; the third main module is used for realizing the step 4, importing the Excel form into a Revit project drawing according to the step 3, completing automatic line division of the form content and automatic page division of the ultra-long sheet, and automatically generating a drawing number in the Revit drawing into a drawing number-page number; step 5, printing drawings in batch, and realizing one-time batch printing of drawings with different sizes and directions by matching and automatically adding the drawings with the paper size of the PDF virtual printer during printing; and the fourth main module is used for realizing the step 6, uploading the PDF file after the printing and the addition of the keywords to the image sending platform project management platform, and finishing the subsequent automatic signing and plotting through the coordinates and the sizes in the keywords of the file and the electronic signature of the calling corresponding personnel.
9. An electronic device, comprising:
at least one processor, at least one memory, and a communication interface; wherein the content of the first and second substances,
the processor, the memory and the communication interface are communicated with each other;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202211334309.5A 2022-10-28 2022-10-28 Method and device for generating document by Excel file based on Revit Pending CN115544980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211334309.5A CN115544980A (en) 2022-10-28 2022-10-28 Method and device for generating document by Excel file based on Revit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211334309.5A CN115544980A (en) 2022-10-28 2022-10-28 Method and device for generating document by Excel file based on Revit

Publications (1)

Publication Number Publication Date
CN115544980A true CN115544980A (en) 2022-12-30

Family

ID=84719435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211334309.5A Pending CN115544980A (en) 2022-10-28 2022-10-28 Method and device for generating document by Excel file based on Revit

Country Status (1)

Country Link
CN (1) CN115544980A (en)

Similar Documents

Publication Publication Date Title
CN107025676B (en) Picture template, picture generation method and related device
CN110543303B (en) Visual service platform
CN106021394A (en) Website construction method and apparatus
CN110705237B (en) Automatic document generation method, data processing device and storage medium
CN105512890A (en) Method and system for generating accounting voucher
CN110969004B (en) Automatic typesetting method and system for graphics context, server and medium
CN111797595A (en) Method and device for generating OFD format page based on XML template
CN116384356B (en) Method, device, equipment and medium for creating form row of OFD file
CN109635525A (en) Adding method, device, equipment and the storage medium of watermark
CN110474836A (en) A kind of email template generation method, calculates equipment and medium at device
CN116719781B (en) Method for generating catalogue and labeling by elastic combination of independent files
CN104516868A (en) Layout space streaming restoring method and layout space streaming restoring system
CN114296660A (en) Label printing method based on Vue framework
CN104657342A (en) Clean proof generating method and device
CN117522094A (en) Seal management method, platform, electronic equipment and storage medium
CN112835577A (en) Data processing method, data processing device, computer equipment and readable storage medium
CN116110065A (en) Method, device, computer equipment and storage medium for generating question card data
CN115544980A (en) Method and device for generating document by Excel file based on Revit
CN110989999A (en) Code generation method and device, electronic equipment and medium
CN115935909A (en) File generation method and device and electronic equipment
CN112115694B (en) Simulation report generation method and device based on multi-element data structure
CN114037493A (en) Method and system for generating bidding document
CN105373519B (en) A kind of editing device and method of Technical symbol
CN113360155A (en) Front-end interface background color matching method, device, equipment and storage medium
CN113254455A (en) Dynamic configuration method and device of database, computer equipment and storage medium

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