create_3d_component_array#
- Hfss.create_3d_component_array(input_data: dict, name: str | None = None) ComponentArray#
Create a 3D component array from a dictionary.
- Parameters:
- Returns:
ComponentArrayComponentArray object.
Examples
Add a 3D component array from a json file. Below is the content of a json file that will be used in the following code sample.
{ "primarylattice": "MyFirstLattice", "secondarylattice": "MySecondLattice", "useairobjects": true, "rowdimension": 4, "columndimension": 4, "visible": true, "showcellnumber": true, "paddingcells": 0, "referencecs": "Global", "MyFirstCell": "path/to/firstcell.a3dcomp", "MySecondCell": "path/to/secondcell.a3dcomp", "MyThirdCell": "path/to/thirdcell.a3dcomp", "cells": { "(1,1)": { "name": "MyFirstCell", "color": "(255,0,20)", "active": true, "postprocessing": true, "rotation": 0.0 }, "(1,2)": { "name": "MySecondCell", "rotation": 90.0 } } }
>>> from ansys.aedt.core import Hfss >>> from ansys.aedt.core.generic.file_utils import read_configuration_file >>> hfss_app = Hfss() >>> dict_in = read_configuration_file(r"path\to\json_file") >>> component_array = hfss_app.create_3d_component_array(dict_in)