pyaedt.Q2d#

class pyaedt.Q2d(projectname=None, designname=None, solution_type=None, setup_name=None, specified_version=None, non_graphical=False, new_desktop_session=False, close_on_exit=False, student_version=False, machine='', port=0, aedt_process_id=None)[source]#

Provides the Q2D application interface.

This class allows you to create an instance of Q2D and link to an existing project or create a new one.

Parameters:
projectnamestr, 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.

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

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

specified_versionstr, optional

Version of AEDT to use. The default is None, in which case the active version or latest installed version is used. This parameter is ignored when Script is launched within AEDT.

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_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. This parameter is ignored when Script is launched within AEDT.

close_on_exitbool, optional

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

student_versionbool, optional

Whether to open the AEDT student version. This parameter is ignored when Script is launched within AEDT.

machinestr, optional

Machine name to which connect the oDesktop Session. Works only on 2022R2. Remote Server must be up and running with command “ansysedt.exe -grpcsrv portnum”. If machine is “localhost” the server will also start if not present.

portint, optional

Port number of which start the oDesktop communication on already existing server. This parameter is ignored in new server creation. It works only on 2022R2. Remote Server must be up and running with command “ansysedt.exe -grpcsrv portnum”.

aedt_process_idint, optional

Only used when new_desktop_session = False, specifies by process ID which instance of Electronics Desktop to point PyAEDT at.

Examples

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

>>> from pyaedt import Q2d
>>> app = Q2d(projectname)

Create an instance of Q2D and link to a design named designname in a project named projectname.

>>> app = Q2d(projectname,designame)

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

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

Methods

Q2d.activate_variable_optimization(variable_name)

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

Q2d.activate_variable_sensitivity(variable_name)

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

Q2d.activate_variable_statistical(variable_name)

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

Q2d.activate_variable_tuning(variable_name)

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

Q2d.add_error_message(message_text[, ...])

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

Q2d.add_info_message(message_text[, ...])

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

Q2d.add_stackup_3d()

Create a stackup 3D object.

Q2d.add_warning_message(message_text[, ...])

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

Q2d.analyse_nominal()

Solve the nominal design.

Q2d.analyze_all()

Analyze all setups in a design.

Q2d.analyze_from_initial_mesh()

Revert the solution to the initial mesh and re-run the solve.

Q2d.analyze_nominal([num_cores, num_tasks, ...])

Solve the nominal design.

Q2d.analyze_setup(name[, num_cores, ...])

Analyze a design setup.

Q2d.archive_project([project_file, ...])

Archive the AEDT project and add a message.

Q2d.assign_huray_finitecond_to_edges(edges, ...)

Assign the Huray surface roughness model to edges.

Q2d.assign_material(obj, mat)

Assign a material to one or more objects.

Q2d.assign_single_conductor(target_objects)

Assign the conductor type to sheets.

Q2d.assign_single_signal_line(target_objects)

Assign the conductor type to sheets.

Q2d.assignmaterial_from_sherlock_files(...)

Assign material to objects in a design based on a CSV file obtained from Sherlock.

Q2d.auto_assign_conductors()

Automatically assign conductors to signal lines.

Q2d.autosave_disable()

Disable autosave in AEDT.

Q2d.autosave_enable()

Enable autosave in AEDT.

Q2d.change_automatically_use_causal_materials([...])

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

Q2d.change_design_settings(settings)

Set Design Settings.

Q2d.change_material_override([material_override])

Enable or disable the material override in the project.

Q2d.change_validation_settings([...])

Update the validation design settings.

Q2d.check_beta_option_enabled(beta_option_name)

Check if a beta option is enabled.

Q2d.clean_proj_folder([directory, name])

Delete a project folder.

Q2d.cleanup_solution([variations, ...])

Delete a set of Solution Variations or part of them.

Q2d.close_desktop()

Close AEDT and release it.

Q2d.close_project([name, saveproject])

Close an AEDT project.

Q2d.copy_design_from(project_fullname, ...)

Copy a design from a project into the active design.

Q2d.copy_project(path, dest)

Copy the project to another destination.

Q2d.copy_solid_bodies_from(design[, ...])

Copy a list of objects from one design to the active design.

Q2d.create_dataset(dsname, xlist, ylist[, ...])

Create a dataset.

Q2d.create_dataset1d_design(dsname, xlist, ylist)

Create a design dataset.

Q2d.create_dataset1d_project(dsname, xlist, ...)

Create a project dataset.

Q2d.create_dataset3d(dsname, xlist, ylist[, ...])

Create a 3D dataset.

Q2d.create_new_project(proj_name)

Create a project within AEDT.

Q2d.create_output_variable(variable, expression)

Create or modify an output variable.

Q2d.create_rectangle(position, dimension_list)

