public StepFileHeader(HeaderCreationMode mode, IModel model) { if (mode == HeaderCreationMode.InitWithXbimDefaults) { var assembly = model.GetType().GetTypeInfo().Assembly; //get the assembly that has created the model FileDescription = new StepFileDescription("2;1"); FileName = new StepFileName(DateTime.Now) { PreprocessorVersion = $"Processor version {assembly.GetName().Version}", OriginatingSystem = assembly.GetName().Name }; FileSchema = new StepFileSchema(); } else { // Please note do not put any value initialisation in here // Any value initialised here is added to ALL models read from IFC // // Any information required before writing a file for schema constraint needs to be checked upon writing // e.g. cfr. _fileDescription.MakeValid(); // FileDescription = new StepFileDescription(); FileName = new StepFileName(); FileSchema = new StepFileSchema(); } }
public StepFileHeader(HeaderCreationMode mode) { if (mode == HeaderCreationMode.InitWithXbimDefaults) { FileDescription = new StepFileDescription("2;1"); FileName = new StepFileName(DateTime.Now) { PreprocessorVersion = string.Format("Xbim File Processor version {0}", Assembly.GetExecutingAssembly().GetName().Version), OriginatingSystem = string.Format("Xbim version {0}", Assembly.GetExecutingAssembly().GetName().Version), }; FileSchema = new StepFileSchema(); } else { // Please note do not put any value initialisation in here // Any value initialised here is added to ALL models read from IFC // // Any information required before writing a file for schema constraint needs to be checked upon writing // e.g. cfr. _fileDescription.MakeValid(); // FileDescription = new StepFileDescription(); FileName = new StepFileName(); FileSchema = new StepFileSchema(); } }
public IfcFileHeader(HeaderCreationMode Mode) { if (Mode == HeaderCreationMode.InitWithXbimDefaults) { FileDescription = new FileDescription("2;1"); FileName = new FileName(DateTime.Now) { PreprocessorVersion = string.Format("Xbim.Ifc File Processor version {0}", Assembly.GetExecutingAssembly().GetName().Version), OriginatingSystem = string.Format("Xbim version {0}", Assembly.GetExecutingAssembly().GetName().Version), }; FileSchema = new FileSchema("IFC2X3"); } else { // Please note do not put any value initialisation in here // Any value initialised here is added to ALL models read from IFC // // Any information required before writing a file for schema constraint needs to be checked upon writing // e.g. cfr. FileDescription.MakeValid(); // FileDescription = new FileDescription(); FileName = new FileName(); FileSchema = new FileSchema(); } }