run#

ansys.aedt.core.modeler.advanced_cad.mcad_assembly.run(config_data: MCADAssembly | dict | str | Path, project_dir: str | None = None, model_dir: str | None = None, version: str | None = None, port: int | None = None, aedt_process_id: int | None = None, student_version: bool = False, app: Hfss | None = None) → str#

Build an MCAD assembly in HFSS from a configuration.

Parameters:
config_datadict | str | pathlib.Path

Assembly configuration dictionary or path to a JSON configuration file.

project_dirstr, optional

Output directory for the generated AEDT project. When omitted, a temporary directory is created.

model_dirstr, optional

Base directory used to resolve relative model paths from the configuration.

versionstr, optional

AEDT version to use. When omitted, the active configured version is used.

portint, optional

gRPC port of an existing AEDT session.

aedt_process_idint, optional

Process identifier of an existing AEDT session.

student_versionbool, optional

Whether to connect to a student version of AEDT.

appansys.aedt.core.hfss.Hfss, optional

Existing HFSS instance to reuse instead of creating a new session.

Returns:
str

Path to the directory containing the generated AEDT project.

Examples

>>> hfss = Hfss(version="2026.1")
>>> run(config_data="config_2.json", app=hfss)
>>> hfss.release_desktop(close_desktop=False, close_projects=False)