Create a rectangle.

Q2d.create_setup([setupname, setuptype, props])

Create a setup.

Q2d.dataset_exists(name[, is_project_dataset])

Check if a dataset exists.

Q2d.deactivate_variable_optimization(...)

Deactivate the optimization analysis for a variable.

Q2d.deactivate_variable_sensitivity(...)

Deactivate the sensitivity analysis for a variable.

Q2d.deactivate_variable_statistical(...)

Deactivate the statistical analysis for a variable.

Q2d.deactivate_variable_tuning(variable_name)

Deactivate the tuning analysis for a variable.

Q2d.delete_design([name, fallback_design])

Delete a design from the current project.

Q2d.delete_project(project_name)

Delete a project.

Q2d.delete_separator(separator_name)

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

Q2d.delete_setup(setupname)

Delete a setup.

Q2d.delete_variable(sVarName)

Delete a variable.

Q2d.design_variation([variation_string])

Generate a string to specify a desired variation.

Q2d.duplicate_design(label[, ...])

Copy a design to a new name.

Q2d.edit_setup(setupname, properties_dict)

Modify a setup.

Q2d.edit_sources([cg, acrl, dcrl])

Set up the source loaded for Q3D or Q2D in multiple sources simultaneously.

Q2d.evaluate_expression(expression_string)

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

Q2d.export3DModel(fileName, filePath[, ...])

Export the 3D model.

Q2d.export_3d_model(fileName, filePath[, ...])

Export the 3D model.

Q2d.export_convergence(setup_name[, ...])

Export a solution convergence to a file.

Q2d.export_design_preview_to_jpg(filename)

Export design preview image to a JPG file.

Q2d.export_mesh_stats(setup_name[, ...])

Export mesh statistics to a file.

Q2d.export_parametric_results(sweepname, ...)

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

Q2d.export_profile(setup_name[, ...])

Export a solution profile to a PROF file.

Q2d.export_results([analyze, export_folder])

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

Q2d.export_variables_to_csv(filename[, ...])

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

Q2d.export_w_elements([analyze, export_folder])

Export all available W-elements to files.

Q2d.generate_temp_project_directory(subdir_name)

Generate a unique directory string to save a project to.

Q2d.generate_unique_setup_name([setup_name])

Generate a new setup with an unique name.

Q2d.get_all_conductors_names()

Retrieve all conductors in the active design.

Q2d.get_all_dielectrics_names()

Retrieve all dielectrics in the active design.

Q2d.get_all_sources()

Retrieve all setup sources.

Q2d.get_components3d_vars(component3dname)

Read the A3DCOMP file and check for variables.

Q2d.get_evaluated_value(variable_name[, units])

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

Q2d.get_excitations_name()

Get all excitation names.

Q2d.get_module(module_name)

Aedt Module object.

Q2d.get_nominal_variation()

Retrieve the nominal variation.

Q2d.get_object_material_properties([...])

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

Q2d.get_oo_name(aedt_object[, object_name])

Return the Object Oriented AEDT Properties names.

Q2d.get_oo_object(aedt_object, object_name)

Return the Object Oriented AEDT Object.

Q2d.get_oo_properties(aedt_object, object_name)

Return the Object Oriented AEDT Object Properties.

Q2d.get_oo_property_value(aedt_object, ...)

Return the Object Oriented AEDT Object Properties.

Q2d.get_output_variable(variable[, solution])

Retrieve the value of the output variable.

Q2d.get_property_value(objectname, property)

Retrieve a property value.

Q2d.get_registry_key_int(key_full_name)

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

Q2d.get_registry_key_string(key_full_name)

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

Q2d.get_setup(setupname)

Get the setup from the current design.

Q2d.get_setups()

Retrieve setups.

Q2d.get_sweeps(name)

Retrieve all sweeps for a setup.

Q2d.get_traces_for_plot([get_self_terms, ...])

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

Q2d.hidden_variable(variable_name[, value])

Set the variable to a hidden or unhidden variable.

Q2d.import_dataset1d(filename[, dsname, ...])

Import a 1D dataset.

Q2d.import_dataset3d(filename[, dsname, ...])

Import a 3D dataset.

Q2d.insert_design([design_name, solution_type])

Add a design of a specified type.

Q2d.insert_reduced_matrix(operation_name[, ...])

Insert a new reduced matrix.

Q2d.list_of_variations([setup_name, sweep_name])

Retrieve a list of active variations for input setup.

Q2d.load_project(project_file[, ...])

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

Q2d.plot([objects, show, export_path, ...])

Plot the model or a subset of objects.

Q2d.read_design_data()

Read back the design data as a dictionary.

Q2d.read_only_variable(variable_name[, value])

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

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

Release AEDT.

Q2d.rename_design(new_name)

