Desktop#

class ansys.aedt.core.desktop.Desktop(*args, **kwargs)#

Provides the Ansys Electronics Desktop (AEDT) interface.

Parameters:
versionstr, int, float, optional

Version of AEDT to use. The default is None, in which case the active setup or latest installed version is used. Examples of input values are 252, 25.2,``2025.2``,``”2025.2”``.

non_graphicalbool, optional

Whether to launch AEDT in non-graphical mode. The default is False, in which case AEDT is launched in graphical mode. This parameter is ignored when a script is launched within AEDT.

new_desktopbool, optional

Whether to launch an instance of AEDT in a new thread, even if another instance of the specified_version is active on the machine. The default is True.

close_on_exitbool, optional

Whether to close AEDT on exit. The default is True. This option is used only when Desktop is used in a context manager (with statement). If Desktop is used outside a context manager, see the release_desktop arguments.

student_versionbool, optional

Whether to open the AEDT student version. The default is False.

machinestr, optional

Machine name to connect the oDesktop session to. This parameter works only in 2022 R2 and later. The remote server must be up and running with the command "ansysedt.exe -grpcsrv portnum". If the machine is “localhost”, the server also starts if not present.

portint, optional

Port number on which to start the oDesktop communication on the already existing server. This parameter is ignored when creating a new server. It works only in 2022 R2 and later. The remote server must be up and running with the command “ansysedt.exe -grpcsrv portnum”.

aedt_process_idint, optional

Process ID for the instance of AEDT to point PyAEDT at. The default is None. This parameter is only used when new_desktop = False.

Examples

Launch AEDT 2025 R1 in non-graphical mode and initialize HFSS.

>>> import ansys.aedt.core
>>> desktop = ansys.aedt.core.Desktop(version="2025.2", non_graphical=False)
PyAEDT INFO: pyaedt v...
PyAEDT INFO: Python version ...
>>> hfss = ansys.aedt.core.Hfss(design="HFSSDesign1")
PyAEDT INFO: Project...
PyAEDT INFO: Added design 'HFSSDesign1' of type HFSS.

Launch AEDT 2025 R1 in graphical mode and initialize HFSS.

>>> desktop = Desktop(252)
PyAEDT INFO: pyaedt v...
PyAEDT INFO: Python version ...
>>> hfss = ansys.aedt.core.Hfss(design="HFSSDesign1")
PyAEDT INFO: No project is defined. Project...

Methods

Desktop.active_design([project_object, ...])

Get the active design.

Desktop.active_project([name])

Get the active project.

Desktop.analyze_all([project, design])

Analyze all setups in a project.

Desktop.change_active_dso_config_name([...])

Change a specific registry key to a new value.

Desktop.change_license_type([license_type])

Change the license type.

Desktop.change_registry_from_file(registry_file)

Apply desktop registry settings from an ACF file.

Desktop.change_registry_key(key_full_name, ...)

Change an AEDT registry key to a new value.

Desktop.check_starting_mode()

Desktop.clear_messages()

Clear all AEDT messages.

Desktop.close_desktop()

Close all projects and shut down AEDT.

Desktop.close_windows()

Close all windows.

Desktop.design_list([project])

Get a list of the designs.

Desktop.design_type([project_name, design_name])

Get the type of design.

Desktop.disable_autosave()

Disable the autosave option.

Desktop.disable_optimetrics()

Disable optimetrics.

Desktop.download_job_results(job_id, ...[, ...])

Download job results to a specific folder from Ansys Cloud.

Desktop.enable_autosave()

Enable the autosave option.

Desktop.enable_optimetrics()

Enable optimetrics.

Desktop.get_ansyscloud_job_info([job_id, ...])

Monitor a job submitted to Ansys Cloud.

Desktop.get_available_cloud_config([region])

Get available Ansys Cloud machines configuration.

Desktop.get_available_toolkits()

Get toolkit ready for installation.

Desktop.get_example(example_name[, folder_name])

Retrieve the path to a built-in example project.

Desktop.get_monitor_data()

Check and get monitor data of an existing analysis.

Desktop.load_project(project_file[, design_name])

Open an AEDT project based on a project and optional design.

Desktop.project_path([project_name])

Get the path to the project.

Desktop.release_desktop([close_projects, ...])

Release AEDT.

Desktop.save_project([project_name, ...])

Save the project.

Desktop.select_scheduler(scheduler_type[, ...])

Select a scheduler to submit the job.

Desktop.stop_simulations([clean_stop])

Check if there are simulation running and stops them.

Desktop.submit_ansys_cloud_job(project_file, ...)

Submit a job to be solved on a cluster.

Desktop.submit_job(project_file, clustername)

Submit a job to be solved on a cluster.

Attributes

Desktop.aedt_install_dir

AEDT installation path.

Desktop.aedt_process_id

Desktop.aedt_version_id

Desktop.aedt_version_string

AEDT version string.

Desktop.are_there_simulations_running

Check if there are simulation running.

Desktop.close_on_exit

Whether AEDT will close on exit.

Desktop.current_student_version

Current AEDT student version.

Desktop.current_version

Current AEDT version.

Desktop.grpc_mode

Desktop.install_path

Installation path for AEDT.

Desktop.installed_versions

Dictionary of AEDT versions installed on the system and their installation paths.

Desktop.is_grpc_api

Whether the connection is through gRPC API.

Desktop.launched_by_pyaedt

Flag to check if AEDT was launched by PyAEDT.

Desktop.logger

AEDT logger.

Desktop.machine

Machine name.

Desktop.messenger

Messenger manager for the AEDT logger.

Desktop.new_desktop

Whether a new session will be started or not.

Desktop.non_graphical

Whether AEDT is running in non-graphical mode.

Desktop.odesktop

AEDT instance containing all projects and designs.

Desktop.personallib

PersonalLib directory.

Desktop.port

Port number.

Desktop.project_list

Get a list of projects.

Desktop.public_dir

Shortcut for dir(self).

Desktop.pyaedt_dir

PyAEDT directory.

Desktop.src_dir

Python source directory.

Desktop.student_version

Whether AEDT is the student version.

Desktop.syslib

SysLib directory.

Desktop.userlib

UserLib directory.