[go: up one dir, main page]

CN113177292A - Universal BIM secondary development implementation method and device - Google Patents

Universal BIM secondary development implementation method and device Download PDF

Info

Publication number
CN113177292A
CN113177292A CN202110362087.7A CN202110362087A CN113177292A CN 113177292 A CN113177292 A CN 113177292A CN 202110362087 A CN202110362087 A CN 202110362087A CN 113177292 A CN113177292 A CN 113177292A
Authority
CN
China
Prior art keywords
modeling software
development
bim
environment
general
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.)
Granted
Application number
CN202110362087.7A
Other languages
Chinese (zh)
Other versions
CN113177292B (en
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 Railway Electrification Engineering Group Co Ltd
Original Assignee
China Railway Electrification Engineering Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Railway Electrification Engineering Group Co Ltd filed Critical China Railway Electrification Engineering Group Co Ltd
Priority to CN202110362087.7A priority Critical patent/CN113177292B/en
Publication of CN113177292A publication Critical patent/CN113177292A/en
Application granted granted Critical
Publication of CN113177292B publication Critical patent/CN113177292B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a universal BIM secondary development implementation method and a universal BIM secondary development implementation device, wherein the method comprises the following steps: packaging the development environments of various modeling software of the BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to various modeling software; packaging interface functions of various modeling software of the BIM to obtain packaged universal interface functions; in a general development environment, compiling a plug-in by calling the general interface function so as to carry out BIM secondary development; and determining the currently selected modeling software, and modifying the plug-in by adopting the script and the code corresponding to the currently selected modeling software to adapt to the currently selected modeling software so as to complete secondary development operation. The method of the invention ensures that developers only concentrate on the upper application when developing BIM plug-in secondarily without concerning the environment and the bottom implementation, namely, one plug-in is written to be suitable for different BIM modeling software, thereby saving the development time and reducing the work difficulty.

Description

Universal BIM secondary development implementation method and device
Technical Field
The invention relates to the technical field of computers, in particular to a universal BIM secondary development implementation method and device.
Background
Many BIM modeling software exist in the market, such as Revit, Bentley, CATIA and the like, when the software is developed secondarily, different software is often required to be adapted to different development interfaces, for example, Revit needs to introduce two interface component files, namely Revit API.dll and Revit API.dll, a name space reference of Revit API is added to the head of a program, a transaction mode and an update mode are set, a new class is created, the BIM modeling software is derived from the interfaces, a function method is reloaded and the like; for the second development of Bentley Microstation, a NET assembly can be used as Addins to run in Microstation, and the following three conditions need to be met: first, a class derived from bentley, microstation, addin; the derived class must provide a constructor of a single parameter (MDL descriptor of IntPtr type) and this constructor needs to be linked to the base class constructor; ③ the derived class must cover the virtual method Run () in the Addin base class.
Different environments and interfaces are needed for secondary development of different software, so that technicians need a lot of repeated workload for different platforms if the same function plug-in is to be developed, the working difficulty is increased, and the technicians cannot be dedicated to implementation of functions of specific plug-ins.
Disclosure of Invention
The invention provides a universal BIM secondary development implementation method and a universal BIM secondary development implementation device, which are used for solving the problem that technical personnel need a lot of repeated workload due to different platforms if the technical personnel need to develop plug-ins with the same function because different environments and interfaces are needed for secondary development of different software in the prior art, increase the working difficulty and can not concentrate on implementation of specific plug-in functions. The method has the advantages that the method can be suitable for different BIM modeling software by writing one plug-in, saves development time and reduces work difficulty.
In a first aspect, the present invention provides a general BIM secondary development implementation method, including:
packaging the development environments of various modeling software of the BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software;
packaging interface functions of various modeling software of the BIM to obtain packaged universal interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software;
in the universal development environment, compiling a plug-in by calling the universal interface function so as to carry out BIM secondary development;
and determining currently selected modeling software, and modifying the plug-in by adopting a script and a code corresponding to the currently selected modeling software to adapt to the currently selected modeling software so as to complete secondary development operation.
Further, the present invention provides a general BIM secondary development implementation method, wherein the encapsulating the development environments of multiple modeling software of the BIM to obtain an encapsulated general development environment includes:
determining environment requirements respectively corresponding to various modeling software;
and compiling scripts according to the environment requirements respectively corresponding to the modeling software to realize the encapsulation of the development environment of the modeling software of the BIM and obtain the encapsulated general development environment.
Further, the present invention provides a general BIM secondary development implementation method, wherein the encapsulating the interface functions of multiple modeling software of the BIM to obtain an encapsulated general interface function includes:
determining interface function requirements respectively corresponding to various modeling software;
and compiling codes according to the interface function requirements respectively corresponding to the modeling software to realize the encapsulation of the interface functions of the modeling software of BIM and obtain the encapsulated universal interface function.
Further, the present invention provides a general BIM secondary development implementation method, wherein in the general development environment, a plug-in is written by calling the general interface function, so as to perform BIM secondary development, including:
and according to the secondary development function to be realized, in the universal development environment, writing a plug-in by calling the universal interface function so as to carry out BIM secondary development.
Further, the present invention provides a general BIM secondary development implementation method, wherein the currently selected modeling software is determined, and the plug-in is modified by using a script and a code corresponding to the currently selected modeling software to adapt to the currently selected modeling software, so as to complete a secondary development operation, including:
determining currently selected modeling software, and extracting an environment script corresponding to the currently selected modeling software from the general development environment;
extracting an interface function corresponding to the currently selected modeling software from the general interface functions;
and modifying the plug-in based on the environment script corresponding to the currently selected modeling software and the interface function corresponding to the currently selected modeling software to adapt to the currently selected modeling software, so as to complete secondary development operation.
Further, the invention provides a general BIM secondary development implementation method, wherein the multiple modeling software comprise Revit, Microstation, OBD, ORD and CATIA.
In a second aspect, the present invention provides a general BIM secondary development implementation apparatus, including:
the development environment packaging module is used for packaging the development environments of various modeling software of the BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software;
the interface function encapsulation module is used for encapsulating the interface functions of various modeling software of the BIM to obtain encapsulated general interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software;
the first development module is used for compiling plug-ins by calling the universal interface function in the universal development environment so as to carry out BIM secondary development;
and the second development module is used for determining the currently selected modeling software, and modifying the plug-in by adopting the script and the code corresponding to the currently selected modeling software so as to adapt to the currently selected modeling software and finish secondary development operation.
Further, the present invention provides a universal BIM secondary development implementation apparatus, wherein the development environment encapsulation module is further configured to:
determining environment requirements respectively corresponding to various modeling software;
and compiling scripts according to the environment requirements respectively corresponding to the modeling software to realize the encapsulation of the development environment of the modeling software of the BIM and obtain the encapsulated general development environment.
In a third aspect, the present invention provides an electronic device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the program.
In a fourth aspect, the invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention provides a universal BIM secondary development implementation method and device, which are used for encapsulating development environments of various modeling software of BIM to obtain an encapsulated universal development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software; meanwhile, packaging interface functions of various modeling software of the BIM to obtain packaged universal interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software; the development environment and the interface function are generalized through the two steps. And then, in the universal development environment, writing a plug-in by calling the universal interface function so as to carry out BIM secondary development. Then, the developer determines the currently selected modeling software, and modifies the plug-in by adopting the script and the code corresponding to the currently selected modeling software so as to adapt to the currently selected modeling software, thereby completing the secondary development operation. The development personnel can only concentrate on the upper application when developing the BIM plug-in units secondarily without concerning the environment and the bottom implementation, namely, one plug-in unit is written to be suitable for different BIM modeling software, so that the development time is saved, and the work difficulty is also reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a general BIM secondary development implementation method provided by the present invention;
FIG. 2 is a flow chart of the unified interface package provided by the present invention;
FIG. 3 is a schematic diagram of interface function encapsulation of Revit and Microstation encapsulation functions provided by the present invention;
FIG. 4 is a schematic structural diagram of a general BIM secondary development implementation apparatus provided in the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, 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.
A general BIM secondary development implementation method provided by an embodiment of the present invention is described below with reference to fig. 1 to fig. 2, and includes:
step 100, packaging development environments of various modeling software of BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software; the environmental requirements for different modeling software are:
microstation: VS2015, MicroStation CE (Update 7),. Net framework4.6.1, configuration csproj file;
the OBD is Open Building Designer, and the required development environment requirements are as follows: OBD software, VS2017,. Net framework4.6.1, a configuration csproj file, a configuration openSln.bat file, a configuration mke file, a configuration CommandTable.xml file and a configuration cfg file;
ORD is Open Rail Designer, and the required development environment requirements are as follows: ORD software, ORD SDK, VS2017,. Net framework4.6.1, configuration csproj file, configuration openSln.bat file, configuration mke file, configuration CommandTable.xml file and configuration cfg file;
revit: revit 2019, VS2017, Revit SDK 2019, Addin manager, Revit Lookup and ILSpy 4.0.1; configuring AddinManager and Revit Lookup;
CATIA:catia、vs、caa、RADE。
step 200, packaging interface functions of various modeling software of BIM to obtain packaged universal interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software; the interface function requirements corresponding to different modeling software are shown in the following table 1:
TABLE 1
Figure BDA0003005987830000061
Figure BDA0003005987830000071
Figure BDA0003005987830000081
Step 300, in the universal development environment, compiling plug-ins by calling the universal interface function so as to carry out BIM secondary development;
step 400, determining the currently selected modeling software, and modifying the plug-in by adopting the script and the code corresponding to the currently selected modeling software to adapt to the currently selected modeling software, so as to complete secondary development operation.
Specifically, the Building Information Model (BIM) is established based on various relevant information data of a construction engineering project, and real information of a building is simulated through digital information simulation. Meanwhile, various BIM modeling software such as Revit, Bentley, CATIA and the like exist in the market, so that different software is often required to be adapted to different development interfaces when the software is developed secondarily, for example, Revit needs to introduce two interface component files of Revit API.dll and Revit APIUI.dll; for the second development of Bentley Microstation, a NET assembly can be used as Addins to run in Microstation, and three conditions need to be met. Each type of modeling software corresponds to a different development environment. In step 1, the development environment is encapsulated by various modeling software of BIM. The Development Environment refers to a Software Development Environment (SDE), which is a set of Software used for supporting engineering Development and maintenance of system Software and application Software on the basis of basic hardware and digital Software, and is abbreviated as SDE. The system is composed of a software tool and an environment integration mechanism, wherein the former is used for supporting related processes, activities and tasks of software development, and the latter provides uniform support for tool integration and software development, maintenance and management.
In step 100, different development environments are integrated to form a general development environment, so that developers do not need to distinguish the corresponding development environments according to different modeling software during software development:
microstation: writing scripts to install VS2015, MicroStation CE (Update 7) and Net framework 4.6.1; csproj file: the script is written to add related reference files such as ustion.
And (3) OBD: compiling scripts and installing ORD software, VS2017,. Net Framework4.6.1; csproj file: writing a script and adding "< OutputPath > $ (ORD) \ mdlapsps </OutputPath >" under a PropertyGroup node, and writing the script and adding a related reference file such as usti.dll and the like under the ItemGroup node; bat document configuration opensln: writing a script to copy an opensln.bat file in one other project to the current project sln directory, and modifying the project name in the script to be the current project name; configuration mke file: compiling a script to copy a 'managed SDKExample.mke' file, and modifying the project name in the file to be the current project name; xml file configuration: creating a Commandable xml file in a Visual Studio project by writing a script, and adding related contents such as general attributes, key-in command tree labels and the like of the xml file; cfg file: writing a script to create a new cfg file, filling a corresponding code and storing the corresponding code in the (config \ appl \ file under the ORD directory.
ORD: compiling scripts and installing ORD software, ORD SDK, VS2017 and Net framework 4.6.1; csproj file: writing a script and adding "< OutputPath > $ (ORD) \ mdlapsps </OutputPath >" under a PropertyGroup node, and writing the script and adding a related reference file such as usti.dll and the like under the ItemGroup node; bat document configuration opensln: writing a script to copy an opensln.bat file in one other project to the current project sln directory, and modifying the project name in the script to be the current project name; configuration mke file: compiling a script to copy a 'managed SDKExample.mke' file, and modifying the project name in the file to be the current project name; xml file configuration: creating a Commandable xml file in a Visual Studio project by writing a script, and adding related contents such as general attributes, key-in command tree labels and the like of the xml file; cfg file: writing a script to create a new cfg file, filling a corresponding code and storing the corresponding code in the (config \ appl \ file under the ORD directory.
Revit: compiling scripts and installing Revit 2019, VS2017, Revit SDK 2019, Addin manager, Revit Lookup and ILSpy 4.0.1; configuring AddinManager: compiling an AddInManager.dll and an Autodesk.AddInManager.addin file under an Add-In Manager directory under a script copy SDK file into an Autodesk/Revit/Addins/2019 directory, and changing a path In a label In the Autodesk.AddInManager.addin file into an actual installation path of the SDK and storing the actual installation path; configuring Revit Lookup: writing a script to add a revit reference file, and writing the script to modify the fourth row of the RevitLookup.
CATIA: installing cata software; installing a corresponding secondary development vs version; installing corresponding caa; RADE is installed, configuring the environment.
The development personnel can directly develop in the development environment after encapsulation, the problem that whether the corresponding development environment is suitable for the modeling software to be used or not is not needed to be considered, and the trouble that the development personnel consider the bottom layer problem is reduced.
A function interface is a module that writes functions (primarily) to other modules. Simply speaking, an interface function is a common function in a class. The method comprises the steps of packaging, namely hiding the attribute and implementation details of an object, only externally disclosing an interface, and controlling the access level of reading and modifying the attribute in a program. Similarly, since different modeling software has different function interfaces, in step 200, the function interfaces are packaged to form a uniform function interface, so that developers do not need to consider the specific types of the function interfaces to be called when performing secondary development, and also do not need to consider the bottom layer. An example of the encapsulated function interface is shown in table 2 below:
TABLE 2
Figure BDA0003005987830000101
Figure BDA0003005987830000111
The encapsulation can be implemented to get a generic function interface by the following code:
Figure BDA0003005987830000112
Figure BDA0003005987830000121
Figure BDA0003005987830000131
Figure BDA0003005987830000141
defining a BIM general development platform (BIM GDP), and determining a function library used for development according to a platform used by a user. The BIM _ Revit, BIM _ Bentley and BIM _ CATIA similar to the BIM _ Revit, BIM _ Bentley and BIM _ CATIA are used for packaging the function library of the user, and the user can develop the function by calling the public interface function of the BIMSSoft ware.
Step 300 is to write corresponding plug-ins based on step 100 and step 200, that is, based on the generic development environment obtained in step 100 and the generic interface function obtained in step 200. The plug-in is a program written by an application program interface following a certain specification. It can only run under the system platform (possibly supporting multiple platforms simultaneously) specified by the program, and cannot run independently from the specified platform. In the second development, the existing software is simply customized and modified, the functions are expanded, and then the functions required by the user are achieved, and generally, the kernel of the original system is not changed. Therefore, in the general development environment in step 300, the plug-in written by calling the general interface function has a general effect, and can be applied to a plurality of encapsulated modeling software, so that the plug-in can be applied to different BIM modeling software by writing one plug-in, thereby saving development time and reducing work difficulty.
Since the plug-ins on different modeling software require a lot of repetitive work for different platforms, in step 300, one plug-in can be adapted to a plurality of different modeling software by calling a general interface function in a general development environment, but the plug-ins cannot be directly applied to the corresponding modeling software, and a technical developer needs to modify the plug-ins according to the selected modeling software and by using scripts and codes corresponding to the currently selected modeling software to adapt to the currently selected modeling software, thereby completing secondary development operations. That is, in step 400, the generic plug-in is adapted to the specific modeling software so that the plug-in performs the corresponding function.
The invention provides a general BIM secondary development implementation method, which is characterized in that the development environments of various modeling software of BIM are encapsulated to obtain the encapsulated general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software; meanwhile, packaging interface functions of various modeling software of the BIM to obtain packaged universal interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software; the development environment and the interface function are generalized through the two steps. And then, in the universal development environment, writing a plug-in by calling the universal interface function so as to carry out BIM secondary development. At the moment, the written plug-in is suitable for various modeling software, but cannot be directly applied to the corresponding modeling software. And then, modifying the plug-in by using a script and a code corresponding to the currently selected modeling software by a developer according to the determined currently selected modeling software so as to adapt to the currently selected modeling software, thereby completing secondary development operation. The development personnel can only concentrate on the upper application when developing the BIM plug-in units secondarily without concerning the environment and the bottom implementation, namely, one plug-in unit is written to be suitable for different BIM modeling software, so that the development time is saved, and the work difficulty is also reduced.
In another embodiment of the present invention, in the general BIM secondary development implementation method, the encapsulating the development environments of the multiple modeling software of the BIM to obtain an encapsulated general development environment includes:
determining environment requirements respectively corresponding to various modeling software; that is, different modeling software has different requirements for development environments, and the secondary development for each modeling software needs to be adapted to the environment of the corresponding modeling software, and at the same time, the environment between the modeling software is not general, so that the corresponding environment requirement of each modeling software needs to be determined.
And compiling scripts according to the environment requirements respectively corresponding to the modeling software to realize the encapsulation of the development environment of the modeling software of the BIM and obtain the encapsulated general development environment. Since a script is an extension of a batch file and is a program for storing plain text, a general computer script program is a combination of a specific series of operations for controlling a computer to perform an arithmetic operation, and a certain logical branch can be realized therein. Although different modeling software has different requirements on the environment, the environments cannot completely coexist, so that the environments of various modeling software of the BIM can be packaged in a script writing mode, and a universal development environment can be obtained through packaging, wherein the universal development environment can avoid the unique environment required by each modeling software, and the repeated work of writing can be partially reduced.
The invention provides an embodiment, in a general BIM secondary development implementation method, wherein interface functions of various modeling software of BIM are encapsulated to obtain encapsulated general interface functions, comprising:
determining interface function requirements respectively corresponding to various modeling software; since different modeling software corresponds to different interface functions and the interface functions corresponding to different modeling software are not common, the interface function corresponding to each modeling software needs to be determined.
And compiling codes according to the interface function requirements respectively corresponding to the modeling software to realize the encapsulation of the interface functions of the modeling software of BIM and obtain the encapsulated universal interface function. The interface functions of the modeling software are different but not mutually exclusive, corresponding codes can be written, the interface functions corresponding to the different modeling software are packaged to obtain a universal interface function, and the special requirements of the modeling software on the interface functions can be avoided by establishing the universal interface function, so that the work of the written software for the repeated parts of the different interface functions can be reduced.
In an embodiment provided by the present invention, in a general development environment, writing a plug-in by calling the general interface function to perform BIM secondary development, including:
and according to the secondary development function to be realized, in the universal development environment, writing a plug-in by calling the universal interface function so as to carry out BIM secondary development. Therefore, in the general development environment, the plug-in which the general interface is called and written has universality, namely the plug-in has wide adaptability aiming at the general environment and the general interface and can be suitable for a plurality of encapsulated modeling software.
The invention provides an embodiment, determining currently selected modeling software, modifying the plug-in by adopting a script and a code corresponding to the currently selected modeling software to adapt to the currently selected modeling software, and completing secondary development operation, wherein the method comprises the following steps:
determining currently selected modeling software, and extracting an environment script corresponding to the currently selected modeling software from the general development environment;
extracting an interface function corresponding to the currently selected modeling software from the general interface functions;
and modifying the plug-in based on the environment script corresponding to the currently selected modeling software and the interface function corresponding to the currently selected modeling software to adapt to the currently selected modeling software, so as to complete secondary development operation.
Specifically, since the plug-in obtained according to the general development environment and the general interface function has wide applicability, but cannot be directly combined with any encapsulated modeling software for application, the obtained general plug-in needs to be adaptively modified in combination with the selected modeling software to adapt to the currently selected modeling software, thereby completing the secondary development operation.
In an embodiment provided by the invention, the multiple modeling software include Revit, Microstation, OBD, ORD, and CATIA.
The implementation method in the above embodiment is further described below with reference to fig. 3 by taking Revit and Microstation as examples:
an embodiment of a Revit script deployment environment:
Figure BDA0003005987830000181
embodiment of the Microstation script deployment Environment:
Figure BDA0003005987830000182
build dapp. bat content:
Figure BDA0003005987830000191
Figure BDA0003005987830000201
open modeless dialog:
Figure BDA0003005987830000202
before compiling the program, firstly, judging which platform plug-in is to be developed by a technician, and then running the environment script of the platform.
Figure BDA0003005987830000203
Figure BDA0003005987830000211
Referring to fig. 4, a general BIM secondary development implementation apparatus provided by the present invention is described below, and a general BIM secondary development implementation apparatus described below and a general BIM secondary development implementation method described above may be referred to in correspondence with each other.
In another embodiment of the present invention, a general BIM secondary development implementation apparatus includes:
the development environment packaging module is used for packaging the development environments of various modeling software of the BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software; the interface function encapsulation module is used for encapsulating the interface functions of various modeling software of the BIM to obtain encapsulated general interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software; the first development module is used for compiling plug-ins by calling the universal interface function in the universal development environment so as to carry out BIM secondary development; and the second development module is used for determining the currently selected modeling software, and modifying the plug-in by adopting the script and the code corresponding to the currently selected modeling software so as to adapt to the currently selected modeling software and finish secondary development operation.
Specifically, the Building Information Model (BIM) is established based on various relevant information data of a construction engineering project, and real information of a building is simulated through digital information simulation. Meanwhile, various BIM modeling software such as Revit, Bentley, CATIA and the like exist in the market, so that different software is often required to be adapted to different development interfaces when the software is developed secondarily, for example, Revit needs to introduce two interface component files of Revit API.dll and Revit APIUI.dll; for the second development of Bentley Microstation, a NET assembly can be used as Addins to run in Microstation, and three conditions need to be met. Each type of modeling software corresponds to a different development environment. In step 1, the development environment is encapsulated by various modeling software of BIM. The Development Environment refers to a Software Development Environment (SDE), which is a set of Software used for supporting engineering Development and maintenance of system Software and application Software on the basis of basic hardware and digital Software, and is abbreviated as SDE. The system is composed of a software tool and an environment integration mechanism, wherein the former is used for supporting related processes, activities and tasks of software development, and the latter provides uniform support for tool integration and software development, maintenance and management.
In the development environment encapsulation module, different development environments are integrated to form a universal development environment, so that developers do not need to distinguish the corresponding development environments according to different modeling software during software development. The development personnel can directly develop in the development environment after encapsulation, the problem that whether the corresponding development environment is suitable for the modeling software to be used or not is not needed to be considered, and the trouble that the development personnel consider the bottom layer problem is reduced.
A function interface is a module that writes functions (primarily) to other modules. Simply speaking, an interface function is a common function in a class. The method comprises the steps of packaging, namely hiding the attribute and implementation details of an object, only externally disclosing an interface, and controlling the access level of reading and modifying the attribute in a program. Similarly, different modeling software has different function interfaces, so that the function interfaces are packaged in an interface function packaging module to form a uniform function interface, developers do not need to consider the specific types of the function interfaces to be called when developing, and the developers do not need to consider the bottom layer.
The first development module is used for compiling corresponding plug-ins on the basis of the development environment encapsulation module and the interface function encapsulation module, namely on the basis of the general development environment obtained by the development environment encapsulation module and the general interface function obtained by the interface function encapsulation module. The plug-in is a program written by an application program interface following a certain specification. It can only run under the system platform (possibly supporting multiple platforms simultaneously) specified by the program, and cannot run independently from the specified platform. In the second development, the existing software is simply customized and modified, the functions are expanded, and then the functions required by the user are achieved, and generally, the kernel of the original system is not changed. Therefore, the plug-in written by calling the universal interface function in the universal development environment in the first development module has a universal effect, can be suitable for a plurality of encapsulated modeling software, realizes that one plug-in can be suitable for different BIM modeling software by writing, saves development time and reduces work difficulty.
Because the plug-ins on different modeling software need a lot of repeated work due to different platforms, in the first development module, one plug-in can be applicable to a plurality of different modeling software by calling a general interface function in a general development environment, but the plug-ins cannot be directly applied to the corresponding modeling software, and a technical developer is required to modify the plug-ins according to the selected modeling software and by adopting scripts and codes corresponding to the currently selected modeling software so as to adapt to the currently selected modeling software and complete secondary development operation. In the second development module, the general plug-in is adapted to specific modeling software, so that the plug-in can play corresponding functions.
In another embodiment of the present invention, the development environment encapsulation module is further configured to:
determining environment requirements respectively corresponding to various modeling software; and compiling scripts according to the environment requirements respectively corresponding to the modeling software to realize the encapsulation of the development environment of the modeling software of the BIM and obtain the encapsulated general development environment.
Specifically, the method comprises the following steps: determining environment requirements respectively corresponding to various modeling software; that is, different modeling software has different requirements for development environments, and the secondary development for each modeling software needs to be adapted to the environment of the corresponding modeling software, and at the same time, the environment between the modeling software is not general, so that the corresponding environment requirement of each modeling software needs to be determined.
And compiling scripts according to the environment requirements respectively corresponding to the modeling software to realize the encapsulation of the development environment of the modeling software of the BIM and obtain the encapsulated general development environment. Since a script is an extension of a batch file and is a program for storing plain text, a general computer script program is a combination of a specific series of operations for controlling a computer to perform an arithmetic operation, and a certain logical branch can be realized therein. Although different modeling software has different requirements on the environment, the environments cannot completely coexist, so that the environments of various modeling software of the BIM can be packaged in a script writing mode, and a universal development environment can be obtained through packaging, wherein the universal development environment can avoid the unique environment required by each modeling software, and the repeated work of writing can be partially reduced.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. Processor 510 may call logic instructions in memory 530 to perform a general BIM secondary development implementation method, which includes: packaging the development environments of various modeling software of the BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software; packaging interface functions of various modeling software of the BIM to obtain packaged universal interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software; in the universal development environment, compiling a plug-in by calling the universal interface function so as to carry out BIM secondary development; and determining currently selected modeling software, and modifying the plug-in by adopting a script and a code corresponding to the currently selected modeling software to adapt to the currently selected modeling software so as to complete secondary development operation.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the methods provided above to perform a general BIM secondary development implementation method, the method comprising: packaging the development environments of various modeling software of the BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software; packaging interface functions of various modeling software of the BIM to obtain packaged universal interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software; in the universal development environment, compiling a plug-in by calling the universal interface function so as to carry out BIM secondary development; and determining currently selected modeling software, and modifying the plug-in by adopting a script and a code corresponding to the currently selected modeling software to adapt to the currently selected modeling software so as to complete secondary development operation. In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor is implemented to perform the above-mentioned methods for implementing a universal BIM secondary development, the method comprising: packaging the development environments of various modeling software of the BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software; packaging interface functions of various modeling software of the BIM to obtain packaged universal interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software; in the universal development environment, compiling a plug-in by calling the universal interface function so as to carry out BIM secondary development; and determining currently selected modeling software, and modifying the plug-in by adopting a script and a code corresponding to the currently selected modeling software to adapt to the currently selected modeling software so as to complete secondary development operation.
The above-described embodiments of the apparatus are merely illustrative, and 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
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 can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
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 has been described in detail with reference to the foregoing embodiments, it will 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; 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 general BIM secondary development implementation method is characterized by comprising the following steps:
packaging the development environments of various modeling software of the BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software;
packaging interface functions of various modeling software of the BIM to obtain packaged universal interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software;
in the universal development environment, compiling a plug-in by calling the universal interface function so as to carry out BIM secondary development;
and determining currently selected modeling software, and modifying the plug-in by adopting a script and a code corresponding to the currently selected modeling software to adapt to the currently selected modeling software so as to complete secondary development operation.
2. The universal BIM secondary development implementation method of claim 1, wherein the encapsulating the development environments of the various modeling software of the BIM to obtain an encapsulated universal development environment comprises:
determining environment requirements respectively corresponding to various modeling software;
and compiling scripts according to the environment requirements respectively corresponding to the modeling software to realize the encapsulation of the development environment of the modeling software of the BIM and obtain the encapsulated general development environment.
3. The universal BIM secondary development implementation method of claim 1, wherein the encapsulating interface functions of various modeling software of the BIM to obtain encapsulated universal interface functions comprises:
determining interface function requirements respectively corresponding to various modeling software;
and compiling codes according to the interface function requirements respectively corresponding to the modeling software to realize the encapsulation of the interface functions of the modeling software of BIM and obtain the encapsulated universal interface function.
4. The method according to claim 1, wherein in the universal development environment, by calling the universal interface function, a plug-in is written to perform BIM secondary development, including:
and according to the secondary development function to be realized, in the universal development environment, writing a plug-in by calling the universal interface function so as to carry out BIM secondary development.
5. The method of claim 1, wherein the step of determining the currently selected modeling software and the step of modifying the plug-in with the script and the code corresponding to the currently selected modeling software to adapt to the currently selected modeling software are performed to complete a secondary development operation, and comprises:
determining currently selected modeling software, and extracting an environment script corresponding to the currently selected modeling software from the general development environment;
extracting an interface function corresponding to the currently selected modeling software from the general interface functions;
and modifying the plug-in based on the environment script corresponding to the currently selected modeling software and the interface function corresponding to the currently selected modeling software to adapt to the currently selected modeling software, so as to complete secondary development operation.
6. The method for realizing universal BIM secondary development according to any one of claims 1 to 5, wherein the multiple modeling software includes Revit, Microstation, OBD, ORD and CATIA.
7. A general BIM secondary development implementation device is characterized by comprising:
the development environment packaging module is used for packaging the development environments of various modeling software of the BIM to obtain a packaged general development environment; the general development environment comprises environment requirements respectively corresponding to the modeling software;
the interface function encapsulation module is used for encapsulating the interface functions of various modeling software of the BIM to obtain encapsulated general interface functions; the general interface function comprises interface function requirements respectively corresponding to the modeling software;
the first development module is used for compiling plug-ins by calling the universal interface function in the universal development environment so as to carry out BIM secondary development;
and the second development module is used for determining the currently selected modeling software, and modifying the plug-in by adopting the script and the code corresponding to the currently selected modeling software so as to adapt to the currently selected modeling software and finish secondary development operation.
8. The apparatus of claim 7, wherein the development environment encapsulation module is further configured to:
determining environment requirements respectively corresponding to various modeling software;
and compiling scripts according to the environment requirements respectively corresponding to the modeling software to realize the encapsulation of the development environment of the modeling software of the BIM and obtain the encapsulated general development environment.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 6 are implemented when the processor executes the program.
10. A non-transitory computer-readable storage medium, on 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 6.
CN202110362087.7A 2021-04-02 2021-04-02 Universal BIM secondary development implementation method and device Active CN113177292B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110362087.7A CN113177292B (en) 2021-04-02 2021-04-02 Universal BIM secondary development implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110362087.7A CN113177292B (en) 2021-04-02 2021-04-02 Universal BIM secondary development implementation method and device

Publications (2)

Publication Number Publication Date
CN113177292A true CN113177292A (en) 2021-07-27
CN113177292B CN113177292B (en) 2024-02-02

Family

ID=76923057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110362087.7A Active CN113177292B (en) 2021-04-02 2021-04-02 Universal BIM secondary development implementation method and device

Country Status (1)

Country Link
CN (1) CN113177292B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115328544A (en) * 2022-10-14 2022-11-11 统信软件技术有限公司 Environment customization method, computing device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876917A (en) * 2010-07-02 2010-11-03 深圳市迅雷网络技术有限公司 A method and device for developing a control
CN102622241A (en) * 2011-01-26 2012-08-01 腾讯科技(深圳)有限公司 Software upgrading method and software upgrading device
CN104504171A (en) * 2014-11-20 2015-04-08 北京索为高科系统技术有限公司 Modeling method based on unified modeling environment
KR20150134681A (en) * 2014-05-22 2015-12-02 박경란 How to construct the cross-platform-based open BIM system to support a large number of heterogeneous computing platforms and data interoperability between other fields
CN111428289A (en) * 2020-02-26 2020-07-17 中国电力工程顾问集团西南电力设计院有限公司 Design method for ladder stand of hyperbolic cooling tower

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876917A (en) * 2010-07-02 2010-11-03 深圳市迅雷网络技术有限公司 A method and device for developing a control
CN102622241A (en) * 2011-01-26 2012-08-01 腾讯科技(深圳)有限公司 Software upgrading method and software upgrading device
KR20150134681A (en) * 2014-05-22 2015-12-02 박경란 How to construct the cross-platform-based open BIM system to support a large number of heterogeneous computing platforms and data interoperability between other fields
CN104504171A (en) * 2014-11-20 2015-04-08 北京索为高科系统技术有限公司 Modeling method based on unified modeling environment
CN111428289A (en) * 2020-02-26 2020-07-17 中国电力工程顾问集团西南电力设计院有限公司 Design method for ladder stand of hyperbolic cooling tower

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115328544A (en) * 2022-10-14 2022-11-11 统信软件技术有限公司 Environment customization method, computing device and storage medium
CN115328544B (en) * 2022-10-14 2023-02-28 统信软件技术有限公司 Environment customization method, computing device and storage medium

Also Published As

Publication number Publication date
CN113177292B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
US8074218B2 (en) Method and system for constructing virtual resources
US8448132B2 (en) Systems and methods for modifying code generation templates
CN112506500B (en) Visual control creating method and device
CN112148278A (en) Visual block chain intelligent contract framework and intelligent contract development and deployment method
CN115480801B (en) A multi-project development, deployment and operation method and system based on Vue framework
CN101645020A (en) Virtual operating system creation method
JP2005346722A (en) Method and apparatus for generating form using form type
CN115249004A (en) Physical verification method for integrated circuit layout design, electronic device and storage medium
US9824000B1 (en) Testing calling code dynamically with random error injection based on user-specified configuration
CN116679912B (en) Code generation method, apparatus, device, storage medium, and computer program
CN102081520A (en) Method and system for establishing graphical user interface of embedded digital video recorder
CN114064218B (en) Image generation method, system, medium and application for machine learning components
CN113177292B (en) Universal BIM secondary development implementation method and device
WO2022127263A1 (en) Code processing method and related device
CN114911541A (en) Configuration information processing method and device, electronic equipment and storage medium
CN115270220A (en) Aeroengine Simulation System, Method and Device
CN117971782A (en) Mirror image management method and server
CN117008934A (en) Method, device, equipment and medium for automatically making mirror image of information creation operating system
CN115220873A (en) A Method of Running Open Harmony Application in Android System
US11281834B1 (en) Protection of high-level language simulation models
CN114492257A (en) Management and reuse method for random constraint of chip verification test case and storage medium
CN114416305A (en) A method, system and electronic device for realizing a robot engine
US8914274B1 (en) Method and system for instruction set simulation with concurrent attachment of multiple debuggers
CN118426782B (en) Method and device for compiling model file based on CMake tool
CN118860432B (en) Digital prototype RAM deployment and operation method and system

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
GR01 Patent grant
GR01 Patent grant