TwinBuilder#

class ansys.aedt.core.twinbuilder.TwinBuilder(project=None, design=None, solution_type=None, setup=None, version=None, non_graphical=False, new_desktop=False, close_on_exit=False, student_version=False, machine='', port=0, aedt_process_id=None, remove_lock=False)#

Provides the Twin Builder application interface.

Parameters:
projectstr, optional

Name of the project to select or the full path to the project or AEDTZ archive to open. The default is None, in which case an attempt is made to get an active project. If no projects are present, an empty project is created.

designstr, optional

Name of the design to select. The default is None, in which case an attempt is made to get an active design. If no designs are present, an empty design is created.

solution_typestr, optional

Solution type to apply to the design. The default is None, in which case the default type is applied.

setupstr, optional

Name of the setup to use as the nominal. The default is None, in which case the active setup is used or nothing is used.

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 232, 23.2,``2023.2``,``”2023.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 False.

close_on_exitbool, optional

Whether to release AEDT on exit. The default is False.

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 works only in 2022 R2 or 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 an already existing server. This parameter is ignored when creating a new server. It works only in 2022 R2 or later. The remote server must be up and running with 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.

remove_lockbool, optional

Whether to remove lock to project before opening it or not. The default is False, which means to not unlock the existing project if needed and raise an exception.

Examples

Create an instance of Twin Builder and connect to an existing Maxwell design or create a new Maxwell design if one does not exist.

>>> from ansys.aedt.core import TwinBuilder
>>> app = TwinBuilder()

Create a instance of Twin Builder and link to a project named "projectname". If this project does not exist, create one with this name.

>>> app = TwinBuilder(projectname)

Create an instance of Twin Builder and link to a design named "designname" in a project named "projectname".

>>> app = TwinBuilder(projectname, designame)

Create an instance of Twin Builder and open the specified project, which is named "myfile.aedt".

>>> app = TwinBuilder("myfile.aedt")

Methods

TwinBuilder.activate_variable_optimization(name)

Activate optimization analysis for a variable and optionally set up ranges.

TwinBuilder.activate_variable_sensitivity(name)

Activate sensitivity analysis for a variable and optionally set up ranges.

TwinBuilder.activate_variable_statistical(name)

Activate statitistical analysis for a variable and optionally set up ranges.

TwinBuilder.activate_variable_tuning(name[, ...])

Activate tuning analysis for a variable and optionally set up ranges.

TwinBuilder.add_error_message(text[, level])

Add a type 0 "Error" message to either the global, active project, or active design level of the message mmanager tree.

TwinBuilder.add_excitation_model(project, design)

Use the excitation component to assign output quantities in a Twin Builder design to a windings in a Maxwell design.

TwinBuilder.add_from_toolkit(toolkit[, draw])

Add a new toolkit to the current application.

TwinBuilder.add_info_message(text[, level])

Add a type 0 "Info" message to either the global, active project, or active design level of the message manager tree.

TwinBuilder.add_q3d_dynamic_component(...[, ...])

Add a Q2D or Q3D dynamic component to a Twin Builder design.

TwinBuilder.add_warning_message(text[, level])

Add a type 0 "Warning" message to either the global, active project, or active design level of the message manager tree.

TwinBuilder.analyze([setup, cores, tasks, ...])

Solve the active design.

TwinBuilder.analyze_setup([name, cores, ...])

Analyze a design setup.

TwinBuilder.archive_project([project_path, ...])

Archive the AEDT project and add a message.

TwinBuilder.autosave_disable()

Disable autosave in AEDT.

TwinBuilder.autosave_enable()

Enable autosave in AEDT.

TwinBuilder.change_automatically_use_causal_materials([...])

Enable or disable the automatic use of causal materials for lossy dielectrics.

TwinBuilder.change_design_settings(settings)

Set Design Settings.

TwinBuilder.change_material_override([...])

Enable or disable the material override in the project.

TwinBuilder.change_property(aedt_object, ...)

Change a property.

TwinBuilder.change_validation_settings([...])

Update the validation design settings.

TwinBuilder.check_beta_option_enabled(...)

Check if a beta option is enabled.

TwinBuilder.check_if_project_is_loaded(...)

