parameters: (self,idx=0)
docstring: Add an IFC property set to the object, within the IFC editor.
  
          This method runs as a callback when the user selects a property set
          within the Add property set dropdown.
  
          Add the property set selected in the dropdown, then check the property
          set definitions for the property set's standard properties, and add
          them with blank values to the new property set.
  
          Parameters
          ----------
          idx: int
              The index of the options selected from the Add property set
              dropdown.
docstring_summary: Add an IFC property set to the object, within the IFC editor.
docstring_tokens: Add an IFC property set to the object within the IFC editor .
function: def addIfcPset(self,idx=0):
          """Add an IFC property set to the object, within the IFC editor.
  
          This method runs as a callback when the user selects a property set
          within the Add property set dropdown.
  
          Add the property set selected in the dropdown, then check the property
          set definitions for the property set's standard properties, and add
          them with blank values to the new property set.
  
          Parameters
          ----------
          idx: int
              The index of the options selected from the Add property set
              dropdown.
          """
  
          if hasattr(self,"ifcEditor") and self.ifcEditor:
              if idx == 1:
                  top = QtGui.QStandardItem(QtGui.QApplication.translate("Arch", "New property set", None))
                  top.setDragEnabled(False)
                  top.setToolTip("PropertySet")
                  self.ifcModel.appendRow([top,QtGui.QStandardItem(),QtGui.QStandardItem()])
              elif idx > 1:
                  psetlabel = self.psetkeys[idx-2]
                  psetdef = "Pset_"+psetlabel.replace(" ","")
                  if psetdef in self.psetdefs:
                      top = QtGui.QStandardItem(psetdef)
                      top.setDragEnabled(False)
                      top.setToolTip("PropertySet")
                      self.ifcModel.appendRow([top,QtGui.QStandardItem(),QtGui.QStandardItem()])
                      for i in range(0,len(self.psetdefs[psetdef]),2):
                          self.addIfcProperty(pset=top,prop=self.psetdefs[psetdef][i],ptype=self.psetdefs[psetdef][i+1])
              if idx != 0:
                  # span top levels
                  idx = self.ifcModel.invisibleRootItem().index()
                  for i in range(self.ifcModel.rowCount()):
                      if self.ifcModel.item(i,0).hasChildren():
                          self.ifcEditor.treeProperties.setFirstColumnSpanned(i, idx, True)
                  self.ifcEditor.treeProperties.expandAll()
                  self.ifcEditor.comboPset.setCurrentIndex(0)
function_tokens: def addIfcPset ( self , idx = 0 ) : if hasattr ( self , "ifcEditor" ) and self . ifcEditor : if idx == 1 : top = QtGui . QStandardItem ( QtGui . QApplication . translate ( "Arch" , "New property set" , None ) ) top . setDragEnabled ( False ) top . setToolTip ( "PropertySet" ) self . ifcModel . appendRow ( [ top , QtGui . QStandardItem ( ) , QtGui . QStandardItem ( ) ] ) elif idx > 1 : psetlabel = self . psetkeys [ idx - 2 ] psetdef = "Pset_" + psetlabel . replace ( " " , "" ) if psetdef in self . psetdefs : top = QtGui . QStandardItem ( psetdef ) top . setDragEnabled ( False ) top . setToolTip ( "PropertySet" ) self . ifcModel . appendRow ( [ top , QtGui . QStandardItem ( ) , QtGui . QStandardItem ( ) ] ) for i in range ( 0 , len ( self . psetdefs [ psetdef ] ) , 2 ) : self . addIfcProperty ( pset = top , prop = self . psetdefs [ psetdef ] [ i ] , ptype = self . psetdefs [ psetdef ] [ i + 1 ] ) if idx != 0 : # span top levels idx = self . ifcModel . invisibleRootItem ( ) . index ( ) for i in range ( self . ifcModel . rowCount ( ) ) : if self . ifcModel . item ( i , 0 ) . hasChildren ( ) : self . ifcEditor . treeProperties . setFirstColumnSpanned ( i , idx , True ) self . ifcEditor . treeProperties . expandAll ( ) self . ifcEditor . comboPset . setCurrentIndex ( 0 )