コード例 #1
0
        /// <summary>
        /// Procees an IFC schema from the IFCXML schema
        /// </summary>
        /// <param name="f">IFCXML schema file</param>
        private void processSchema(FileInfo f)
        {
            IfcSchemaEntityTree entityTree = new IfcSchemaEntityTree();

            ProcessIFCXMLSchema.ProcessIFCSchema(f, ref entityTree);

            string schemaName = f.Name.Replace(".xsd", "");

            if (checkBox_outputSchemaTree.IsChecked == true)
            {
                string treeDump = entityTree.DumpTree();
                File.WriteAllText(outputFolder + @"\entityTree" + schemaName + ".txt", treeDump);
            }

            if (checkBox_outputSchemaEnum.IsChecked == true)
            {
                string dictDump = entityTree.DumpEntityDict(schemaName);
                File.WriteAllText(outputFolder + @"\entityEnum" + schemaName + ".cs", dictDump);
            }

            // Add aggregate of the entity list into a set
            foreach (KeyValuePair <string, IfcSchemaEntityNode> entry in entityTree.IfcEntityDict)
            {
                aggregateEntities.Add(entry.Key);
            }
        }