Check if a project path is already loaded in active Desktop.

TwinBuilder.clean_proj_folder([directory, name])

Delete a project folder.

TwinBuilder.close_desktop()

Close AEDT and release it.

TwinBuilder.close_project([name, save])

Close an AEDT project.

TwinBuilder.copy_design_from(project, design)

Copy a design from a project into the active project.

TwinBuilder.copy_project(destination, name)

Copy the project to another destination.

TwinBuilder.create_dataset(name, x, y[, z, ...])

Create a dataset.

TwinBuilder.create_dataset1d_design(name, x, y)

Create a design dataset.

TwinBuilder.create_dataset1d_project(name, x, y)

Create a project dataset.

TwinBuilder.create_dataset3d(name, x, y[, ...])

Create a 3D dataset.

TwinBuilder.create_new_project(name)

Create a project within AEDT.

TwinBuilder.create_output_variable(variable, ...)

Create or modify an output variable.

TwinBuilder.create_schematic_from_netlist(...)

Create a circuit schematic from an HSpice net list.

TwinBuilder.create_setup([name, setup_type])

Create a setup.

TwinBuilder.create_subsheet(name, design_name)

Create a subsheet from a parent design.

TwinBuilder.dataset_exists(name[, ...])

Check if a dataset exists.

TwinBuilder.deactivate_variable_optimization(name)

Deactivate the optimization analysis for a variable.

TwinBuilder.deactivate_variable_sensitivity(name)

Deactivate the sensitivity analysis for a variable.

TwinBuilder.deactivate_variable_statistical(name)

Deactivate the statistical analysis for a variable.

TwinBuilder.deactivate_variable_tuning(name)

Deactivate the tuning analysis for a variable.

TwinBuilder.delete_design([name, ...])

Delete a design from the current project.

TwinBuilder.delete_project(name)

Delete a project.

TwinBuilder.delete_separator(name)

Delete a separator from either the active project or a design.

TwinBuilder.delete_setup(name)

Delete a setup.

TwinBuilder.delete_unused_variables()

Delete design and project unused variables.

TwinBuilder.delete_variable(name)

Delete a variable.

TwinBuilder.design_variation([variation])

Generate a string to specify a desired variation.

TwinBuilder.duplicate_design(name[, ...])

Copy a design to a new name.

TwinBuilder.edit_notes(text)

Edit notes.

TwinBuilder.edit_setup(name, properties)

Modify a setup.

TwinBuilder.evaluate_expression(expression)

Evaluate a valid string expression and return the numerical value in SI units.

TwinBuilder.export_convergence(setup[, ...])

Export a solution convergence to a file.

TwinBuilder.export_design_preview_to_jpg(...)

Export design preview image to a JPG file.

TwinBuilder.export_parametric_results(sweep, ...)

Export a list of all parametric variations solved for a sweep to a CSV file.

TwinBuilder.export_profile(setup[, ...])

Export a solution profile to a PROF file.

TwinBuilder.export_results([analyze, ...])

Export all available reports to a file, including profile, and convergence and sNp when applicable.

TwinBuilder.export_rl_matrix(matrix_name, ...)

Export R/L matrix after solving.

TwinBuilder.export_variables_to_csv(output_file)

Export design properties, project variables, or both to a CSV file.

TwinBuilder.generate_temp_project_directory(name)

Generate a unique directory string to save a project to.

TwinBuilder.generate_unique_setup_name([name])

Generate a new setup with a unique name.

TwinBuilder.get_evaluated_value(name[, units])

Retrieve the evaluated value of a design property or project variable in SI units if no unit is provided.

TwinBuilder.get_module(module_name)

Aedt Module object.

TwinBuilder.get_monitor_data()

Check and get monitor data of an existing analysis.

TwinBuilder.get_nominal_variation([with_values])

Retrieve the nominal variation.

TwinBuilder.get_object_material_properties([...])

Retrieve the material properties for a list of objects and return them in a dictionary.

TwinBuilder.get_oo_name(aedt_object[, ...])

Return the object-oriented AEDT property names.

TwinBuilder.get_oo_object(aedt_object, ...)

Return the Object Oriented AEDT Object.

TwinBuilder.get_oo_properties(aedt_object, ...)

