Пример #1
0
    def read(self):
        """
        Read the IDF file and the IDD file. If the IDD file had already been
        read, it will not be read again.

        Read populates the following data structures:

        - idfobjects : list
        - model : list
        - idd_info : list
        - idd_index : dict

        """
        if self.getiddname() == None:
            errortxt = ("IDD file needed to read the idf file. "
                        "Set it using IDF.setiddname(iddfile)")
            raise IDDNotSetError(errortxt)
        readout = idfreader1(self.idfname,
                             self.iddname,
                             self,
                             commdct=self.idd_info,
                             block=self.block)
        (self.idfobjects, block, self.model, idd_info, idd_index,
         idd_version) = readout
        self.__class__.setidd(idd_info, idd_index, block, idd_version)
Пример #2
0
        cls.block = block
    def read(self):
        """read the idf file and the idd file.
        If the idd file had been already read, it will not be read again.
        Read populates the following data structures:

        - idfobjects
        - model
        - idd_info # done only once"""
        # TODO unit test
        if self.getiddname() == None:
            errortxt = "IDD file needed to read the idf file. Set it using IDF.setiddname(iddfile)"
            raise IDDNotSetError(errortxt)
        readout = idfreader1(
            self.idfname, self.iddname,
            commdct=self.idd_info, block=self.block)
        self.idfobjects, block, self.model, idd_info = readout
Пример #3
0
        cls.block = block
    def read(self):
        """read the idf file and the idd file.
        If the idd file had been already read, it will not be read again.
        Read populates the following data structures:

        - idfobjects
        - model
        - idd_info # done only once"""
        # TODO unit test
        if self.getiddname() == None:
            errortxt = "IDD file needed to read the idf file. Set it using IDF.setiddname(iddfile)"
            raise IDDNotSetError(errortxt)
        readout = idfreader1(
            self.idfname, self.iddname,
            commdct=self.idd_info, block=self.block)
        self.idfobjects, block, self.model, idd_info = readout
Пример #4
0
    def read(self):
        """
        Read the IDF file and the IDD file. If the IDD file had already been
        read, it will not be read again.

        Read populates the following data structures:

        - idfobjects : list
        - model : list
        - idd_info : list
        - idd_index : dict

        """
        if self.getiddname() == None:
            errortxt = ("IDD file needed to read the idf file. "
                        "Set it using IDF.setiddname(iddfile)")
            raise IDDNotSetError(errortxt)
        readout = idfreader1(
            self.idfname, self.iddname, self,
            commdct=self.idd_info, block=self.block)
        self.idfobjects, block, self.model, idd_info, idd_index = readout
        self.__class__.setidd(idd_info, idd_index, block)