예제 #1
0
        /// <summary>
        /// XBim Merge
        /// </summary>
        /// <param name="workbook">COBieWorkbook to Serialise</param>
        public void Merge(COBieWorkbook workbook)
        {
            XBimContext.IsMerge  = true; //flag as a merge
            XBimContext.WorkBook = workbook;

            if (!MergeGeometryOnly)
            {
                var xBimContact = new COBieXBimContact(XBimContext);
                xBimContact.SerialiseContacts((COBieSheet <COBieContactRow>)WorkBook[Constants.WORKSHEET_CONTACT]);
            }

            //Make the assumption we are merging on the same building
            //COBieXBimFacility xBimFacility = new COBieXBimFacility(XBimContext);
            //xBimFacility.SerialiseFacility((COBieSheet<COBieFacilityRow>)WorkBook[Constants.WORKSHEET_FACILITY]);

            var xBimFloor = new COBieXBimFloor(XBimContext);

            xBimFloor.SerialiseFloor((COBieSheet <COBieFloorRow>)WorkBook[Constants.WORKSHEET_FLOOR]);

            var xBimSpace = new COBieXBimSpace(XBimContext);

            xBimSpace.SerialiseSpace((COBieSheet <COBieSpaceRow>)WorkBook[Constants.WORKSHEET_SPACE]);

            if (!MergeGeometryOnly)
            {
                var xBimZone = new COBieXBimZone(XBimContext);
                xBimZone.SerialiseZone((COBieSheet <COBieZoneRow>)WorkBook[Constants.WORKSHEET_ZONE]);
            }
            var xBimType = new COBieXBimType(XBimContext);

            xBimType.SerialiseType((COBieSheet <COBieTypeRow>)WorkBook[Constants.WORKSHEET_TYPE]);

            var xBimComponent = new COBieXBimComponent(XBimContext);

            xBimComponent.SerialiseComponent((COBieSheet <COBieComponentRow>)WorkBook[Constants.WORKSHEET_COMPONENT]);

            if (!MergeGeometryOnly)
            {
                var xBimSystem = new COBieXBimSystem(XBimContext);
                xBimSystem.SerialiseSystem((COBieSheet <COBieSystemRow>)WorkBook[Constants.WORKSHEET_SYSTEM]);

                var xBimAssembly = new COBieXBimAssembly(XBimContext);
                xBimAssembly.SerialiseAssembly((COBieSheet <COBieAssemblyRow>)WorkBook[Constants.WORKSHEET_ASSEMBLY]);

                var xBimConnection = new COBieXBimConnection(XBimContext);
                xBimConnection.SerialiseConnection((COBieSheet <COBieConnectionRow>)WorkBook[Constants.WORKSHEET_CONNECTION]);

                var xBimSpare = new COBieXBimSpare(XBimContext);
                xBimSpare.SerialiseSpare((COBieSheet <COBieSpareRow>)WorkBook[Constants.WORKSHEET_SPARE]);

                var xBimResource = new COBieXBimResource(XBimContext);
                xBimResource.SerialiseResource((COBieSheet <COBieResourceRow>)WorkBook[Constants.WORKSHEET_RESOURCE]);

                var xBimJob = new COBieXBimJob(XBimContext);
                xBimJob.SerialiseJob((COBieSheet <COBieJobRow>)WorkBook[Constants.WORKSHEET_JOB]);

                var xBimImpact = new COBieXBimImpact(XBimContext);
                xBimImpact.SerialiseImpact((COBieSheet <COBieImpactRow>)WorkBook[Constants.WORKSHEET_IMPACT]);

                var xBimDocument = new COBieXBimDocument(XBimContext);
                xBimDocument.SerialiseDocument((COBieSheet <COBieDocumentRow>)WorkBook[Constants.WORKSHEET_DOCUMENT]);

                var xBimAttribute = new COBieXBimAttribute(XBimContext);
                xBimAttribute.SerialiseAttribute((COBieSheet <COBieAttributeRow>)WorkBook[Constants.WORKSHEET_ATTRIBUTE]);
            }

            var xBimCoordinate = new COBieXBimCoordinate(XBimContext);

            xBimCoordinate.SerialiseCoordinate((COBieSheet <COBieCoordinateRow>)WorkBook[Constants.WORKSHEET_COORDINATE]);
            if (!MergeGeometryOnly)
            {
                var xBimIssue = new COBieXBimIssue(XBimContext);
                xBimIssue.SerialiseIssue((COBieSheet <COBieIssueRow>)WorkBook[Constants.WORKSHEET_ISSUE]);
            }
        }
