## 4 Program Development and Platform Building  
This section is divided into two stages of development: Information Collection and Programming Integration (Figure 2). According to the preliminary findings, if the BIM models of historic buildings are directly imported into the game engine, the model should undergo format conversion before being imported into the game engine, which is prone to information omission, meaning it would lose the information-rich advantages of the BIM model and the significance of platform development. Therefore, this study proposed an information collection method to accurately extract the restoration information from the BIM model of existing historic buildings and added new information fields required for classification and sorting, to ensure that the non-geometric semantic information in the BIM model can be retained as completely as possible during conversion for import into the Unity platform. Then, the extracted geometric model and non-geometric semantic information in the Unity3D game engine environment were re-integrated at the following programming integration stage to improve the accuracy of information conversion across platforms. The information collection work is divided into two projects (Figure 2): collection of the geometric model (refer to the circle number 1 marked on the left in Figure 2), which involves the export of material and volume, and the collection of non-geometric semantic information (refer to the circle number 2 marked on the left in Figure 2) in geometric models, such as restoration records, model data, and other information, which are both exported in effective formats and imported into the Unity 3D game engine together for integration (refer to the circle number 1 and 2, marked on the upper right in Figure 2). Information collection can reduce the omission and unsupported formats of information caused by cross-platform conversion during the import of information models into the game environment. Figure 1: Flowchart of interactive platform construction and interface design. This study employed Dynamo, the plug-in software of Revit, to collect non-geometric semantic information at the experimental stage, in order to determine the standardized conversion principles, such as the file format and unit required for importing BIM into the game engine through preliminary experiments. The Dynamo plug-in has the advantage of directly capturing the parameters of Revit model components and writing the behavioral scripts in a visual manner. Moreover, the scripts can also be written in a literal programming language, which is easier to use and serves as references for information structure and formatting for further development of advanced information collection solutions. In addition to information collection, Dynamo can be used to import the information to be updated in the Unity platform into the Revit model again in the Excel format (Figure 3), and the information can be updated in both directions. However, for both information collection and subsequent updating, the Dynamo plug-in program must be re-executed for each collection task, and no expected action will be completed until the execution button is pressed, which is relatively inconvenient for the operator, and renders the workflow more complex and the subsequent application development function less free. Therefore, Visual Studio was used for advanced development at the second stage of this study, where the information collection package of non-geometric semantics is subject to parameter collection and format conversion by capturing the parameters of the components through the Visual Studio program of Revit's plug-in programming interface (API) (Figure 4). Thus, users only need to click the export model information button built in the Revit's plug-in application panel to complete information collection, which simultaneously uploads the semantic model information to the cloud service framework  
Figure 3: Flowchart of Dynamo’s information collection and bi-directional updating.