parameters: ()
return_statement: return preferences
docstring: Retrieve the IFC preferences available in import and export.
  
      MERGE_MODE_ARCH:
          0 = parametric arch objects
          1 = non-parametric arch objects
          2 = Part shapes
          3 = One compound per storey
docstring_summary: Retrieve the IFC preferences available in import and export.
docstring_tokens: Retrieve the IFC preferences available in import and export .
function: def getPreferences():
      """Retrieve the IFC preferences available in import and export.
  
      MERGE_MODE_ARCH:
          0 = parametric arch objects
          1 = non-parametric arch objects
          2 = Part shapes
          3 = One compound per storey
      """
      p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
  
      if FreeCAD.GuiUp and p.GetBool("ifcShowDialog", False):
          Gui.showPreferences("Import-Export", 0)
  
      preferences = {
          'DEBUG': p.GetBool("ifcDebug", False),
          'PREFIX_NUMBERS': p.GetBool("ifcPrefixNumbers", False),
          'SKIP': p.GetString("ifcSkip", "").split(","),
          'SEPARATE_OPENINGS': p.GetBool("ifcSeparateOpenings", False),
          'ROOT_ELEMENT': p.GetString("ifcRootElement", "IfcProduct"),
          'GET_EXTRUSIONS': p.GetBool("ifcGetExtrusions", False),
          'MERGE_MATERIALS': p.GetBool("ifcMergeMaterials", False),
          'MERGE_MODE_ARCH': p.GetInt("ifcImportModeArch", 0),
          'MERGE_MODE_STRUCT': p.GetInt("ifcImportModeStruct", 1),
          'CREATE_CLONES': p.GetBool("ifcCreateClones", True),
          'IMPORT_PROPERTIES': p.GetBool("ifcImportProperties", False),
          'SPLIT_LAYERS': p.GetBool("ifcSplitLayers", False),  # wall layer, not layer for visual props
          'FITVIEW_ONIMPORT': p.GetBool("ifcFitViewOnImport", False),
          'ALLOW_INVALID': p.GetBool("ifcAllowInvalid", False),
          'REPLACE_PROJECT': p.GetBool("ifcReplaceProject", False),
          'MULTICORE': p.GetInt("ifcMulticore", 0),
          'IMPORT_LAYER': p.GetBool("ifcImportLayer", True)
      }
  
      if preferences['MERGE_MODE_ARCH'] > 0:
          preferences['SEPARATE_OPENINGS'] = False
          preferences['GET_EXTRUSIONS'] = False
      if not preferences['SEPARATE_OPENINGS']:
          preferences['SKIP'].append("IfcOpeningElement")
  
      return preferences
function_tokens: def getPreferences ( ) : p = FreeCAD . ParamGet ( "User parameter:BaseApp/Preferences/Mod/Arch" ) if FreeCAD . GuiUp and p . GetBool ( "ifcShowDialog" , False ) : Gui . showPreferences ( "Import-Export" , 0 ) preferences = { 'DEBUG' : p . GetBool ( "ifcDebug" , False ) , 'PREFIX_NUMBERS' : p . GetBool ( "ifcPrefixNumbers" , False ) , 'SKIP' : p . GetString ( "ifcSkip" , "" ) . split ( "," ) , 'SEPARATE_OPENINGS' : p . GetBool ( "ifcSeparateOpenings" , False ) , 'ROOT_ELEMENT' : p . GetString ( "ifcRootElement" , "IfcProduct" ) , 'GET_EXTRUSIONS' : p . GetBool ( "ifcGetExtrusions" , False ) , 'MERGE_MATERIALS' : p . GetBool ( "ifcMergeMaterials" , False ) , 'MERGE_MODE_ARCH' : p . GetInt ( "ifcImportModeArch" , 0 ) , 'MERGE_MODE_STRUCT' : p . GetInt ( "ifcImportModeStruct" , 1 ) , 'CREATE_CLONES' : p . GetBool ( "ifcCreateClones" , True ) , 'IMPORT_PROPERTIES' : p . GetBool ( "ifcImportProperties" , False ) , 'SPLIT_LAYERS' : p . GetBool ( "ifcSplitLayers" , False ) , # wall layer, not layer for visual props 'FITVIEW_ONIMPORT' : p . GetBool ( "ifcFitViewOnImport" , False ) , 'ALLOW_INVALID' : p . GetBool ( "ifcAllowInvalid" , False ) , 'REPLACE_PROJECT' : p . GetBool ( "ifcReplaceProject" , False ) , 'MULTICORE' : p . GetInt ( "ifcMulticore" , 0 ) , 'IMPORT_LAYER' : p . GetBool ( "ifcImportLayer" , True ) } if preferences [ 'MERGE_MODE_ARCH' ] > 0 : preferences [ 'SEPARATE_OPENINGS' ] = False preferences [ 'GET_EXTRUSIONS' ] = False if not preferences [ 'SEPARATE_OPENINGS' ] : preferences [ 'SKIP' ] . append ( "IfcOpeningElement" ) return preferences