예제 #2
0
        /// <summary>
        /// XBim Serialise
        /// </summary>
        /// <param name="workbook">COBieWorkbook to Serialise</param>
        public void Create(COBieWorkbook workbook)
        {
            XBimContext.Reset(); //clear out the dictionaries
            XBimContext.WorkBook = workbook;
            ModelSetUp();

            var xBimContact = new COBieXBimContact(XBimContext);

            xBimContact.SerialiseContacts((COBieSheet <COBieContactRow>)WorkBook[Constants.WORKSHEET_CONTACT]);

            var xBimFacility = new COBieXBimFacility(XBimContext);

            xBimFacility.SerialiseFacility((COBieSheet <COBieFacilityRow>)WorkBook[Constants.WORKSHEET_FACILITY]);

            var xBimFloor = new COBieXBimFloor(XBimContext);

            xBimFloor.SerialiseFloor((COBieSheet <COBieFloorRow>)WorkBook[Constants.WORKSHEET_FLOOR]);

            var xBimSpace = new COBieXBimSpace(XBimContext);

            xBimSpace.SerialiseSpace((COBieSheet <COBieSpaceRow>)WorkBook[Constants.WORKSHEET_SPACE]);

            var xBimZone = new COBieXBimZone(XBimContext);

            xBimZone.SerialiseZone((COBieSheet <COBieZoneRow>)WorkBook[Constants.WORKSHEET_ZONE]);

            var xBimType = new COBieXBimType(XBimContext);

            xBimType.SerialiseType((COBieSheet <COBieTypeRow>)WorkBook[Constants.WORKSHEET_TYPE]);

            var xBimComponent = new COBieXBimComponent(XBimContext);

            xBimComponent.SerialiseComponent((COBieSheet <COBieComponentRow>)WorkBook[Constants.WORKSHEET_COMPONENT]);

            var xBimSystem = new COBieXBimSystem(XBimContext);

            xBimSystem.SerialiseSystem((COBieSheet <COBieSystemRow>)WorkBook[Constants.WORKSHEET_SYSTEM]);

            var xBimAssembly = new COBieXBimAssembly(XBimContext);

            xBimAssembly.SerialiseAssembly((COBieSheet <COBieAssemblyRow>)WorkBook[Constants.WORKSHEET_ASSEMBLY]);

            var xBimConnection = new COBieXBimConnection(XBimContext);

            xBimConnection.SerialiseConnection((COBieSheet <COBieConnectionRow>)WorkBook[Constants.WORKSHEET_CONNECTION]);

            var xBimSpare = new COBieXBimSpare(XBimContext);

            xBimSpare.SerialiseSpare((COBieSheet <COBieSpareRow>)WorkBook[Constants.WORKSHEET_SPARE]);

            var xBimResource = new COBieXBimResource(XBimContext);

            xBimResource.SerialiseResource((COBieSheet <COBieResourceRow>)WorkBook[Constants.WORKSHEET_RESOURCE]);

            var xBimJob = new COBieXBimJob(XBimContext);

            xBimJob.SerialiseJob((COBieSheet <COBieJobRow>)WorkBook[Constants.WORKSHEET_JOB]);

            var xBimImpact = new COBieXBimImpact(XBimContext);

            xBimImpact.SerialiseImpact((COBieSheet <COBieImpactRow>)WorkBook[Constants.WORKSHEET_IMPACT]);

            var xBimDocument = new COBieXBimDocument(XBimContext);

            xBimDocument.SerialiseDocument((COBieSheet <COBieDocumentRow>)WorkBook[Constants.WORKSHEET_DOCUMENT]);

            var xBimAttribute = new COBieXBimAttribute(XBimContext);

            xBimAttribute.SerialiseAttribute((COBieSheet <COBieAttributeRow>)WorkBook[Constants.WORKSHEET_ATTRIBUTE]);

            var xBimCoordinate = new COBieXBimCoordinate(XBimContext);

            xBimCoordinate.SerialiseCoordinate((COBieSheet <COBieCoordinateRow>)WorkBook[Constants.WORKSHEET_COORDINATE]);

            var xBimIssue = new COBieXBimIssue(XBimContext);

            xBimIssue.SerialiseIssue((COBieSheet <COBieIssueRow>)WorkBook[Constants.WORKSHEET_ISSUE]);
        }