Return the Object Oriented AEDT Object Properties.

TwinBuilder.get_oo_property_value(...)

Return the Object Oriented AEDT Object Properties.

TwinBuilder.get_output_variable(variable[, ...])

Retrieve the value of the output variable.

TwinBuilder.get_profile([name])

Get profile information.

TwinBuilder.get_registry_key_int(name)

Get the value for the AEDT registry key if one exists.

TwinBuilder.get_registry_key_string(name)

Get the value for the AEDT registry key if one exists.

TwinBuilder.get_setup(name)

Get the setup from the current design.

TwinBuilder.get_setups()

Retrieve setups.

TwinBuilder.get_sweeps(name)

Retrieve all sweeps for a setup.

TwinBuilder.get_traces_for_plot([...])

Retrieve a list of traces of specified designs ready to use in plot reports.

TwinBuilder.hidden_variable(name[, value])

Set the variable to a hidden or unhidden variable.

TwinBuilder.import_dataset1d(input_file[, ...])

Import a 1D dataset.

TwinBuilder.import_dataset3d(input_file[, ...])

Import a 3D dataset.

TwinBuilder.insert_design([name, solution_type])

Add a design of a specified type.

TwinBuilder.list_of_variations([setup, sweep])

Retrieve a list of active variations for input setup.

TwinBuilder.load_project(file_name[, ...])

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

TwinBuilder.number_with_units(value[, units])

Convert a number to a string with units.

TwinBuilder.read_design_data()

Read back the design data as a dictionary.

TwinBuilder.read_only_variable(name[, value])

Set the variable to a read-only or not read-only variable.

TwinBuilder.release_desktop([...])

Release AEDT.

TwinBuilder.remove_all_unused_definitions()

Remove all unused definitions in the project.

TwinBuilder.rename_design(name[, save])

Rename the active design.

TwinBuilder.save_project([file_name, ...])

Save the project and add a message.

TwinBuilder.set_active_design(name)

Change the active design to another design.

TwinBuilder.set_active_dso_config_name([...])

Change a specific registry key to a new value.

TwinBuilder.set_end_time(expression)

Set the end time.

TwinBuilder.set_hmax(expression)

Set hmax.

TwinBuilder.set_hmin(expression)

Set hmin.

TwinBuilder.set_license_type([license_type])

Change the license type between "Pack" and "Pool".

TwinBuilder.set_oo_property_value(...)

Change the property value of the object-oriented AEDT object.

TwinBuilder.set_registry_from_file(registry_file)

Apply desktop registry settings from an ACT file.

TwinBuilder.set_registry_key(name, value)

Change a specific registry key to a new value.

TwinBuilder.set_sim_setup_parameter(...[, ...])

Set simulation setup parameters.

TwinBuilder.set_temporary_directory(path)

Set temporary directory path.

TwinBuilder.solve_in_batch([file_name, ...])

Analyze a design setup in batch mode.

TwinBuilder.stop_simulations([clean_stop])

Check if there are simulation running and stops them.

TwinBuilder.submit_job(cluster_name[, ...])

Submit a job to be solved on a cluster.

TwinBuilder.validate_simple([log_file])

Validate a design.

TwinBuilder.value_with_units(value[, units, ...])

Combine a number and a string containing the modeler length unit in a single string e.g. "1.2mm".

Attributes

TwinBuilder.Position

Position of the object.

TwinBuilder.SimulationSetupTypes

Simulation setup types.

TwinBuilder.SolutionTypes

Solution types.

TwinBuilder.active_setup

Get or Set the name of the active setup.

TwinBuilder.aedt_version_id

AEDT version.

TwinBuilder.are_there_simulations_running

Check if there are simulation running.

TwinBuilder.available_variations

Available variation object.

TwinBuilder.boundaries

Design boundaries and excitations.

TwinBuilder.boundaries_by_type

Design boundaries by type.

TwinBuilder.default_solution_type

Default solution type.

TwinBuilder.design_datasets

Dictionary of Design Datasets.

TwinBuilder.design_list

Design list.

TwinBuilder.design_name

Design name.

TwinBuilder.design_properties

Design properties.

TwinBuilder.design_type

Design type.

