@@ -426,14 +426,18 @@ def __build_export_file_location(self, location: Path | str | None, ext: str) ->
426426 """
427427 return (Path (location ) if location else Path .cwd ()) / f"{ self .name } .{ ext } "
428428
429- def export_to_scdocx (self , location : Path | str | None = None ) -> Path :
429+ def export_to_scdocx (
430+ self , location : Path | str | None = None , write_body_facets : bool = False
431+ ) -> Path :
430432 """Export the design to an scdocx file.
431433
432434 Parameters
433435 ----------
434436 location : ~pathlib.Path | str, optional
435437 Location on disk to save the file to. If None, the file will be saved
436438 in the current working directory.
439+ write_body_facets : bool, default: False
440+ Option to write body facets into the saved file. SCDOCX and DISCO only, 26R1 and later.
437441
438442 Returns
439443 -------
@@ -444,19 +448,23 @@ def export_to_scdocx(self, location: Path | str | None = None) -> Path:
444448 file_location = self .__build_export_file_location (location , "scdocx" )
445449
446450 # Export the design to an scdocx file
447- self .download (file_location , DesignFileFormat .SCDOCX )
451+ self .download (file_location , DesignFileFormat .SCDOCX , write_body_facets )
448452
449453 # Return the file location
450454 return file_location
451455
452- def export_to_disco (self , location : Path | str | None = None ) -> Path :
456+ def export_to_disco (
457+ self , location : Path | str | None = None , write_body_facets : bool = False
458+ ) -> Path :
453459 """Export the design to an dsco file.
454460
455461 Parameters
456462 ----------
457463 location : ~pathlib.Path | str, optional
458464 Location on disk to save the file to. If None, the file will be saved
459465 in the current working directory.
466+ write_body_facets : bool, default: False
467+ Option to write body facets into the saved file. SCDOCX and DISCO only, 26R1 and later.
460468
461469 Returns
462470 -------
@@ -467,7 +475,7 @@ def export_to_disco(self, location: Path | str | None = None) -> Path:
467475 file_location = self .__build_export_file_location (location , "dsco" )
468476
469477 # Export the design to an dsco file
470- self .download (file_location , DesignFileFormat .DISCO )
478+ self .download (file_location , DesignFileFormat .DISCO , write_body_facets )
471479
472480 # Return the file location
473481 return file_location
0 commit comments