Q2d#
- class ansys.aedt.core.q3d.Q2d(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 Q2D app interface.
This class allows you to create an instance of Q2D and link to an existing project or create a new one.
- Parameters:
- project
str
,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.- design
str
,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_type
str
,optional
Solution type to apply to the design. The default is
None
, in which case the default type is applied.- setup
str
,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.- version
str
,int
,float
,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 a script is launched within AEDT. Examples of input values are232
,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 isFalse
. This parameter is ignored when a 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 a script is launched within AEDT.
- machine
str
,optional
Machine name to connect the oDesktop session to. This works only in 2022 R2 and 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.
- port
int
,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 the command “ansysedt.exe -grpcsrv portnum”.
- aedt_process_id
int
,optional
Process ID for the instance of AEDT to point PyAEDT at. The default is
None
. This parameter is only used whennew_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.
- project
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 ansys.aedt.core import Q2d >>> app = Q2d(projectname)
Create an instance of Q2D and link to a design named
designname
in a project namedprojectname
.>>> 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
(name[, ...])Activate optimization analysis for a variable and optionally set up ranges.
Q2d.activate_variable_sensitivity
(name[, ...])Activate sensitivity analysis for a variable and optionally set up ranges.
Q2d.activate_variable_statistical
(name[, ...])Activate statitistical analysis for a variable and optionally set up ranges.
Q2d.activate_variable_tuning
(name[, ...])Activate tuning analysis for a variable and optionally set up ranges.
Q2d.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.
Q2d.add_from_toolkit
(toolkit[, draw])Add a new toolkit to the current application.
Q2d.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.
Create a stackup 3D object.
Q2d.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.
Q2d.analyze
([setup, cores, tasks, gpus, ...])Solve the active design.
Q2d.analyze_setup
([name, cores, tasks, ...])Analyze a design setup.
Q2d.archive_project
([project_path, ...])Archive the AEDT project and add a message.
Q2d.assign_huray_finitecond_to_edges
(...[, ...])Assign the Huray surface roughness model to edges.
Q2d.assign_material
(assignment, material)Assign a material to one or more objects.
Q2d.assign_single_conductor
(assignment[, ...])Assign the conductor type to sheets.
Q2d.assign_single_signal_line
(assignment[, ...])Assign the conductor type to sheets.
Assign material to objects in a design based on a CSV file obtained from Sherlock.
Automatically assign conductors to signal lines.
Disable autosave in AEDT.
Enable autosave in AEDT.
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_property
(aedt_object, tab_name, ...)Change a property.
Update the validation design settings.
Q2d.check_beta_option_enabled
(beta_option)Check if a beta option is enabled.
Q2d.check_if_project_is_loaded
(input_file)Check if a project path is already loaded in active Desktop.
Q2d.clean_proj_folder
([directory, name])Delete a project folder.
Q2d.cleanup_solution
([variations, ...])Delete a set of Solution Variations or part of them.
Close AEDT and release it.
Q2d.close_project
([name, save])Close an AEDT project.
Q2d.copy_design_from
(project, design[, ...])Copy a design from a project into the active project.
Q2d.copy_project
(destination, name)Copy the project to another destination.
Q2d.copy_solid_bodies_from
(design[, ...])Copy a list of objects and user defined models from one design to the active design.
Q2d.create_dataset
(name, x, y[, z, v, ...])Create a dataset.
Q2d.create_dataset1d_design
(name, x, y[, ...])Create a design dataset.
Q2d.create_dataset1d_project
(name, x, y[, ...])Create a project dataset.
Q2d.create_dataset3d
(name, x, y[, z, v, ...])Create a 3D dataset.
Q2d.create_new_project
(name)Create a project within AEDT.
Q2d.create_output_variable
(variable, expression)Create or modify an output variable.
Q2d.create_rectangle
(origin, sizes[, name, ...])Create a rectangle.
Q2d.create_setup
([name, setup_type])Create an analysis setup for 2D Extractor.
Q2d.dataset_exists
(name[, is_project_dataset])Check if a dataset exists.
Deactivate the optimization analysis for a variable.
Deactivate the sensitivity analysis for a variable.
Deactivate the statistical analysis for a variable.
Deactivate the tuning analysis for a variable.
Q2d.delete_design
([name, fallback_design])Delete a design from the current project.
Q2d.delete_project
(name)Delete a project.
Q2d.delete_separator
(name)Delete a separator from either the active project or a design.
Q2d.delete_setup
(name)Delete a setup.
Delete design and project unused variables.
Q2d.delete_variable
(name)Delete a variable.
Q2d.design_variation
([variation])Generate a string to specify a desired variation.
Q2d.duplicate_design
(name[, ...])Copy a design to a new name.
Q2d.edit_notes
(text)Edit notes.
Q2d.edit_setup
(name, properties)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)Evaluate a valid string expression and return the numerical value in SI units.
Q2d.export_3d_model
([file_name, file_path, ...])Export the 3D model.
Q2d.export_convergence
(setup[, variations, ...])Export a solution convergence to a file.
Q2d.export_design_preview_to_jpg
(output_file)Export design preview image to a JPG file.
Q2d.export_equivalent_circuit
(output_file[, ...])Export matrix data.
Q2d.export_matrix_data
(file_name[, ...])Export matrix data.
Q2d.export_mesh_stats
(setup[, variations, ...])Export mesh statistics to a file.
Q2d.export_parametric_results
(sweep, output_file)Export a list of all parametric variations solved for a sweep to a CSV file.
Q2d.export_profile
(setup[, variation, ...])Export a solution profile to a PROF file.
Q2d.export_results
([analyze, export_folder, ...])Export all available reports to a file, including profile, and convergence and sNp when applicable.
Q2d.export_rl_matrix
(matrix_name, output_file)Export R/L matrix after solving.
Q2d.export_variables_to_csv
(output_file[, ...])Export design properties, project variables, or both to a CSV file.
Q2d.export_w_elements
([analyze, export_folder])Export all W-elements to files.
Q2d.flatten_3d_components
([components, ...])Flatten one or multiple 3d components in the actual layout.
Generate a unique directory string to save a project to.
Q2d.generate_unique_setup_name
([name])Generate a new setup with a unique name.
Retrieve all conductors in the active design.
Retrieve all dielectrics in the active design.
Retrieve all source modes.
Get all setup sources.
Q2d.get_components3d_vars
(component_name)Read the A3DCOMP file and check for variables.
Q2d.get_dxf_layers
(file_path)Read a DXF file and return all layer names.
Q2d.get_evaluated_value
(name[, units])Retrieve the evaluated value of a design property or project variable in SI units if no unit is provided.
Q2d.get_module
(module_name)Aedt Module object.
Check and get monitor data of an existing analysis.
Q2d.get_nominal_variation
([with_values])Retrieve the nominal variation.
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 property 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_profile
([name])Get profile information.
Q2d.get_property_value
(assignment, property_name)Retrieve a property value.
Q2d.get_registry_key_int
(name)Get the value for the AEDT registry key if one exists.
Get the value for the AEDT registry key if one exists.
Q2d.get_setup
(name)Get the setup from the current design.
Retrieve setups.
Q2d.get_sweeps
(name)Retrieve all sweeps for a setup.
Q2d.get_traces_for_plot
([get_self_terms, ...])Get a list of traces of specified designs ready to use in plot reports.
Q2d.hidden_variable
(name[, value])Set the variable to a hidden or unhidden variable.
Q2d.identify_touching_conductors
([assignment])Identify all touching components and group in a dictionary.
Q2d.import_3d_cad
(input_file[, healing, ...])Import a CAD model.
Q2d.import_dataset1d
(input_file[, name, ...])Import a 1D dataset.
Q2d.import_dataset3d
(input_file[, name, ...])Import a 3D dataset.
Q2d.import_dxf
(file_path, layers[, ...])Import a DXF file.
Q2d.import_gds_3d
(input_file, mapping_layers)Import a GDSII file.
Q2d.insert_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, sweep])Retrieve a list of active variations for input setup.
Q2d.load_project
(file_name[, design, ...])Open an AEDT project based on a project and optional design.
Q2d.number_with_units
(value[, units])Convert a number to a string with units.
Q2d.plot
([assignment, show, output_file, ...])Plot the model or a subset of objects.
Read back the design data as a dictionary.
Q2d.read_only_variable
(name[, value])Set the variable to a read-only or not read-only variable.
Q2d.release_desktop
([close_projects, ...])Release AEDT.
Remove all unused definitions in the project.
Q2d.rename_design
(name[, save])Rename the active design.
Q2d.save_project
([file_name, overwrite, ...])Save the project and add a message.
Q2d.set_active_design
(name)Change the active design to another design.
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_oo_property_value
(aedt_object, ...)Change the property value of the object-oriented AEDT object.
Q2d.set_registry_from_file
(registry_file[, ...])Apply desktop registry settings from an ACT file.
Q2d.set_registry_key
(name, value)Change a specific registry key to a new value.
Q2d.set_source_context
(sources[, ...])Set the source context.
Set temporary directory path.
Q2d.solve_in_batch
([file_name, machine, ...])Analyze a design setup in batch mode.
Q2d.sources
([matrix_index, is_gc_sources])List of matrix sources.
Q2d.stop_simulations
([clean_stop])Check if there are simulation running and stops them.
Q2d.submit_job
(cluster_name[, ...])Submit a job to be solved on a cluster.
Q2d.toggle_conductor_type
(assignment, new_type)Change the conductor type.
Q2d.validate_simple
([log_file])Validate a design.
Q2d.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
Position of the object.
Simulation setup types.
Solution types.
Get or Set the name of the active setup.
AEDT version.
Check if there are simulation running.
Available variation object.
Design boundaries and excitations.
Design boundaries by type.
3D components.
Property to import and export configuration files.
Default solution type.
Dictionary of Design Datasets.
Design file.
Design list.
Design name.
Design properties.
Design type.
Desktop
class.AEDT installation directory.
Dimension.
Get all excitation.
Get all excitation names.
Design excitations by type.
Existing analysis setups.
Existing analysis sweeps.
Dictionary of the PyAEDT session information.
Return the Circuit Layout Editor.
Library list.
Lock file.
Logger for the design.
Materials in the project.
Mesh.
Modeler.
Native component names.
Native Component dictionary.
Nominal adaptive sweep.
Nominal sweep.
Component manager object.
AEDT Maxwell Parameter Setup Object.
Model manager object.
Aedt Symbol Manager.
Analysis AEDT Module.
Boundary Object.
Definition Manager Module.
Design.
AEDT instance containing all projects and designs.
Oeditor Module.
Solution Module.
Fields reporter.
Import/Export Manager Module.
Material Manager Module.
Matrix Object.
Icepak Mesh Module.
AEDT Model Setup Object.
AEDT Monitor Object.
AEDT Optimetrics Module.
AEDT Output Variable Module.
AEDT oPadstackManager.
Project property.
Optimizations in the project.
AEDT Radiation Field Object.
Report setup.
Solution Module.
List of output variables.
Setups in the project.
PersonalLib directory.
Design excitations.
PostProcessor.
Dictionary of project datasets.
Project name and path.
Project list.
Project name.
Project path.
Project properties.
Return Project time stamp.
Return a bool if time stamp changed or not.
PyAEDT directory.
Results directory.
Settings of the current Python/Pyaedt session.
Setup names.
Setups in the project.
Solution type.
Source directory for Python.
SysLib directory.
Path to the temporary directory.
Path to the toolkit directory.
UserLib directory.
Valid design.
Variable manager for creating and managing project design and postprocessing variables.
Path to the working directory.