get_example#
- Desktop.get_example(example_name, folder_name='.')#
Retrieve the path to a built-in example project.
- Parameters:
- Returns:
pathlib.PathReturn the path to the example file if found, otherwise
None.
Examples
Create a copy of a built-in example.
>>> import shutil >>> from ansys.aedt.core import Desktop >>> from pathlib import Path >>> working_folder = Path("C:") / "path" / "to" / "target_folder" # Windows >>> d = Desktop(version=252) >>> example_path = d.get_example("5G_SIW_Aperture_Antenna") >>> new_project = working_folder / example_path.name >>> working_folder.mkdir(parents=True, exist_ok=True) >>> shutil.copytree(example_path, new_project) # Copy example to new working folder.