create_em_target_design#

Q2d.create_em_target_design(design: str, setup: str | None = None, design_setup: str | None = None) bool#

Create an EM Target design.

Parameters:
designstr

Name of the target design. Possible choices are "Icepak" or``”Mechanical”``.

setupstr, optional

Name of the EM setup to link to the target design. The default is None, in which case the LastAdaptive setup is used.

design_setupstr, optional

For Icepak designs, specify "Forced" for forced convention or "Natural" for natural convention. The default is None, in which case the "Forced" option is used.

Returns:
bool

True when successful, False when failed.

References

>>> oDesign.CreateEMLossTarget

Examples

>>> from ansys.aedt.core import Maxwell3d, Mechanical
>>> from ansys.aedt.core.generic.aedt_constants import IcepakFeaConstants
>>> m3d = Maxwell3d(version="2026.1")
From 2026.1 Mechanical has been renamed to IcepakFEA.
The target design must be passed through the IcepakFeaConstants metaclass.
This will automatically detect the AEDT version and pass the correct design name to the API.
>>> m3d.create_em_target_design(design=IcepakFeaConstants.NAME)
>>> mechanical = Mechanical(version="2026.1")
>>> mechanical.release_desktop(False, False)