Menu

Use given Spreadsheet

2024-12-28
2025-01-10
  • Oliver Sacher

    Oliver Sacher - 2024-12-28

    Hello everybody,

    I am trying to solve a flowsheet by using an external python script. I created a base-flowsheet structure with internal Scrpits and a Spreadsheet. My goal ist to use this flowsheet as base for multiple case-studies.
    So far everything works fine except from the spreadsheet.
    After running the calculation and saving the Flowsheet to a new file-path the Spreadsheet is completely empty.
    This is how I run and save my Flowsheet:

    errors = self.manager.CalculateFlowsheet4(self.current_flowsheet)
    self.manager.SaveFlowsheet(self.current_flowsheet, self.path_for_new_flowsheet, True)
    

    Is there any way to take over the complete Spreadsheet from current flowsheet with updated flowsheet object properties ?
    I tried the folowwing code but got the AttributeError "'IFlowsheet' object has no attribute 'FormSpreadsheet'":

    Spreadsheet = self.current_flowsheet.FormSpreadsheet
    

    My current flowsheet is defined like this:

    self.current_flowsheet = self.manager.LoadFlowsheet(os.path.join(self.path_simulation_file_dir, "conv_CB-EB_50-50_1-1.dwxmz"))
    
     
  • Daniel Medeiros

    Daniel Medeiros - 2024-12-28

    Are you using DWSIM v8.8.3 and Automation3()?

     
  • Oliver Sacher

    Oliver Sacher - 2024-12-28

    I am using DWSIM v8.8.2 and Automation3().

     

    Last edit: Oliver Sacher 2024-12-28
  • Oliver Sacher

    Oliver Sacher - 2025-01-10

    Is there any way ?

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.