@@ -29,6 +29,9 @@ class PowerpointImage(pps.PowerpointShape):
2929 """
3030
3131 _tmp_save_path = ft .join (orp .opencsp_temporary_dir (), "PowerpointImage/images/tmp" )
32+ # _tmp_save_path = ft.join(
33+ # "C:/ctemp", "OpenCSP_example_data/target_identification/HeliostatsSpotSize/3_Process/PowerPointFigures"
34+ # )
3235
3336 def __init__ (
3437 self ,
@@ -636,7 +639,9 @@ def save(self) -> None | str:
636639 # get a temporary name to save to
637640 found_unused_name = False
638641 for tmp_slide_idx in slide_idx_range :
639- max_img_idx = 20 # probably shouldn't need more than 20 images in a slide
642+ max_img_idx = (
643+ 20 # probably shouldn't need more than 20 images in a slide, TODO, marked, revisit 20 image limit
644+ )
640645 dir_name_ext_pattern = self ._get_save_dir_name_ext_pattern (tmp_slide_idx )
641646 max_image_path_name_ext = dir_name_ext_pattern % (max_img_idx - 1 )
642647 if ft .file_exists (max_image_path_name_ext ):
@@ -656,6 +661,7 @@ def save(self) -> None | str:
656661 lt .info (f"saving image to { image_path_name_ext } " )
657662
658663 # save the image
664+ # saved_path, body_ext = self._save(image_path_name_ext) # jhs commented out
659665 saved_path , body_ext = self ._save (image_path_name_ext )
660666 if saved_path != self ._tmp_save_path :
661667 lt .error_and_raise (
@@ -690,8 +696,8 @@ def clear_tmp_save(self):
690696 # TODO verify that the path is the expected temporary path
691697
692698 # delete the saved files
693- ft .delete_file (path_name_ext , error_on_not_exists = False )
694- ft .delete_file (path_name_ext_serialized , error_on_not_exists = False )
699+ # ft.delete_file(path_name_ext, error_on_not_exists=False) # jhs, commented out in order to retain powerpoint figures
700+ # ft.delete_file(path_name_ext_serialized, error_on_not_exists=False)
695701
696702 @classmethod
697703 def clear_tmp_save_all (cls ):
0 commit comments