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();
     }
 }
Exemple #2
0
 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 void StampXbimApplication(XbimSchemaVersion schemaVersion, IModel model)
        {
            var assembly = model.GetType().GetTypeInfo().Assembly; //get the assembly that has created th emodel

            FileDescription = new StepFileDescription("2;1");
            FileName        = new StepFileName(DateTime.Now)
            {
                PreprocessorVersion =
                    string.Format("Processor version {0}",
                                  assembly.GetName().Version),
                OriginatingSystem = assembly.GetName().Name
            };
            FileSchema = new StepFileSchema(schemaVersion);
        }
Exemple #4
0
 public void StampXbimApplication(IfcSchemaVersion schemaVersion)
 {
     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(schemaVersion);
 }