TwinBuilder.desktop_class

Desktop class.

TwinBuilder.desktop_install_dir

AEDT installation directory.

TwinBuilder.excitation_objects

Get all excitation.

TwinBuilder.excitations

Get all excitation names.

TwinBuilder.excitations_by_type

Design excitations by type.

TwinBuilder.existing_analysis_setups

Get all analysis solution setups.

TwinBuilder.existing_analysis_sweeps

Get all existing analysis setups.

TwinBuilder.info

Dictionary of the PyAEDT session information.

TwinBuilder.layouteditor

Return the Circuit Layout Editor.

TwinBuilder.library_list

Library list.

TwinBuilder.lock_file

Lock file.

TwinBuilder.logger

Logger for the design.

TwinBuilder.materials

Materials in the project.

TwinBuilder.modeler

Design Modeler.

TwinBuilder.native_component_names

Native component names.

TwinBuilder.native_components

Native Component dictionary.

TwinBuilder.nominal_adaptive

Nominal adaptive sweep.

TwinBuilder.nominal_sweep

Nominal sweep.

TwinBuilder.o_component_manager

Component manager object.

TwinBuilder.o_maxwell_parameters

AEDT Maxwell Parameter Setup Object.

TwinBuilder.o_model_manager

Model manager object.

TwinBuilder.o_symbol_manager

Aedt Symbol Manager.

TwinBuilder.oanalysis

Analysis AEDT Module.

TwinBuilder.oboundary

Boundary Object.

TwinBuilder.odefinition_manager

Definition Manager Module.

TwinBuilder.odesign

Design.

TwinBuilder.odesktop

AEDT instance containing all projects and designs.

TwinBuilder.oeditor

Oeditor Module.

TwinBuilder.oexcitation

Solution Module.

TwinBuilder.ofieldsreporter

Fields reporter.

TwinBuilder.oimport_export

Import/Export Manager Module.

TwinBuilder.omaterial_manager

Material Manager Module.

TwinBuilder.omatrix

Matrix Object.

TwinBuilder.omeshmodule

Icepak Mesh Module.

TwinBuilder.omodelsetup

AEDT Model Setup Object.

TwinBuilder.omonitor

AEDT Monitor Object.

TwinBuilder.ooptimetrics

AEDT Optimetrics Module.

TwinBuilder.ooutput_variable

AEDT Output Variable Module.

TwinBuilder.opadstackmanager

AEDT oPadstackManager.

TwinBuilder.oproject

Project property.

TwinBuilder.optimizations

Optimizations in the project.

TwinBuilder.oradfield

AEDT Radiation Field Object.

TwinBuilder.oreportsetup

Report setup.

TwinBuilder.osolution

Solution Module.

TwinBuilder.output_variables

List of output variables.

TwinBuilder.parametrics

Setups in the project.

TwinBuilder.personallib

PersonalLib directory.

TwinBuilder.ports

Design excitations.

TwinBuilder.post

Design Postprocessor.

TwinBuilder.project_datasets

Dictionary of project datasets.

TwinBuilder.project_file

Project name and path.

TwinBuilder.project_list

Project list.

TwinBuilder.project_name

Project name.

TwinBuilder.project_path

Project path.

TwinBuilder.project_properties

Project properties.

TwinBuilder.project_time_stamp

Return Project time stamp.

TwinBuilder.project_timestamp_changed

Return a bool if time stamp changed or not.

TwinBuilder.pyaedt_dir

PyAEDT directory.

TwinBuilder.results_directory

Results directory.

TwinBuilder.settings

Settings of the current Python/Pyaedt session.

TwinBuilder.setup_names

Setup names.

TwinBuilder.setups

Setups in the project.

TwinBuilder.solution_type

Solution type.

TwinBuilder.src_dir

Source directory for Python.

TwinBuilder.syslib

SysLib directory.

TwinBuilder.temp_directory

Path to the temporary directory.

TwinBuilder.toolkit_directory

Path to the toolkit directory.

TwinBuilder.userlib

UserLib directory.

TwinBuilder.valid_design

Valid design.

TwinBuilder.variable_manager

Variable manager for creating and managing project design and postprocessing variables.

TwinBuilder.working_directory

Path to the working directory.