Rename the active design.

Q2d.save_project([project_file, overwrite, ...])

Save the project and add a message.

Q2d.set_active_design(name)

Change the active design to another design.

Q2d.set_active_dso_config_name([...])

Change a specific registry key to a new value.

Q2d.set_license_type([license_type])

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

Q2d.set_registry_from_file(registry_file[, ...])

Apply desktop registry settings from an ACT file.

Q2d.set_registry_key(key_full_name, key_value)

Change a specific registry key to a new value.

Q2d.set_source_context(sources[, ...])

Set the source context.

Q2d.solve_in_batch([filename, machine, ...])

Analyze a design setup in batch mode.

Q2d.submit_job(clustername[, ...])

Submit a job to be solved on a cluster.

Q2d.toggle_conductor_type(conductor_name, ...)

Change the conductor type.

Q2d.validate_simple([logfile])

Validate a design.

Q2d.value_with_units(value[, units])

Combine a number and a string containing the unit in a single string e.g.

Attributes

Q2d.aedt_version_id

AEDT version.

Q2d.analysis_setup

Analysis setup.

Q2d.available_variations

Available variation object.

Q2d.boundaries

Design boundaries and excitations.

Q2d.components3d

3D components.

Q2d.configurations

Property to import and export configuration files.

Q2d.default_solution_type

Default solution type.

Q2d.design_datasets

Dictionary of Design Datasets.

Q2d.design_file

Design file.

Q2d.design_list

Design list.

Q2d.design_name

Design name.

Q2d.design_properties

Design properties.

Q2d.design_type

Design type.

Q2d.desktop_install_dir

AEDT installation directory.

Q2d.dim

Dimension.

Q2d.excitations

Get all excitation names.

Q2d.existing_analysis_setups

Existing analysis setups.

Q2d.existing_analysis_sweeps

Existing analysis sweeps.

Q2d.layouteditor

Return the Circuit Layout Editor.

Q2d.library_list

Library list.

Q2d.lock_file

Lock file.

Q2d.logger

Logger for the design.

Q2d.materials

Materials in the project.

Q2d.mesh

Mesh.

Q2d.modeler

Modeler.

Q2d.native_components

Native Component dictionary.

Q2d.nominal_adaptive

Nominal adaptive sweep.

Q2d.nominal_sweep

Nominal sweep.

Q2d.o_component_manager

Component manager object.

Q2d.o_maxwell_parameters

AEDT Maxwell Parameter Setup Object.

Q2d.o_model_manager

Model manager object.

Q2d.o_symbol_manager

Aedt Simbol Manager.

Q2d.oanalysis

Analysis AEDT Module.

Q2d.oboundary

Boundary Object.

Q2d.odefinition_manager

Definition Manager Module.

Q2d.odesign

Design.

Q2d.odesktop

AEDT instance containing all projects and designs.

Q2d.oeditor

Oeditor Module.

Q2d.oexcitation

Solution Module.

Q2d.ofieldsreporter

Fields reporter.

Q2d.oimport_export

Import/Export Manager Module.

Q2d.omaterial_manager

Material Manager Module.

Q2d.omatrix

Matrix Object.

Q2d.omeshmodule

Icepak Mesh Module.

Q2d.omodelsetup

AEDT Model Setup Object.

Q2d.omonitor

AEDT Monitor Object.

Q2d.ooptimetrics

AEDT Optimetrics Module.

Q2d.ooutput_variable

AEDT Output Variable Module.

Q2d.opadstackmanager

AEDT oPadstackManager.

Q2d.oproject

Project property.

Q2d.oradfield

AEDT Radiation Field Object.

Q2d.oreportsetup

Report setup.

Q2d.osolution

Solution Module.

Q2d.output_variables

List of output variables.

Q2d.personallib

PersonalLib directory.

Q2d.post

PostProcessor.

Q2d.project_datasets

Dictionary of Project Datasets.

Q2d.project_file

Project name and path.

Q2d.project_list

Project list.

Q2d.project_name

Project name.

Q2d.project_path

Project path.

Q2d.project_properies

Project properties.

Q2d.project_time_stamp

Return Project time stamp.

Q2d.project_timestamp_changed

Return a bool if time stamp changed or not.

Q2d.pyaedt_dir

PyAEDT directory.

Q2d.results_directory

Results directory.

Q2d.setup_names

Setup names.

Q2d.solution_type

Solution type.

Q2d.src_dir

Source directory for Python.

Q2d.syslib

SysLib directory.

Q2d.temp_directory

Path to the temporary directory.

Q2d.toolkit_directory

Path to the toolkit directory.

Q2d.userlib

UserLib directory.

Q2d.valid_design

Valid design.

Q2d.variable_manager

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

Q2d.working_directory

Path to the working directory.