@@ -359,8 +359,8 @@ int WriteGeneratedCode(StreamWriter outF, ProcessPsetDefinition procPsetDef, str
359359 setDescription = "PropertySetDescription" ;
360360 break ;
361361 case "Ifc" :
362- initPsetOrQsets = "InitPredefinedPropertySets " ;
363- setDescription = "PropertySetDescription " ;
362+ initPsetOrQsets = "InitPreDefinedPropertySets " ;
363+ setDescription = "PreDefinedPropertySetDescription " ;
364364 break ;
365365 case "Qto" :
366366 initPsetOrQsets = "InitQtoSets" ;
@@ -404,10 +404,12 @@ int WriteGeneratedCode(StreamWriter outF, ProcessPsetDefinition procPsetDef, str
404404 string varName = null ;
405405 string setsName = null ;
406406 string psetName = psetDefEntry . Key ;
407+ string certificationCheckName = null ;
407408 switch ( whichCat )
408409 {
409410 case "Pset" :
410411 setsName = "commonPropertySets" ;
412+ certificationCheckName = "AllowPsetToBeCreated" ;
411413 outF . WriteLine ( " private static void Init" + psetName + "(IList<{0}> {1})" , setDescription , setsName ) ;
412414 varName = psetDefEntry . Key . Replace ( "Pset_" , "propertySet" ) ;
413415 outF . WriteLine ( " {" ) ;
@@ -417,15 +419,17 @@ int WriteGeneratedCode(StreamWriter outF, ProcessPsetDefinition procPsetDef, str
417419 break ;
418420 case "Ifc" :
419421 setsName = "commonPropertySets" ;
422+ certificationCheckName = "AllowPredefPsetToBeCreated" ;
420423 outF . WriteLine ( " private static void Init" + psetName + "(IList<{0}> {1})" , setDescription , setsName ) ;
421424 varName = psetDefEntry . Key . Replace ( "Pset_" , "propertySet" ) ;
422425 outF . WriteLine ( " {" ) ;
423426 outF . WriteLine ( " {0} {1} = new {0}();" , setDescription , varName ) ;
424427 outF . WriteLine ( " {0}.Name = \" {1}\" ;" , varName , psetName ) ;
425- outF . WriteLine ( " PropertySetEntry ifcPSE = null;" ) ;
428+ outF . WriteLine ( " PreDefinedPropertySetEntry ifcPSE = null;" ) ;
426429 break ;
427430 case "Qto" :
428431 setsName = "quantitySets" ;
432+ certificationCheckName = "AllowPsetToBeCreated" ;
429433 outF . WriteLine ( " private static void Init" + psetName + "(IList<{0}> {1})" , setDescription , setsName ) ;
430434 varName = psetDefEntry . Key . Replace ( "Qto_" , "qtoSet" ) ;
431435 outF . WriteLine ( " {" ) ;
@@ -446,7 +450,7 @@ int WriteGeneratedCode(StreamWriter outF, ProcessPsetDefinition procPsetDef, str
446450
447451 if ( vspecPDef . IfcVersion . StartsWith ( "IFC2X2" , StringComparison . CurrentCultureIgnoreCase ) )
448452 {
449- outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs2x2 && certifiedEntityAndPsetList.AllowPsetToBeCreated (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
453+ outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs2x2 && certifiedEntityAndPsetList." + certificationCheckName + " (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
450454 outF . WriteLine ( " {" ) ;
451455 foreach ( string applEnt in vspecPDef . PropertySetDef . ApplicableClasses )
452456 {
@@ -463,7 +467,7 @@ int WriteGeneratedCode(StreamWriter outF, ProcessPsetDefinition procPsetDef, str
463467 else if ( vspecPDef . IfcVersion . StartsWith ( "IFC2X3" , StringComparison . CurrentCultureIgnoreCase )
464468 || vspecPDef . IfcVersion . Equals ( "IFC2X3_TC1" , StringComparison . CurrentCultureIgnoreCase ) )
465469 {
466- outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs2x3 && certifiedEntityAndPsetList.AllowPsetToBeCreated (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
470+ outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs2x3 && certifiedEntityAndPsetList." + certificationCheckName + " (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
467471 outF . WriteLine ( " {" ) ;
468472 foreach ( string applEnt in vspecPDef . PropertySetDef . ApplicableClasses )
469473 {
@@ -479,7 +483,7 @@ int WriteGeneratedCode(StreamWriter outF, ProcessPsetDefinition procPsetDef, str
479483 }
480484 else if ( vspecPDef . SchemaFileVersion . Equals ( "IFC4_ADD1" , StringComparison . CurrentCultureIgnoreCase ) )
481485 {
482- outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs4_ADD1 && certifiedEntityAndPsetList.AllowPsetToBeCreated (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
486+ outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs4_ADD1 && certifiedEntityAndPsetList." + certificationCheckName + " (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
483487 outF . WriteLine ( " {" ) ;
484488 foreach ( string applEnt in vspecPDef . PropertySetDef . ApplicableClasses )
485489 {
@@ -495,7 +499,7 @@ int WriteGeneratedCode(StreamWriter outF, ProcessPsetDefinition procPsetDef, str
495499 }
496500 else if ( vspecPDef . SchemaFileVersion . Equals ( "IFC4_ADD2" , StringComparison . CurrentCultureIgnoreCase ) )
497501 {
498- outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs4 && certifiedEntityAndPsetList.AllowPsetToBeCreated (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
502+ outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs4 && certifiedEntityAndPsetList." + certificationCheckName + " (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
499503 outF . WriteLine ( " {" ) ;
500504 foreach ( string applEnt in vspecPDef . PropertySetDef . ApplicableClasses )
501505 {
@@ -511,7 +515,7 @@ int WriteGeneratedCode(StreamWriter outF, ProcessPsetDefinition procPsetDef, str
511515 }
512516 else if ( vspecPDef . SchemaFileVersion . Equals ( "IFC4" , StringComparison . CurrentCultureIgnoreCase ) )
513517 {
514- outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs4 && certifiedEntityAndPsetList.AllowPsetToBeCreated (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
518+ outF . WriteLine ( " if (ExporterCacheManager.ExportOptionsCache.ExportAs4 && certifiedEntityAndPsetList." + certificationCheckName + " (ExporterCacheManager.ExportOptionsCache.FileVersion.ToString().ToUpper(), \" " + psetName + "\" ))" ) ;
515519 outF . WriteLine ( " {" ) ;
516520 foreach ( string applEnt in vspecPDef . PropertySetDef . ApplicableClasses )
517521 {
0 commit comments