pyaedt.Desktop

class pyaedt.Desktop(specified_version=None, non_graphical=False, new_desktop_session=True, close_on_exit=True, student_version=False)[source]

Initializes AEDT based on the inputs provided.

Note

On Windows, this class works without limitations in IronPython and CPython. On Linux, this class works only in embedded IronPython in AEDT.

Parameters
specified_versionstr, optional

Version of AEDT to use. The default is None, in which case the active setup or latest installed version is used.

non_graphicalbool, optional

Whether to launch AEDT in the non-graphical mode. The default is False, in which case AEDT is launched in the graphical mode.

new_desktop_sessionbool, 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.

student_versionbool, optional

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

Examples

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

>>> import pyaedt
>>> desktop = pyaedt.Desktop("2021.2", non_graphical=True)
pyaedt info: pyaedt v...
pyaedt info: Python version ...
>>> hfss = pyaedt.Hfss(designname="HFSSDesign1")
pyaedt info: Project...
pyaedt info: Added design 'HFSSDesign1' of type HFSS.

Launch AEDT 2021 R1 in graphical mode and initialize HFSS.

>>> desktop = Desktop("2021.2")
pyaedt info: pyaedt v...
pyaedt info: Python version ...
>>> hfss = pyaedt.Hfss(designname="HFSSDesign1")
pyaedt info: No project is defined. Project...

Methods

Desktop.analyze_all([project, design])

Analyze all setup in a given project.

Desktop.change_active_dso_config_name([…])

Change a specific registry key to new value.

Desktop.change_license_type([license_type])

Change the License Type between Pack and Pool.

Desktop.change_registry_from_file(registry_file)

Apply desktop Registry settings from acf file.

Desktop.change_registry_key(key_full_name, …)

Change a specific registry key to new value.

Desktop.clear_messages()

Clear all desktop messages.

Desktop.close_desktop()

Close all AEDT projects and shut down AEDT.

Desktop.copy_design([project_name, …])

Copy a design.

Desktop.design_list([project])

Design list.

Desktop.design_type([project_name, design_name])

Design list.

Desktop.disable_autosave()

Disable the auto save option.

Desktop.enable_autosave()

Enable the auto save option.

Desktop.force_close_desktop()

Forcibly close all AEDT projects and shut down AEDT.

Desktop.project_list()

Project list.

Desktop.project_path([project_name])

Project path.

Desktop.release_desktop([close_projects, …])

Release AEDT.

Desktop.save_project([project_name, …])

Save project.

Attributes

Desktop.aedt_version_id

AEDT version.

Desktop.current_version

Current version of AEDT.

Desktop.current_version_student

Current student version of AEDT.

Desktop.install_path

Installation path for AEDT.

Desktop.logger

Logger.

Desktop.messenger

Messenger manager for AEDT Log.

Desktop.personallib

PersonalLib directory.

Desktop.pyaedt_dir

PyAEDT directory.

Desktop.src_dir

Source directory for Python.

Desktop.syslib

SysLib directory.

Desktop.userlib

UserLib directory.

Desktop.version_keys

Version keys for AEDT.