parameters: (self)
docstring: Load results of ccx calculations from .dat file.
docstring_summary: Load results of ccx calculations from .dat file.
docstring_tokens: Load results of ccx calculations from . dat file .
function: def load_results_ccxdat(self):
          """Load results of ccx calculations from .dat file.
          """
          import feminout.importCcxDatResults as importCcxDatResults
          dat_result_file = os.path.splitext(self.inp_file_name)[0] + ".dat"
          mode_frequencies = None
          dat_content = None
  
          if os.path.isfile(dat_result_file):
              mode_frequencies = importCcxDatResults.import_dat(dat_result_file, self.analysis)
  
              dat_file = open(dat_result_file, "r")
              dat_content = dat_file.read()
              dat_file.close()
          else:
              FreeCAD.Console.PrintError(
                  "FEM: No dat result file found at {}\n"
                  .format(dat_result_file)
              )
  
          if mode_frequencies:
              # print(mode_frequencies)
              for m in self.analysis.Group:
                  if m.isDerivedFrom("Fem::FemResultObject") and m.Eigenmode > 0:
                      for mf in mode_frequencies:
                          if m.Eigenmode == mf["eigenmode"]:
                              m.EigenmodeFrequency = mf["frequency"]
  
          if dat_content:
              # print(dat_content)
              dat_text_obj = self.analysis.Document.addObject("App::TextDocument", "ccx_dat_file")
              dat_text_obj.Text = dat_content
              dat_text_obj.setPropertyStatus("Text", "ReadOnly")  # set property editor readonly
              if FreeCAD.GuiUp:
                  dat_text_obj.ViewObject.ReadOnly = True  # set editor view readonly
              self.analysis.addObject(dat_text_obj)
function_tokens: def load_results_ccxdat ( self ) : import feminout . importCcxDatResults as importCcxDatResults dat_result_file = os . path . splitext ( self . inp_file_name ) [ 0 ] + ".dat" mode_frequencies = None dat_content = None if os . path . isfile ( dat_result_file ) : mode_frequencies = importCcxDatResults . import_dat ( dat_result_file , self . analysis ) dat_file = open ( dat_result_file , "r" ) dat_content = dat_file . read ( ) dat_file . close ( ) else : FreeCAD . Console . PrintError ( "FEM: No dat result file found at {}\n" . format ( dat_result_file ) ) if mode_frequencies : # print(mode_frequencies) for m in self . analysis . Group : if m . isDerivedFrom ( "Fem::FemResultObject" ) and m . Eigenmode > 0 : for mf in mode_frequencies : if m . Eigenmode == mf [ "eigenmode" ] : m . EigenmodeFrequency = mf [ "frequency" ] if dat_content : # print(dat_content) dat_text_obj = self . analysis . Document . addObject ( "App::TextDocument" , "ccx_dat_file" ) dat_text_obj . Text = dat_content dat_text_obj . setPropertyStatus ( "Text" , "ReadOnly" ) # set property editor readonly if FreeCAD . GuiUp : dat_text_obj . ViewObject . ReadOnly = True # set editor view readonly self . analysis . addObject ( dat_text_obj )