public void convertIfcFile(String ifcFilePath, String Arg3 = "-ifcxml") { System.Console.WriteLine("begin convert"); if (_ifcModel != IntPtr.Zero && !String.Empty.Equals(path)) { switch (Arg3) { case "-xml": // for IFC4 String fullFileName = String.Concat(System.IO.Path.GetFileNameWithoutExtension(ifcFilePath), ".xml"); _ifcEngine.SaveModelAsSimpleXmlUnicode(_ifcModel, @String.Concat(path, @"/" + fullFileName)); break; case "-ifcxml": // for IFC2X3 fullFileName = String.Concat(System.IO.Path.GetFileNameWithoutExtension(ifcFilePath), ".ifcxml"); _ifcEngine.SaveModelAsXmlUnicode(_ifcModel, @String.Concat(path, @"/" + fullFileName)); break; default: throw new Exception("incorrect output file format"); } } System.Console.WriteLine("end convert"); }