diff --git a/doc/source/conf.py b/doc/source/conf.py index 1a907a769..2f290dfd0 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -92,7 +92,7 @@ def copy_examples(app): if os.path.exists(destination_dir): size = directory_size(destination_dir) logger.info(f"Directory {destination_dir} ({size} MB) already exist, removing it.") - shutil.rmtree(destination_dir) + shutil.rmtree(destination_dir, ignore_errors=True) logger.info(f"Directory removed.") shutil.copytree(EXAMPLES_DIRECTORY, destination_dir) diff --git a/examples/01-HFSS3DLayout/01_power_integrity.py b/examples/01-HFSS3DLayout/01_power_integrity.py index 458307327..a88d6e127 100644 --- a/examples/01-HFSS3DLayout/01_power_integrity.py +++ b/examples/01-HFSS3DLayout/01_power_integrity.py @@ -191,9 +191,9 @@ h3d = Hfss3dLayout( aedb, - specified_version=AEDT_VERSION, + version=AEDT_VERSION, non_graphical=NG_MODE, - new_desktop_session=True + new_desktop=True ) # ### Analyze diff --git a/examples/01-HFSS3DLayout/02_dc_ir_analysis.py b/examples/01-HFSS3DLayout/02_dc_ir_analysis.py index 481cd504b..cac3b7f57 100644 --- a/examples/01-HFSS3DLayout/02_dc_ir_analysis.py +++ b/examples/01-HFSS3DLayout/02_dc_ir_analysis.py @@ -209,9 +209,9 @@ siw = Hfss3dLayout( aedb, - specified_version=AEDT_VERSION, + version=AEDT_VERSION, non_graphical=NG_MODE, - new_desktop_session=True + new_desktop=True ) # ## Analyze diff --git a/examples/01-HFSS3DLayout/03_gui_manipulation.py b/examples/01-HFSS3DLayout/03_gui_manipulation.py index c72853500..ced36ea84 100644 --- a/examples/01-HFSS3DLayout/03_gui_manipulation.py +++ b/examples/01-HFSS3DLayout/03_gui_manipulation.py @@ -32,7 +32,7 @@ # # Initialize AEDT and launch HFSS 3D Layout. -h3d = Hfss3dLayout(aedb, specified_version=AEDT_VERSION) +h3d = Hfss3dLayout(aedb, version=AEDT_VERSION) h3d.save_project() # ## Net visibility diff --git a/examples/01-HFSS3DLayout/04_pre_layout_sma_connector_on_pcb.py b/examples/01-HFSS3DLayout/04_pre_layout_sma_connector_on_pcb.py index 2488ac9ec..08410abad 100644 --- a/examples/01-HFSS3DLayout/04_pre_layout_sma_connector_on_pcb.py +++ b/examples/01-HFSS3DLayout/04_pre_layout_sma_connector_on_pcb.py @@ -265,9 +265,9 @@ NG_MODE = False # Open the UI to view the layout. h3d = Hfss3dLayout( aedb, - specified_version=AEDT_VERSION, + version=AEDT_VERSION, non_graphical=NG_MODE, - new_desktop_session=True + new_desktop=True ) # ## Place SMA RF connector diff --git a/examples/01-HFSS3DLayout/08_pre_layout_parametrized_pcb.py b/examples/01-HFSS3DLayout/08_pre_layout_parametrized_pcb.py index 114686b3e..1304b0fa3 100644 --- a/examples/01-HFSS3DLayout/08_pre_layout_parametrized_pcb.py +++ b/examples/01-HFSS3DLayout/08_pre_layout_parametrized_pcb.py @@ -297,10 +297,10 @@ # ## Open the project in HFSS 3D Layout. h3d = Hfss3dLayout( - projectname=aedb_path, - specified_version=AEDT_VERSION, + project=aedb_path, + version=AEDT_VERSION, non_graphical=True, - new_desktop_session=True, + new_desktop=True, ) # ### Add a HFSS simulation setup diff --git a/examples/01-HFSS3DLayout/index.rst b/examples/01-HFSS3DLayout/index.rst index e9a0adb22..7b3c4400e 100644 --- a/examples/01-HFSS3DLayout/index.rst +++ b/examples/01-HFSS3DLayout/index.rst @@ -1,5 +1,5 @@ HFSS 3D Layout examples -~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~ These examples use PyAEDT and PyEDB to show some end-to-end workflows for HFSS 3D Layout and SIwave. This includes layout import, layout editing, S-parameter assignment, Spice model assignment, parameterized pre-layout design creation. @@ -13,4 +13,5 @@ pre-layout design creation. 06_ipc2581_export.py 07_import_gds.py 08_pre_layout_parametrized_pcb.py + .. 05_electrothermal_analysis.py \ No newline at end of file diff --git a/examples/01-Modeling-Setup/Configurations.py b/examples/01-Modeling-Setup/Configurations.py index dce4aec5d..7e2303f8a 100644 --- a/examples/01-Modeling-Setup/Configurations.py +++ b/examples/01-Modeling-Setup/Configurations.py @@ -51,9 +51,9 @@ # Open the project, and save it to the temporary folder. ipk = pyaedt.Icepak( - projectname=project_full_name, - specified_version=AEDT_VERSION, - new_desktop_session=True, + project=project_full_name, + version=AEDT_VERSION, + new_desktop=True, non_graphical=non_graphical, ) ipk.autosave_disable() @@ -113,7 +113,7 @@ # Create an Icepak project and import the step. new_project = os.path.join(temp_dir.name, generate_unique_name("example") + ".aedt") -app = pyaedt.Icepak(projectname=new_project) +app = pyaedt.Icepak(project=new_project) app.modeler.import_3d_cad(file_path) # ## Import and apply configuration file diff --git a/examples/01-Modeling-Setup/HFSS_CoordinateSystem.py b/examples/01-Modeling-Setup/HFSS_CoordinateSystem.py index 851abf25c..84c2e2f72 100644 --- a/examples/01-Modeling-Setup/HFSS_CoordinateSystem.py +++ b/examples/01-Modeling-Setup/HFSS_CoordinateSystem.py @@ -25,7 +25,7 @@ # ## Launch AEDT d = pyaedt.launch_desktop( - specified_version=AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True + version=AEDT_VERSION, non_graphical=non_graphical, new_desktop=True ) # ## Insert HFSS design @@ -35,7 +35,7 @@ project_name = pyaedt.generate_unique_project_name( rootname=temp_dir.name, project_name="CoordSysDemo" ) -hfss = pyaedt.Hfss(projectname=project_name) +hfss = pyaedt.Hfss(project=project_name) # ## Create coordinate system # diff --git a/examples/01-Modeling-Setup/Optimetrics.py b/examples/01-Modeling-Setup/Optimetrics.py index 04e447ad3..6ac779caa 100644 --- a/examples/01-Modeling-Setup/Optimetrics.py +++ b/examples/01-Modeling-Setup/Optimetrics.py @@ -34,9 +34,9 @@ rootname=temp_dir.name, project_name="optimetrics" ) hfss = pyaedt.Hfss( - projectname=project_name, - specified_version=AEDT_VERSION, - new_desktop_session=True, + project=project_name, + version=AEDT_VERSION, + new_desktop=True, non_graphical=non_graphical, ) hfss["w1"] = "1mm" diff --git a/examples/01-Modeling-Setup/Polyline_Primitives.py b/examples/01-Modeling-Setup/Polyline_Primitives.py index 64566ed94..2c1d6313b 100644 --- a/examples/01-Modeling-Setup/Polyline_Primitives.py +++ b/examples/01-Modeling-Setup/Polyline_Primitives.py @@ -29,11 +29,11 @@ project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="polyline") maxwell = pyaedt.Maxwell3d( - projectname=project_name, + project=project_name, solution_type="Transient", - designname="test_polyline_3D", - specified_version=AEDT_VERSION, - new_desktop_session=True, + design="test_polyline_3D", + version=AEDT_VERSION, + new_desktop=True, non_graphical=non_graphical, ) maxwell.modeler.model_units = "mm" diff --git a/examples/02-HFSS/Array.py b/examples/02-HFSS/Array.py index 90bcff98f..76f4316fa 100644 --- a/examples/02-HFSS/Array.py +++ b/examples/02-HFSS/Array.py @@ -41,11 +41,11 @@ project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="array") hfss = pyaedt.Hfss( - projectname=project_name, - specified_version=AEDT_VERSION, - designname="Array_Simple", + project=project_name, + version=AEDT_VERSION, + design="Array_Simple", non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, ) print("Project name " + project_name) diff --git a/examples/02-HFSS/Create_3d_Component_and_use_it.py b/examples/02-HFSS/Create_3d_Component_and_use_it.py index 44f090cc2..b28d2ca69 100644 --- a/examples/02-HFSS/Create_3d_Component_and_use_it.py +++ b/examples/02-HFSS/Create_3d_Component_and_use_it.py @@ -28,7 +28,7 @@ # # Launch AEDT, create an HFSS design, and save the project. -hfss = Hfss(specified_version=AEDT_VERSION, new_desktop_session=True, close_on_exit=True) +hfss = Hfss(version=AEDT_VERSION, new_desktop=True, close_on_exit=True) hfss.save_project(os.path.join(temp_dir.name, generate_unique_name("example") + ".aedt")) # ## Variable definition @@ -111,7 +111,7 @@ # PyAEDT allows to control multiple projects, design and solution type at the same time. new_project = os.path.join(temp_dir.name, generate_unique_name("new_project") + ".aedt") -hfss2 = Hfss(projectname=new_project, designname="new_design") +hfss2 = Hfss(project=new_project, design="new_design") # ## Insert 3D component # diff --git a/examples/02-HFSS/Flex_CPWG.py b/examples/02-HFSS/Flex_CPWG.py index 958e03824..736d4a1ce 100644 --- a/examples/02-HFSS/Flex_CPWG.py +++ b/examples/02-HFSS/Flex_CPWG.py @@ -33,9 +33,9 @@ # Launch AEDT, create an HFSS design, and save the project. hfss = pyaedt.Hfss( - specified_version=AEDT_VERSION, + version=AEDT_VERSION, solution_type="DrivenTerminal", - new_desktop_session=True, + new_desktop=True, non_graphical=non_graphical, ) hfss.save_project(os.path.join(temp_dir.name, generate_unique_name("example") + ".aedt")) diff --git a/examples/02-HFSS/HFSS_Choke.py b/examples/02-HFSS/HFSS_Choke.py index 767e699a6..ad305e400 100644 --- a/examples/02-HFSS/HFSS_Choke.py +++ b/examples/02-HFSS/HFSS_Choke.py @@ -30,10 +30,10 @@ project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="choke") hfss = pyaedt.Hfss( - projectname=project_name, - specified_version=AEDT_VERSION, + project=project_name, + version=AEDT_VERSION, non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, solution_type="Terminal", ) diff --git a/examples/02-HFSS/HFSS_Dipole.py b/examples/02-HFSS/HFSS_Dipole.py index 591f72070..9b8849671 100644 --- a/examples/02-HFSS/HFSS_Dipole.py +++ b/examples/02-HFSS/HFSS_Dipole.py @@ -28,14 +28,14 @@ # ## Launch AEDT -d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True) +d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop=True) # ## Launch HFSS # # Create a new HFSS design. project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="dipole") -hfss = pyaedt.Hfss(projectname=project_name, solution_type="Modal") +hfss = pyaedt.Hfss(project=project_name, solution_type="Modal") # ## Define variable # diff --git a/examples/02-HFSS/HFSS_FSS_unitcell.py b/examples/02-HFSS/HFSS_FSS_unitcell.py index 2b2ea14e4..3a492af3e 100644 --- a/examples/02-HFSS/HFSS_FSS_unitcell.py +++ b/examples/02-HFSS/HFSS_FSS_unitcell.py @@ -29,13 +29,13 @@ # ## Launch AEDT project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="FSS") -d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True) +d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop=True) # ## Launch HFSS # # Create a new HFSS design. -hfss = pyaedt.Hfss(projectname=project_name, solution_type="Modal") +hfss = pyaedt.Hfss(project=project_name, solution_type="Modal") # ## Define variable # diff --git a/examples/02-HFSS/HFSS_Spiral.py b/examples/02-HFSS/HFSS_Spiral.py index cebffd8c8..8ad1a38af 100644 --- a/examples/02-HFSS/HFSS_Spiral.py +++ b/examples/02-HFSS/HFSS_Spiral.py @@ -34,11 +34,11 @@ project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="spiral") hfss = pyaedt.Hfss( - projectname=project_name, - specified_version=AEDT_VERSION, + project=project_name, + version=AEDT_VERSION, non_graphical=non_graphical, - designname="A1", - new_desktop_session=True, + design="A1", + new_desktop=True, solution_type="Modal" ) hfss.modeler.model_units = "um" diff --git a/examples/02-HFSS/HFSS_eigenmode.py b/examples/02-HFSS/HFSS_eigenmode.py index 556c9cf33..b5ec87341 100644 --- a/examples/02-HFSS/HFSS_eigenmode.py +++ b/examples/02-HFSS/HFSS_eigenmode.py @@ -54,13 +54,13 @@ # ## Launch AEDT -d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True) +d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop=True) # ## Launch HFSS # # Create a new HFSS design. -hfss = pyaedt.Hfss(projectname=project_path, non_graphical=non_graphical) +hfss = pyaedt.Hfss(project=project_path, non_graphical=non_graphical) # ## Input parameters for eigenmode solver # diff --git a/examples/02-HFSS/Probe_Fed_Patch.py b/examples/02-HFSS/Probe_Fed_Patch.py index fd572e78e..38b5c9f26 100644 --- a/examples/02-HFSS/Probe_Fed_Patch.py +++ b/examples/02-HFSS/Probe_Fed_Patch.py @@ -35,12 +35,12 @@ project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="patch") hfss = pyaedt.Hfss( - projectname=project_name, + project=project_name, solution_type="Terminal", - designname="patch", + design="patch", non_graphical=non_graphical, - new_desktop_session=True, - specified_version=AEDT_VERSION, + new_desktop=True, + version=AEDT_VERSION, ) length_units = "mm" diff --git a/examples/02-HFSS/Waveguide_Filter.py b/examples/02-HFSS/Waveguide_Filter.py index 705a5e2ae..a643cd280 100644 --- a/examples/02-HFSS/Waveguide_Filter.py +++ b/examples/02-HFSS/Waveguide_Filter.py @@ -53,12 +53,12 @@ # ### Create the HFSS design hfss = pyaedt.Hfss( - projectname=project_name, - specified_version=AEDT_VERSION, - designname="filter", + project=project_name, + version=AEDT_VERSION, + design="filter", solution_type="Modal", non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, close_on_exit=True, ) diff --git a/examples/02-SBR+/SBR_City_Import.py b/examples/02-SBR+/SBR_City_Import.py index f352b3b62..e36796158 100644 --- a/examples/02-SBR+/SBR_City_Import.py +++ b/examples/02-SBR+/SBR_City_Import.py @@ -33,11 +33,11 @@ project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="city") app = pyaedt.Hfss( - projectname=project_name, - designname="Ansys", + project=project_name, + design="Ansys", solution_type="SBR+", - specified_version=AEDT_VERSION, - new_desktop_session=True, + version=AEDT_VERSION, + new_desktop=True, non_graphical=non_graphical, ) diff --git a/examples/02-SBR+/SBR_Doppler_Example.py b/examples/02-SBR+/SBR_Doppler_Example.py index dd9506f1a..f4667a7a3 100644 --- a/examples/02-SBR+/SBR_Doppler_Example.py +++ b/examples/02-SBR+/SBR_Doppler_Example.py @@ -37,10 +37,10 @@ project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="doppler") app = pyaedt.Hfss( - specified_version=AEDT_VERSION, + version=AEDT_VERSION, solution_type="SBR+", - new_desktop_session=True, - projectname=project_name, + new_desktop=True, + project=project_name, close_on_exit=True, non_graphical=non_graphical, ) @@ -51,8 +51,8 @@ # # Save the project to the temporary folder and rename the design. -designname = "doppler_sbr" -app.rename_design(designname) +design = "doppler_sbr" +app.rename_design(design) app.save_project() # ## Set up library paths diff --git a/examples/02-SBR+/SBR_Example.py b/examples/02-SBR+/SBR_Example.py index 64d79407e..45d2a0626 100644 --- a/examples/02-SBR+/SBR_Example.py +++ b/examples/02-SBR+/SBR_Example.py @@ -38,18 +38,18 @@ # + target = pyaedt.Hfss( - projectname=project_full_name, - designname="Cassegrain_", + project=project_full_name, + design="Cassegrain_", solution_type="SBR+", - specified_version=AEDT_VERSION, - new_desktop_session=True, + version=AEDT_VERSION, + new_desktop=True, non_graphical=non_graphical, ) source = pyaedt.Hfss( - projectname=target.project_name, - designname="feeder", - specified_version=AEDT_VERSION, + project=target.project_name, + design="feeder", + version=AEDT_VERSION, ) # - diff --git a/examples/02-SBR+/SBR_Time_Plot.py b/examples/02-SBR+/SBR_Time_Plot.py index 2411f7d41..ce32bdcb6 100644 --- a/examples/02-SBR+/SBR_Time_Plot.py +++ b/examples/02-SBR+/SBR_Time_Plot.py @@ -34,10 +34,10 @@ # ## Launch HFSS and analyze hfss = Hfss( - projectname=project_file, - specified_version=AEDT_VERSION, + project=project_file, + version=AEDT_VERSION, non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, ) hfss.analyze(num_cores=NUM_CORES) diff --git a/examples/03-Maxwell/Maxwell2D_DCConduction.py b/examples/03-Maxwell/Maxwell2D_DCConduction.py index 92cc1aa20..bd9a130da 100644 --- a/examples/03-Maxwell/Maxwell2D_DCConduction.py +++ b/examples/03-Maxwell/Maxwell2D_DCConduction.py @@ -18,12 +18,12 @@ # ``Maxwell2d`` class named ``m2d``. m2d = pyaedt.Maxwell2d( - specified_version=AEDT_VERSION, - new_desktop_session=True, + version=AEDT_VERSION, + new_desktop=True, close_on_exit=True, solution_type="DCConduction", - projectname="M2D_DC_Conduction", - designname="Ansys_resistor", + project="M2D_DC_Conduction", + design="Ansys_resistor", ) # ## Create temporary directory diff --git a/examples/03-Maxwell/Maxwell2D_Electrostatic.py b/examples/03-Maxwell/Maxwell2D_Electrostatic.py index 689a14715..04045d655 100644 --- a/examples/03-Maxwell/Maxwell2D_Electrostatic.py +++ b/examples/03-Maxwell/Maxwell2D_Electrostatic.py @@ -58,11 +58,11 @@ # Launch Maxwell 2D and save the project. m2d = pyaedt.Maxwell2d( - projectname=project_name, - specified_version=aedt_version, - designname=design_name, + project=project_name, + version=aedt_version, + design=design_name, solution_type=solver, - new_desktop_session=True, + new_desktop=True, non_graphical=non_graphical, ) diff --git a/examples/03-Maxwell/Maxwell2D_PMSynchronousMotor.py b/examples/03-Maxwell/Maxwell2D_PMSynchronousMotor.py index 748bf870a..9581d5ce0 100644 --- a/examples/03-Maxwell/Maxwell2D_PMSynchronousMotor.py +++ b/examples/03-Maxwell/Maxwell2D_PMSynchronousMotor.py @@ -113,11 +113,11 @@ # Launch Maxwell 2D and save the project. m2d = pyaedt.Maxwell2d( - projectname=project_name, - specified_version=aedt_version, - designname=design_name, + project=project_name, + version=aedt_version, + design=design_name, solution_type=solver, - new_desktop_session=True, + new_desktop=True, non_graphical=non_graphical, ) diff --git a/examples/03-Maxwell/Maxwell2D_Transient.py b/examples/03-Maxwell/Maxwell2D_Transient.py index 1838571a0..ddc6deb3f 100644 --- a/examples/03-Maxwell/Maxwell2D_Transient.py +++ b/examples/03-Maxwell/Maxwell2D_Transient.py @@ -45,10 +45,10 @@ m2d = pyaedt.Maxwell2d( solution_type="TransientXY", - specified_version=AEDT_VERSION, + version=AEDT_VERSION, non_graphical=non_graphical, - new_desktop_session=True, - projectname=pyaedt.generate_unique_project_name(), + new_desktop=True, + project=pyaedt.generate_unique_project_name(), ) # ## Create rectangle and duplicate it diff --git a/examples/03-Maxwell/Maxwell2D_transformer_LL.py b/examples/03-Maxwell/Maxwell2D_transformer_LL.py index 562f2b2e8..84b3cd522 100644 --- a/examples/03-Maxwell/Maxwell2D_transformer_LL.py +++ b/examples/03-Maxwell/Maxwell2D_transformer_LL.py @@ -36,10 +36,10 @@ desktop_version = AEDT_VERSION m2d = Maxwell2d( - specified_version=desktop_version, - new_desktop_session=False, - designname=design_name, - projectname=project_name, + version=desktop_version, + new_desktop=False, + design=design_name, + project=project_name, solution_type=solver, non_graphical=non_graphical, ) diff --git a/examples/03-Maxwell/Maxwell3DTeam7.py b/examples/03-Maxwell/Maxwell3DTeam7.py index 9a2658749..1ca2a4107 100644 --- a/examples/03-Maxwell/Maxwell3DTeam7.py +++ b/examples/03-Maxwell/Maxwell3DTeam7.py @@ -42,12 +42,12 @@ desktop_version = AEDT_VERSION m3d = Maxwell3d( - projectname=project_name, - designname=design_name, + project=project_name, + design=design_name, solution_type=solver, - specified_version=desktop_version, + version=desktop_version, non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, ) m3d.modeler.model_units = "mm" diff --git a/examples/03-Maxwell/Maxwell3D_Choke.py b/examples/03-Maxwell/Maxwell3D_Choke.py index 3ec4f78ff..2ede5fb12 100644 --- a/examples/03-Maxwell/Maxwell3D_Choke.py +++ b/examples/03-Maxwell/Maxwell3D_Choke.py @@ -32,11 +32,11 @@ # Launch Maxwell 3D 2023 R2 in graphical mode. m3d = pyaedt.Maxwell3d( - projectname=pyaedt.generate_unique_project_name(), + project=pyaedt.generate_unique_project_name(), solution_type="EddyCurrent", - specified_version=version, + version=version, non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, ) # ## Rules and information of use diff --git a/examples/03-Maxwell/Maxwell3D_Segmentation.py b/examples/03-Maxwell/Maxwell3D_Segmentation.py index 45ad8c7dc..c36d72fc4 100644 --- a/examples/03-Maxwell/Maxwell3D_Segmentation.py +++ b/examples/03-Maxwell/Maxwell3D_Segmentation.py @@ -39,9 +39,9 @@ # Launch Maxwell 3D. m3d = Maxwell3d( - projectname=aedt_file, - specified_version=AEDT_VERSION, - new_desktop_session=True, + project=aedt_file, + version=AEDT_VERSION, + new_desktop=True, non_graphical=non_graphical, ) diff --git a/examples/03-Maxwell/Maxwell3D_Team3_bath_plate.py b/examples/03-Maxwell/Maxwell3D_Team3_bath_plate.py index a6cce84fc..09c7354d3 100644 --- a/examples/03-Maxwell/Maxwell3D_Team3_bath_plate.py +++ b/examples/03-Maxwell/Maxwell3D_Team3_bath_plate.py @@ -34,18 +34,18 @@ # ``Maxwell3d`` class named ``m3d``. # + -project_name = "COMPUMAG" +project_name = os.path.join(temp_dir.name, "COMPUMAG.aedt") design_name = "TEAM 3 Bath Plate" solver = "EddyCurrent" desktop_version = AEDT_VERSION m3d = pyaedt.Maxwell3d( - projectname=project_name, - designname=design_name, + project=project_name, + design=design_name, solution_type=solver, - specified_version=desktop_version, + version=desktop_version, non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, ) uom = m3d.modeler.model_units = "mm" @@ -77,20 +77,20 @@ # Draw a ladder plate and assign it the newly created material ``team3_aluminium``. m3d.modeler.create_box( - position=[-30, -55, 0], - dimensions_list=[60, 110, -6.35], + origin=[-30, -55, 0], + sizes=[60, 110, -6.35], name="LadderPlate", - matname="team3_aluminium", + material="team3_aluminium" ) -m3d.modeler.create_box(position=[-20, -35, 0], dimensions_list=[40, 30, -6.35], name="CutoutTool1") -m3d.modeler.create_box(position=[-20, 5, 0], dimensions_list=[40, 30, -6.35], name="CutoutTool2") +m3d.modeler.create_box(origin=[-20, -35, 0], sizes=[40, 30, -6.35], name="CutoutTool1") +m3d.modeler.create_box(origin=[-20, 5, 0], sizes=[40, 30, -6.35], name="CutoutTool2") m3d.modeler.subtract("LadderPlate", ["CutoutTool1", "CutoutTool2"], keep_originals=False) # ## Add mesh refinement to ladder plate # # Add a mesh refinement to the ladder plate. -m3d.mesh.assign_length_mesh("LadderPlate", maxlength=3, maxel=None, meshop_name="Ladder_Mesh") +m3d.mesh.assign_length_mesh("LadderPlate", maximum_length=3, maximum_elements=None, name="Ladder_Mesh") # ## Draw search coil and assign excitation # @@ -98,27 +98,30 @@ # The stranded type forces the current density to be constant in the coil. m3d.modeler.create_cylinder( - cs_axis="Z", - position=[0, "Coil_Position", 15], + orientation="Z", + origin=[0, "Coil_Position", 15], radius=40, height=20, name="SearchCoil", - matname="copper", + material="copper" ) m3d.modeler.create_cylinder( - cs_axis="Z", - position=[0, "Coil_Position", 15], + orientation="Z", + origin=[0, "Coil_Position", 15], radius=20, height=20, name="Bore", - matname="copper", + material="copper" ) m3d.modeler.subtract("SearchCoil", "Bore", keep_originals=False) m3d.modeler.section("SearchCoil", "YZ") m3d.modeler.separate_bodies("SearchCoil_Section1") m3d.modeler.delete("SearchCoil_Section1_Separate1") m3d.assign_current( - object_list=["SearchCoil_Section1"], amplitude=1260, solid=False, name="SearchCoil_Excitation" + assignment=["SearchCoil_Section1"], + amplitude=1260, + solid=False, + name="SearchCoil_Excitation" ) # ## Draw a line for plotting Bz @@ -128,21 +131,21 @@ # mesh locally around the line. line_points = [["0mm", "-55mm", "0.5mm"], ["0mm", "55mm", "0.5mm"]] -m3d.modeler.create_polyline(position_list=line_points, name="Line_AB") -poly = m3d.modeler.create_polyline(position_list=line_points, name="Line_AB_MeshRefinement") +m3d.modeler.create_polyline(points=line_points, name="Line_AB") +poly = m3d.modeler.create_polyline(points=line_points, name="Line_AB_MeshRefinement") poly.set_crosssection_properties(type="Circle", width="0.5mm") # ## Plot model # # Plot the model. -m3d.plot(show=False, export_path=os.path.join(temp_dir.name, "Image.jpg"), plot_air_objects=False) +m3d.plot(show=False, output_file=os.path.join(temp_dir.name, "Image.jpg"), plot_air_objects=False) # ## Add Maxwell 3D setup # # Add a Maxwell 3D setup with frequency points at 50 Hz and 200 Hz. -setup = m3d.create_setup(setupname="Setup1") +setup = m3d.create_setup(name="Setup1") setup.props["Frequency"] = "200Hz" setup.props["HasSweepSetup"] = True setup.add_eddy_current_sweep(range_type="LinearStep", start=50, end=200, count=150, clear=True) @@ -152,12 +155,8 @@ # Adjust eddy effects for the ladder plate and the search coil. The setting for # eddy effect is ignored for the stranded conductor type used in the search coil. -m3d.eddy_effects_on( - object_list=["LadderPlate"], activate_eddy_effects=True, activate_displacement_current=True -) -m3d.eddy_effects_on( - object_list=["SearchCoil"], activate_eddy_effects=False, activate_displacement_current=True -) +m3d.eddy_effects_on(assignment=["LadderPlate"], enable_eddy_effects=True, enable_displacement_current=True) +m3d.eddy_effects_on(assignment=["SearchCoil"], enable_eddy_effects=False, enable_displacement_current=True) # ## Add linear parametric sweep # @@ -196,11 +195,11 @@ m3d.post.create_report( expressions="mag(Bz)", - report_category="Fields", - context="Line_AB", variations=variations, primary_sweep_variable="Distance", - plotname="mag(Bz) Along 'Line_AB' Coil", + report_category="Fields", + context="Line_AB", + plot_name="mag(Bz) Along 'Line_AB' Coil" ) # - @@ -240,12 +239,14 @@ ladder_plate = m3d.modeler.objects_by_name["LadderPlate"] intrinsic_dict = {"Freq": "50Hz", "Phase": "0deg"} m3d.post.create_fieldplot_surface( - ladder_plate.faces, quantityName="Mag_J", intrinsincDict=intrinsic_dict, plot_name="Mag_J" + ladder_plate.faces, "Mag_J", + intrinsics=intrinsic_dict, + plot_name="Mag_J" ) # ## Release AEDT # # Release AEDT and remove both the project and temporary directory. -m3d.release_desktop(True, True) +m3d.release_desktop() temp_dir.cleanup() diff --git a/examples/03-Maxwell/Maxwell_Control_Program.py b/examples/03-Maxwell/Maxwell_Control_Program.py index 064676820..3545e5d9a 100644 --- a/examples/03-Maxwell/Maxwell_Control_Program.py +++ b/examples/03-Maxwell/Maxwell_Control_Program.py @@ -46,9 +46,9 @@ # Launch Maxwell 2D. m2d = Maxwell2d( - projectname=aedt_file, - specified_version=AEDT_VERSION, - new_desktop_session=True, + project=aedt_file, + version=AEDT_VERSION, + new_desktop=True, non_graphical=non_graphical, ) diff --git a/examples/03-Maxwell/Maxwell_Magnet.py b/examples/03-Maxwell/Maxwell_Magnet.py index 25e25aca3..1bbc704b8 100644 --- a/examples/03-Maxwell/Maxwell_Magnet.py +++ b/examples/03-Maxwell/Maxwell_Magnet.py @@ -31,9 +31,9 @@ # Launch AEDT in graphical mode. m3d = Maxwell3d( - projectname=generate_unique_project_name(), - specified_version=AEDT_VERSION, - new_desktop_session=True, + project=generate_unique_project_name(), + version=AEDT_VERSION, + new_desktop=True, non_graphical=non_graphical, ) diff --git a/examples/03-Maxwell/Maxwell_Transformer_Coreloss.py b/examples/03-Maxwell/Maxwell_Transformer_Coreloss.py index dea6188b6..bf8b92b4f 100644 --- a/examples/03-Maxwell/Maxwell_Transformer_Coreloss.py +++ b/examples/03-Maxwell/Maxwell_Transformer_Coreloss.py @@ -69,10 +69,10 @@ # Launch AEDT 2023 R2 in graphical mode. m3d = Maxwell3d( - projectname=aedt_file, - designname="02_3D eddycurrent_CmXY_for_thermal", - specified_version=AEDT_VERSION, - new_desktop_session=True, + project=aedt_file, + design="02_3D eddycurrent_CmXY_for_thermal", + version=AEDT_VERSION, + new_desktop=True, non_graphical=False, ) diff --git a/examples/04-Icepak/icepak_3d_components_example.py b/examples/04-Icepak/icepak_3d_components_example.py index 5cabdcc7e..be0907a41 100644 --- a/examples/04-Icepak/icepak_3d_components_example.py +++ b/examples/04-Icepak/icepak_3d_components_example.py @@ -34,11 +34,11 @@ # Create new empty project in non-graphical mode. ipk = Icepak( - projectname=os.path.join(temp_folder.name, "Heatsink.aedt"), - specified_version=AEDT_VERSION, + project=os.path.join(temp_folder.name, "Heatsink.aedt"), + version=AEDT_VERSION, non_graphical=non_graphical, close_on_exit=True, - new_desktop_session=True, + new_desktop=True, ) # Remove air region (which is present by default) because it is not needed as the heatsink will @@ -105,7 +105,7 @@ # ## Create QFP # Open the previously downloaded project containing a QPF. -ipk = Icepak(projectname=qfp_temp_name) +ipk = Icepak(project=qfp_temp_name) ipk.plot(show=False, export_path=os.path.join(temp_folder.name, "QFP2.jpg")) # Create dataset for power dissipation. @@ -164,7 +164,7 @@ # Download and open a project containing the electronic package. ipk = Icepak( - projectname=package_temp_name, specified_version=AEDT_VERSION, non_graphical=non_graphical + project=package_temp_name, version=AEDT_VERSION, non_graphical=non_graphical ) ipk.plot( objects=[o for o in ipk.modeler.object_names if not o.startswith("DomainBox")], diff --git a/examples/04-Icepak/icepak_csv_import.py b/examples/04-Icepak/icepak_csv_import.py index c3af9f263..ba85a6d54 100644 --- a/examples/04-Icepak/icepak_csv_import.py +++ b/examples/04-Icepak/icepak_csv_import.py @@ -28,9 +28,9 @@ temp_folder = tempfile.TemporaryDirectory(suffix=".ansys") ipk = pyaedt.Icepak( - projectname=os.path.join(temp_folder.name, "Icepak_CSV_Import.aedt"), - specified_version=AEDT_VERSION, - new_desktop_session=True, + project=os.path.join(temp_folder.name, "Icepak_CSV_Import.aedt"), + version=AEDT_VERSION, + new_desktop=True, non_graphical=False, ) # - diff --git a/examples/04-Icepak/icepak_ecad_import.py b/examples/04-Icepak/icepak_ecad_import.py index 4c32606ff..5d8c29cc4 100644 --- a/examples/04-Icepak/icepak_ecad_import.py +++ b/examples/04-Icepak/icepak_ecad_import.py @@ -22,9 +22,9 @@ temp_folder = tempfile.TemporaryDirectory(suffix=".ansys") ipk = pyaedt.Icepak( - projectname=os.path.join(temp_folder.name, "Icepak_ECAD_Import.aedt"), - specified_version=AEDT_VERSION, - new_desktop_session=True, + project=os.path.join(temp_folder.name, "Icepak_ECAD_Import.aedt"), + version=AEDT_VERSION, + new_desktop=True, non_graphical=True, ) # - @@ -67,7 +67,7 @@ # ## Import ECAD # Add an HFSS 3D Layout design with the layout information of the PCB -hfss3d_lo = Hfss3dLayout(projectname=def_path) +hfss3d_lo = Hfss3dLayout(project=def_path) hfss3d_lo.save_project() # Create a PCB component in Icepak linked to the 3D Layout project. The polygon ``"poly_0"`` diff --git a/examples/04-Icepak/icepak_graphic_card_example.py b/examples/04-Icepak/icepak_graphic_card_example.py index d6b0cbf6f..e601b19f3 100644 --- a/examples/04-Icepak/icepak_graphic_card_example.py +++ b/examples/04-Icepak/icepak_graphic_card_example.py @@ -31,9 +31,9 @@ # Open the project in without the GUI. ipk = pyaedt.Icepak( - projectname=project_temp_name, - specified_version=AEDT_VERSION, - new_desktop_session=True, + project=project_temp_name, + version=AEDT_VERSION, + new_desktop=True, non_graphical=True, ) diff --git a/examples/04-Icepak/icepak_sherlock_example.py b/examples/04-Icepak/icepak_sherlock_example.py index 531ed3b1f..288013d8c 100644 --- a/examples/04-Icepak/icepak_sherlock_example.py +++ b/examples/04-Icepak/icepak_sherlock_example.py @@ -53,7 +53,7 @@ # Open the project -ipk = pyaedt.Icepak(projectname=project_name) +ipk = pyaedt.Icepak(project=project_name) # Disable autosave to speed up the import. diff --git a/examples/05-Q3D/Q2D_Armoured_Cable.py b/examples/05-Q3D/Q2D_Armoured_Cable.py index 57d8d24d8..7244498c4 100644 --- a/examples/05-Q3D/Q2D_Armoured_Cable.py +++ b/examples/05-Q3D/Q2D_Armoured_Cable.py @@ -83,7 +83,7 @@ sweep_name = "sweep1" tb_design_name = "CableSystem" q2d = pyaedt.Q2d( - projectname=project_name, designname=q2d_design_name, specified_version=desktop_version + project=project_name, design=q2d_design_name, version=desktop_version ) # ## Define variables from dictionaries @@ -238,7 +238,7 @@ # ## Add a Simplorer/Twin Builder design and the Q3D dynamic component -tb = pyaedt.TwinBuilder(designname=tb_design_name) +tb = pyaedt.TwinBuilder(design=tb_design_name) # ## Add a Q3D dynamic component diff --git a/examples/05-Q3D/Q2D_Example_CPWG.py b/examples/05-Q3D/Q2D_Example_CPWG.py index 061ecbd2a..36a39b747 100644 --- a/examples/05-Q3D/Q2D_Example_CPWG.py +++ b/examples/05-Q3D/Q2D_Example_CPWG.py @@ -28,11 +28,11 @@ # uses SI units. q2d = pyaedt.Q2d( - specified_version=AEDT_VERSION, + version=AEDT_VERSION, non_graphical=False, - new_desktop_session=True, - projectname=os.path.join(temp_dir.name, "cpwg"), - designname="coplanar_waveguide", + new_desktop=True, + project=os.path.join(temp_dir.name, "cpwg"), + design="coplanar_waveguide", ) # ## Define variables diff --git a/examples/05-Q3D/Q2D_Example_Stripline.py b/examples/05-Q3D/Q2D_Example_Stripline.py index 7d34fa78f..ce6dc8fe7 100644 --- a/examples/05-Q3D/Q2D_Example_Stripline.py +++ b/examples/05-Q3D/Q2D_Example_Stripline.py @@ -28,11 +28,11 @@ # uses SI units. q2d = pyaedt.Q2d( - projectname=os.path.join(temp_dir.name, "stripline"), - designname="differential_stripline", - specified_version=AEDT_VERSION, + project=os.path.join(temp_dir.name, "stripline"), + design="differential_stripline", + version=AEDT_VERSION, non_graphical=False, - new_desktop_session=True, + new_desktop=True, ) # ## Define variables diff --git a/examples/05-Q3D/Q3D_DC_IR.py b/examples/05-Q3D/Q3D_DC_IR.py index e725a6d92..cbe7dbd54 100644 --- a/examples/05-Q3D/Q3D_DC_IR.py +++ b/examples/05-Q3D/Q3D_DC_IR.py @@ -104,7 +104,7 @@ edb.close_edb() h3d = pyaedt.Hfss3dLayout( - output_edb, specified_version=AEDT_VERSION, non_graphical=False, new_desktop_session=True + output_edb, version=AEDT_VERSION, non_graphical=False, new_desktop=True ) # - diff --git a/examples/05-Q3D/Q3D_Example_Busbars.py b/examples/05-Q3D/Q3D_Example_Busbars.py index 515401d4c..7c3bb3376 100644 --- a/examples/05-Q3D/Q3D_Example_Busbars.py +++ b/examples/05-Q3D/Q3D_Example_Busbars.py @@ -27,10 +27,10 @@ # Launch AEDT 2024 R1 in graphical mode and launch Q3D Extractor. This example uses SI units. q3d = pyaedt.Q3d( - projectname=os.path.join(temp_dir.name, "busbar"), - specified_version=AEDT_VERSION, + project=os.path.join(temp_dir.name, "busbar"), + version=AEDT_VERSION, non_graphical=False, - new_desktop_session=True, + new_desktop=True, ) # ## Create primitives diff --git a/examples/05-Q3D/Q3D_from_EDB.py b/examples/05-Q3D/Q3D_from_EDB.py index d4d7be1d7..824fd28b3 100644 --- a/examples/05-Q3D/Q3D_from_EDB.py +++ b/examples/05-Q3D/Q3D_from_EDB.py @@ -89,7 +89,7 @@ edb.close_edb() h3d = pyaedt.Hfss3dLayout( - output_edb, specified_version=AEDT_VERSION, non_graphical=True, new_desktop_session=True + output_edb, version=AEDT_VERSION, non_graphical=True, new_desktop=True ) # - diff --git a/examples/05-Q3D/index.rst b/examples/05-Q3D/index.rst index d49937f75..7af9a0b2c 100644 --- a/examples/05-Q3D/index.rst +++ b/examples/05-Q3D/index.rst @@ -9,5 +9,5 @@ Q3D Extractor. This includes model generation, setup, and thermal postprocessing Q2D_Example_CPWG.py Q2D_Example_Stripline.py Q3D_DC_IR.py - Q3D_Example.py + Q3D_Example_Busbars.py Q3D_from_EDB.py \ No newline at end of file diff --git a/examples/06-Multiphysics/Hfss_Icepak_Coupling.py b/examples/06-Multiphysics/Hfss_Icepak_Coupling.py index f5555f915..d0f91bb6c 100644 --- a/examples/06-Multiphysics/Hfss_Icepak_Coupling.py +++ b/examples/06-Multiphysics/Hfss_Icepak_Coupling.py @@ -41,11 +41,11 @@ # object is linked to it. Otherwise, a new design is created. hfss = pyaedt.Hfss( - projectname=os.path.join(temp_dir.name, "Icepak_HFSS_Coupling"), - designname="RF", - specified_version=AEDT_VERSION, + project=os.path.join(temp_dir.name, "Icepak_HFSS_Coupling"), + design="RF", + version=AEDT_VERSION, non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, solution_type="Modal", ) @@ -192,7 +192,7 @@ # design and the coupled physics analysis can be run. The `FieldAnalysis3D.copy_solid_bodies_from()` # method imports a model from HFSS into Icepak including all material definitions. -ipk = pyaedt.Icepak(designname="CalcTemp") +ipk = pyaedt.Icepak(design="CalcTemp") ipk.copy_solid_bodies_from(hfss) # ## Link RF Thermal Source diff --git a/examples/06-Multiphysics/Hfss_Mechanical.py b/examples/06-Multiphysics/Hfss_Mechanical.py index 4392eb8e6..8f14dc471 100644 --- a/examples/06-Multiphysics/Hfss_Mechanical.py +++ b/examples/06-Multiphysics/Hfss_Mechanical.py @@ -39,10 +39,10 @@ # Initialize HFSS. hfss = pyaedt.Hfss( - projectname=project_name, - specified_version=AEDT_VERSION, + project=project_name, + version=AEDT_VERSION, non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, ) hfss.change_material_override(True) @@ -120,7 +120,7 @@ # Get losses from HFSS and assign the convection to Mechanical. mech.assign_em_losses( - designname=hfss.design_name, + design=hfss.design_name, setupname=hfss.setups[0].name, sweepname="LastAdaptive", map_frequency=hfss.setups[0].props["Frequency"], diff --git a/examples/06-Multiphysics/MRI.py b/examples/06-Multiphysics/MRI.py index 9f7d09dfb..4ae73e8de 100644 --- a/examples/06-Multiphysics/MRI.py +++ b/examples/06-Multiphysics/MRI.py @@ -48,10 +48,10 @@ project_path = downloads.download_file(source="mri", destination=temp_dir.name) project_name = os.path.join(project_path, "background_SAR.aedt") hfss = Hfss( - projectname=project_name, - specified_version=AEDT_VERSION, + project=project_name, + version=AEDT_VERSION, non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, ) # ## Insert 3D component @@ -177,7 +177,7 @@ # Initialize a new Mechanical Transient Thermal analysis. # Mechanical Transient Thermal is available in AEDT from 2023 R2 as a Beta feature. -mech = Mechanical(solution_type="Transient Thermal", specified_version=AEDT_VERSION) +mech = Mechanical(solution_type="Transient Thermal", version=AEDT_VERSION) # ## Copy geometries # @@ -260,7 +260,7 @@ # # Initialize a new Icepak Transient Thermal analysis. -ipk = Icepak(solution_type="Transient", specified_version=AEDT_VERSION) +ipk = Icepak(solution_type="Transient", version=AEDT_VERSION) ipk.design_solutions.problem_type = "TemperatureOnly" # ## Copy geometries diff --git a/examples/07-Circuit/Circuit_AMI.py b/examples/07-Circuit/Circuit_AMI.py index dad2e684d..658aa4d57 100644 --- a/examples/07-Circuit/Circuit_AMI.py +++ b/examples/07-Circuit/Circuit_AMI.py @@ -12,6 +12,7 @@ # + import os import tempfile +import time from ansys.pyaedt.examples.constants import AEDT_VERSION from matplotlib import pyplot as plt @@ -62,30 +63,30 @@ # and starts the specified version in the specified mode. pyaedt.settings.enable_pandas_output = True -cir = pyaedt.Circuit( - projectname=os.path.join(project_path), +circuit = pyaedt.Circuit( + project=os.path.join(project_path), non_graphical=non_graphical, - specified_version=desktopVersion, - new_desktop_session=NewThread, + version=desktopVersion, + new_desktop=NewThread, ) # ## Solve AMI setup # # Solve the transient setup. -cir.analyze() +circuit.analyze() # ## Get AMI report # # Get AMI report data plot_name = "WaveAfterProbe" -cir.solution_type = "NexximAMI" -original_data = cir.post.get_solution_data( +circuit.solution_type = "NexximAMI" +original_data = circuit.post.get_solution_data( expressions=plot_name, setup_sweep_name="AMIAnalysis", domain="Time", - variations=cir.available_variations.nominal, + variations=circuit.available_variations.nominal, ) original_data_value = original_data.full_matrix_real_imag[0] original_data_sweep = original_data.primary_sweep_values @@ -110,11 +111,11 @@ setup_name = "AMIAnalysis" ignore_bits = 100 unit_interval = 0.1e-9 -sample_waveform = cir.post.sample_ami_waveform( +sample_waveform = circuit.post.sample_ami_waveform( setup=setup_name, probe=probe_name, source=source_name, - variation_list_w_value=cir.available_variations.nominal, + variation_list_w_value=circuit.available_variations.nominal, unit_interval=unit_interval, ignore_bits=ignore_bits, plot_type=plot_type, @@ -137,22 +138,22 @@ tstop_ns = scale_time * tstop tstart_ns = scale_time * tstart -for time in original_data_value[plot_name].index: - if tstart_ns <= time[0]: - start_index_original_data = time[0] +for time_value in original_data_value[plot_name].index: + if tstart_ns <= time_value[0]: + start_index_original_data = time_value[0] break -for time in original_data_value[plot_name][start_index_original_data:].index: - if time[0] >= tstop_ns: - stop_index_original_data = time[0] +for time_value in original_data_value[plot_name][start_index_original_data:].index: + if time_value[0] >= tstop_ns: + stop_index_original_data = time_value[0] break -for time in sample_waveform[0].index: - if tstart <= time: - sample_index = sample_waveform[0].index == time +for time_value in sample_waveform[0].index: + if tstart <= time_value: + sample_index = sample_waveform[0].index == time_value start_index_waveform = sample_index.tolist().index(True) break -for time in sample_waveform[0].index: - if time >= tstop: - sample_index = sample_waveform[0].index == time +for time_value in sample_waveform[0].index: + if time_value >= tstop: + sample_index = sample_waveform[0].index == time_value stop_index_waveform = sample_index.tolist().index(True) break @@ -196,12 +197,12 @@ # Get Transient report data plot_name = "V(b_input_43.int_ami_rx.eye_probe.out)" -cir.solution_type = "NexximTransient" -original_data = cir.post.get_solution_data( +circuit.solution_type = "NexximTransient" +original_data = circuit.post.get_solution_data( expressions=plot_name, setup_sweep_name="NexximTransient", domain="Time", - variations=cir.available_variations.nominal, + variations=circuit.available_variations.nominal, ) # ## Sample Waveform @@ -216,7 +217,7 @@ waveform_sweep_unit = original_data.units_sweeps["Time"] tics = np.arange(20e-9, 100e-9, 1e-10, dtype=float) -sample_waveform = cir.post.sample_waveform( +sample_waveform = circuit.post.sample_waveform( waveform_data=original_data_value, waveform_sweep=original_data_sweep, waveform_unit=waveform_unit, @@ -244,13 +245,13 @@ tstop_ns = scale_time * tstop tstart_ns = scale_time * tstart -for time in original_data_sweep: - if tstart_ns <= time: - start_index_original_data = original_data_sweep.index(time) +for time_value in original_data_sweep: + if tstart_ns <= time_value: + start_index_original_data = original_data_sweep.index(time_value) break -for time in original_data_sweep[start_index_original_data:]: - if time >= tstop_ns: - stop_index_original_data = original_data_sweep.index(time) +for time_value in original_data_sweep[start_index_original_data:]: + if time_value >= tstop_ns: + stop_index_original_data = original_data_sweep.index(time_value) break cont = 0 for frame in sample_waveform: @@ -297,8 +298,10 @@ # # Save the project and close AEDT. -cir.save_project() -print("Project Saved in {}".format(cir.project_path)) -cir.release_desktop() +circuit.save_project() +print("Project Saved in {}".format(circuit.project_path)) + +circuit.release_desktop() +time.sleep(3) temp_dir.cleanup() # Remove project folder and temporary files. diff --git a/examples/07-Circuit/Circuit_Example.py b/examples/07-Circuit/Circuit_Example.py index 246665468..b65f3dfbc 100644 --- a/examples/07-Circuit/Circuit_Example.py +++ b/examples/07-Circuit/Circuit_Example.py @@ -12,6 +12,7 @@ # + import os import tempfile +import time from ansys.pyaedt.examples.constants import AEDT_VERSION import pyaedt @@ -39,20 +40,24 @@ desktop_version = AEDT_VERSION non_graphical = False new_thread = True -temp_dir = tempfile.TemporaryDirectory(suffix=".ansys") - -desktop = pyaedt.launch_desktop(desktop_version, non_graphical, new_thread) -aedt_app = pyaedt.Circuit( - projectname=os.path.join(temp_dir.name, "CircuitExample"), designname="Simple" +temp_dir = tempfile.TemporaryDirectory(suffix=".ansys", ignore_cleanup_errors=True) + +circuit = pyaedt.Circuit( + project=os.path.join(temp_dir.name, "CircuitExample"), + design="Simple", + version=desktop_version, + non_graphical=non_graphical, + new_desktop=new_thread, ) -aedt_app.modeler.schematic.schematic_units = "mil" + +circuit.modeler.schematic.schematic_units = "mil" # - # ## Create circuit setup # # Create and customize an linear network analysis (LNA) setup. -setup1 = aedt_app.create_setup("MyLNA") +setup1 = circuit.create_setup("MyLNA") setup1.props["SweepDefinition"]["Data"] = "LINC 0GHz 4GHz 10001" # ## Place Components @@ -60,9 +65,9 @@ # Place components such as an inductor, resistor, and capacitor. The ``location`` argument # provides the ``[x, y]`` coordinates to place the component. -inductor = aedt_app.modeler.schematic.create_inductor(name="L1", value=1e-9, location=[0, 0]) -resistor = aedt_app.modeler.schematic.create_resistor(name="R1", value=50, location=[500, 0]) -capacitor = aedt_app.modeler.schematic.create_capacitor(name="C1", value=1e-12, location=[1000, 0]) +inductor = circuit.modeler.schematic.create_inductor(name="L1", value=1e-9, location=[0, 0]) +resistor = circuit.modeler.schematic.create_resistor(name="R1", value=50, location=[500, 0]) +capacitor = circuit.modeler.schematic.create_capacitor(name="C1", value=1e-12, location=[1000, 0]) # ## Get all pins # @@ -78,8 +83,8 @@ # # Place a port and a ground in the schematic. -port = aedt_app.modeler.components.create_interface_port(name="myport", location=[-300, 50]) -gnd = aedt_app.modeler.components.create_gnd(location=[1200, -100]) +port = circuit.modeler.components.create_interface_port(name="myport", location=[-300, 50]) +gnd = circuit.modeler.components.create_gnd(location=[1200, -100]) # ## Connect components # @@ -95,23 +100,23 @@ # # Create a transient setup. -setup2 = aedt_app.create_setup(name="MyTransient", setup_type=aedt_app.SETUPS.NexximTransient) +setup2 = circuit.create_setup(name="MyTransient", setup_type=circuit.SETUPS.NexximTransient) setup2.props["TransientData"] = ["0.01ns", "200ns"] -setup3 = aedt_app.create_setup(name="MyDC", setup_type=aedt_app.SETUPS.NexximDC) +setup3 = circuit.create_setup(name="MyDC", setup_type=circuit.SETUPS.NexximDC) # ## Solve transient setup # # Solve the transient setup. -aedt_app.analyze_setup("MyLNA") -aedt_app.export_fullwave_spice() +circuit.analyze_setup("MyLNA") +circuit.export_fullwave_spice() # ## Create report # # Display the scattering parameters. -solutions = aedt_app.post.get_solution_data( - expressions=aedt_app.get_traces_for_plot(category="S"), +solutions = circuit.post.get_solution_data( + expressions=circuit.get_traces_for_plot(category="S"), ) solutions.enable_pandas_output = True real, imag = solutions.full_matrix_real_imag @@ -129,6 +134,10 @@ # `pyaedt.Desktop.force_close_desktop` method. # All methods provide for saving the project before closing. -desktop.release_desktop() +circuit.save_project() +print("Project Saved in {}".format(circuit.project_path)) + +circuit.release_desktop() +time.sleep(3) -temp_dir.cleanup() # Remove project data and temporary working directory. +temp_dir.cleanup() # Remove project folder and temporary files. diff --git a/examples/07-Circuit/Circuit_Siwave_Multizones.py b/examples/07-Circuit/Circuit_Siwave_Multizones.py index 5442c43dd..039e42cc4 100644 --- a/examples/07-Circuit/Circuit_Siwave_Multizones.py +++ b/examples/07-Circuit/Circuit_Siwave_Multizones.py @@ -8,6 +8,7 @@ # + import os.path +import time import tempfile from ansys.pyaedt.examples.constants import EDB_VERSION @@ -20,7 +21,7 @@ # # Download the EDB folder. -temp_dir = tempfile.TemporaryDirectory(suffix=".ansys") +temp_dir = tempfile.TemporaryDirectory(suffix=".ansys", ignore_cleanup_errors=True) edb_file = pyaedt.downloads.download_file( directory="edb/siwave_multi_zones.aedb", destination=temp_dir.name ) @@ -68,7 +69,7 @@ # Create circuit design, import all sub-project as EM model and connect # all corresponding pins in circuit. -circuit = Circuit(specified_version=edb_version, projectname=circuit_project_file) +circuit = Circuit(version=edb_version, project=circuit_project_file) circuit.connect_circuit_models_from_multi_zone_cutout( project_connections=project_connexions, edb_zones_dict=edb_zones, @@ -112,6 +113,10 @@ # ## Release AEDT desktop # +circuit.save_project() +print("Project Saved in {}".format(circuit.project_path)) + circuit.release_desktop() +time.sleep(3) temp_dir.cleanup() # Remove the temporary working folder and all project files diff --git a/examples/07-Circuit/Circuit_Subcircuit_Example.py b/examples/07-Circuit/Circuit_Subcircuit_Example.py index 4907ef671..5d38a3081 100644 --- a/examples/07-Circuit/Circuit_Subcircuit_Example.py +++ b/examples/07-Circuit/Circuit_Subcircuit_Example.py @@ -10,6 +10,7 @@ import os import tempfile +import time from ansys.pyaedt.examples.constants import AEDT_VERSION import pyaedt @@ -24,13 +25,13 @@ # Launch AEDT in graphical mode. Instantite an instance of the ``Circuit`` class. non_graphical = False -temp_dir = tempfile.TemporaryDirectory(suffix=".ansys") +temp_dir = tempfile.TemporaryDirectory(suffix=".ansys", ignore_cleanup_errors=True) circuit = pyaedt.Circuit( - projectname=os.path.join(temp_dir.name, "SubcircuitExample"), - designname="SimpleExample", - specified_version=AEDT_VERSION, + project=os.path.join(temp_dir.name, "SubcircuitExample"), + design="SimpleExample", + version=AEDT_VERSION, non_graphical=non_graphical, - new_desktop_session=True, + new_desktop=True, ) circuit.modeler.schematic_units = "mil" @@ -69,6 +70,10 @@ # Release AEDT and clean up the temporary files. If you run this example locally and # want to keep the files, the project folder name can be retrieved from ``temp_file.name``. -circuit.release_desktop(True, True) +circuit.save_project() +print("Project Saved in {}".format(circuit.project_path)) -temp_dir.cleanup() # Clean up temporary folder and remove project data. +circuit.release_desktop() +time.sleep(3) + +temp_dir.cleanup() # Remove project folder and temporary files. diff --git a/examples/07-Circuit/Circuit_Transient.py b/examples/07-Circuit/Circuit_Transient.py index a1d6a4c25..5ae02adee 100644 --- a/examples/07-Circuit/Circuit_Transient.py +++ b/examples/07-Circuit/Circuit_Transient.py @@ -11,6 +11,7 @@ # + import os import tempfile +import time from ansys.pyaedt.examples.constants import AEDT_VERSION from matplotlib import pyplot as plt @@ -30,12 +31,12 @@ # Launch AEDT in graphical mode with the Circuit schematic editor. non_graphical = False -temp_dir = tempfile.TemporaryDirectory(suffix=".ansys") -cir = pyaedt.Circuit( - projectname=os.path.join(temp_dir.name, "CktTransient"), - designname="Circuit Examples", - specified_version=AEDT_VERSION, - new_desktop_session=True, +temp_dir = tempfile.TemporaryDirectory(suffix=".ansys", ignore_cleanup_errors=True) +circuit = pyaedt.Circuit( + project=os.path.join(temp_dir.name, "CktTransient"), + design="Circuit Examples", + version=AEDT_VERSION, + new_desktop=True, non_graphical=non_graphical, ) @@ -43,8 +44,8 @@ # # Read an IBIS file and place a buffer in the schematic editor. -ibis = cir.get_ibis_model_from_file( - os.path.join(cir.desktop_install_dir, "buflib", "IBIS", "u26a_800.ibs") +ibis = circuit.get_ibis_model_from_file( + os.path.join(circuit.desktop_install_dir, "buflib", "IBIS", "u26a_800.ibs") ) ibs = ibis.buffers["DQ_u26a_800"].insert(0, 0) @@ -52,15 +53,15 @@ # # Place an ideal transmission line in the schematic and parametrize it. -tr1 = cir.modeler.components.components_catalog["Ideal Distributed:TRLK_NX"].place("tr1") +tr1 = circuit.modeler.components.components_catalog["Ideal Distributed:TRLK_NX"].place("tr1") tr1.parameters["P"] = "50mm" # ## Component Placement # # Create a resistor and ground in the schematic. -res = cir.modeler.components.create_resistor(name="R1", value="1Meg") -gnd1 = cir.modeler.components.create_gnd() +res = circuit.modeler.components.create_resistor(name="R1", value="1Meg") +gnd1 = circuit.modeler.components.create_gnd() # ## Connect Componennts # @@ -74,10 +75,10 @@ # # Place a probe and rename it to ``Vout``. -pr1 = cir.modeler.components.components_catalog["Probes:VPROBE"].place("vout") +pr1 = circuit.modeler.components.components_catalog["Probes:VPROBE"].place("vout") pr1.parameters["Name"] = "Vout" pr1.pins[0].connect_to_component(res.pins[0]) -pr2 = cir.modeler.components.components_catalog["Probes:VPROBE"].place("Vin") +pr2 = circuit.modeler.components.components_catalog["Probes:VPROBE"].place("Vin") pr2.parameters["Name"] = "Vin" pr2.pins[0].connect_to_component(ibs.pins[0]) @@ -85,9 +86,9 @@ # # Create a transient analysis setup and analyze it. -trans_setup = cir.create_setup(name="TransientRun", setup_type="NexximTransient") +trans_setup = circuit.create_setup(name="TransientRun", setup_type="NexximTransient") trans_setup.props["TransientData"] = ["0.01ns", "200ns"] -cir.analyze_setup("TransientRun") +circuit.analyze_setup("TransientRun") # ## Results # @@ -96,10 +97,10 @@ # The ``solutions.plot()`` method uses # [Matplotlib](https://matplotlib.org/). -report = cir.post.create_report("V(Vout)", domain="Time") +report = circuit.post.create_report("V(Vout)", domain="Time") if not non_graphical: report.add_cartesian_y_marker(0) -solutions = cir.post.get_solution_data(domain="Time") +solutions = circuit.post.get_solution_data(domain="Time") solutions.plot("V(Vout)") # ## Visualize Results @@ -108,7 +109,7 @@ # fully customizable and usable with most of the reports available in AEDT. # The standard report is the main one used in Circuit and Twin Builder. -new_report = cir.post.reports_by_category.standard("V(Vout)") +new_report = circuit.post.reports_by_category.standard("V(Vout)") new_report.domain = "Time" new_report.create() if not non_graphical: @@ -140,7 +141,7 @@ # # Create an eye diagram inside AEDT using the ``new_eye`` object. -new_eye = cir.post.reports_by_category.eye_diagram("V(Vout)") +new_eye = circuit.post.reports_by_category.eye_diagram("V(Vout)") new_eye.unit_interval = "1e-9s" new_eye.time_stop = "100ns" new_eye.create() @@ -187,7 +188,10 @@ # # Release AEDT. -cir.save_project() -cir.release_desktop() +circuit.save_project() +print("Project Saved in {}".format(circuit.project_path)) -temp_dir.cleanup() # Clean up temporary working folder and project files. +circuit.release_desktop() +time.sleep(3) + +temp_dir.cleanup() # Remove project folder and temporary files. diff --git a/examples/07-Circuit/Create_Netlist.py b/examples/07-Circuit/Create_Netlist.py index 5581d9a51..8ff15e0c6 100644 --- a/examples/07-Circuit/Create_Netlist.py +++ b/examples/07-Circuit/Create_Netlist.py @@ -12,11 +12,12 @@ # + import os import tempfile +import time from ansys.pyaedt.examples.constants import AEDT_VERSION import pyaedt -temp_dir = tempfile.TemporaryDirectory(suffix=".ansys") +temp_dir = tempfile.TemporaryDirectory(suffix=".ansys", ignore_cleanup_errors=True) netlist = pyaedt.downloads.download_netlist(destination=temp_dir.name) # - @@ -32,7 +33,6 @@ # The Boolean parameter ``new_thread`` defines whether to create a new instance # of AEDT or try to connect to an existing instance of it. -desktopVersion = AEDT_VERSION non_graphical = False new_thread = True @@ -41,14 +41,18 @@ # Launch AEDT with Circuit. The `pyaedt.Desktop` class initializes AEDT # and starts it on the specified version in the specified graphical mode. -desktop = pyaedt.launch_desktop(desktopVersion, non_graphical, new_thread) -aedtapp = pyaedt.Circuit(projectname=os.path.join(temp_dir.name, "NetlistExample")) +circuit = pyaedt.Circuit( + project=os.path.join(temp_dir.name, "NetlistExample"), + version=AEDT_VERSION, + non_graphical=non_graphical, + new_desktop=new_thread +) # ## Define a Parameter # # Specify the voltage as a parameter. -aedtapp["Voltage"] = "5" +circuit["Voltage"] = "5" # ## Create schematic from netlist file # @@ -56,13 +60,18 @@ # method reads the netlist file and parses it. All components are parsed # but only these categories are mapped: R, L, C, Q, U, J, V, and I. -aedtapp.create_schematic_from_netlist(netlist) +circuit.create_schematic_from_netlist(netlist) # ## Finish # # After adding any other desired functionalities, close the project and release # AEDT. -desktop.release_desktop() -temp_dir.cleanup() # Clean up temporary directory and project data. +circuit.save_project() +print("Project Saved in {}".format(circuit.project_path)) + +circuit.release_desktop() +time.sleep(3) + +temp_dir.cleanup() # Remove project folder and temporary files. diff --git a/examples/07-Circuit/Results.py b/examples/07-Circuit/Results.py index a3163ce3b..319e99447 100644 --- a/examples/07-Circuit/Results.py +++ b/examples/07-Circuit/Results.py @@ -11,11 +11,12 @@ # + import os import tempfile +import time from IPython.display import Image import pyaedt # Set local path to path for the project data. -temp_dir = tempfile.TemporaryDirectory(suffix=".ansys") +temp_dir = tempfile.TemporaryDirectory(suffix=".ansys", ignore_cleanup_errors=True) project_path = pyaedt.downloads.download_file(source="custom_reports/", destination=temp_dir.name) aedt_version = "2024.1" @@ -40,12 +41,13 @@ non_graphical = True NewThread = True -cir = pyaedt.Circuit(projectname=os.path.join(project_path, 'CISPR25_Radiated_Emissions_Example23R1.aedtz'), - non_graphical=non_graphical, - specified_version=aedt_version, - new_desktop_session=True - ) -cir.analyze() # Run the circuit analysis. +circuit = pyaedt.Circuit( + project=os.path.join(project_path, 'CISPR25_Radiated_Emissions_Example23R1.aedtz'), + non_graphical=non_graphical, + version=aedt_version, + new_desktop=True +) +circuit.analyze() # Run the circuit analysis. # - # ## Create a Spectral Report @@ -54,19 +56,19 @@ # notes can be added to the report. The report axes, grid, and the legend can also be modified. The custom reports # can be created in AEDT in non-graphical mode using version 2023 R2 and later. -report1 = cir.post.create_report_from_configuration(os.path.join(project_path, 'Spectrum_CISPR_Basic.json')) -out = cir.post.export_report_to_jpg(project_path=cir.working_directory, plot_name=report1.plot_name) +report1 = circuit.post.create_report_from_configuration(os.path.join(project_path, 'Spectrum_CISPR_Basic.json')) +out = circuit.post.export_report_to_jpg(project_path=circuit.working_directory, plot_name=report1.plot_name) # Now render the image. -Image(os.path.join(cir.working_directory, report1.plot_name + ".jpg")) +Image(os.path.join(circuit.working_directory, report1.plot_name + ".jpg")) # Every aspect of the report can be customized. The method ``crate_report_from_configuration`` reads the # report configuration from a ``*.json`` file and generates the custom report. -report1_full = cir.post.create_report_from_configuration(os.path.join(project_path, 'Spectrum_CISPR_Custom.json')) -out = cir.post.export_report_to_jpg(cir.working_directory, report1_full.plot_name) -Image(os.path.join(cir.working_directory, report1_full.plot_name + ".jpg")) +report1_full = circuit.post.create_report_from_configuration(os.path.join(project_path, 'Spectrum_CISPR_Custom.json')) +out = circuit.post.export_report_to_jpg(circuit.working_directory, report1_full.plot_name) +Image(os.path.join(circuit.working_directory, report1_full.plot_name + ".jpg")) # ## Transient Report # @@ -77,9 +79,9 @@ # + props = pyaedt.general_methods.read_json(os.path.join(project_path, 'Transient_CISPR_Custom.json')) -report2 = cir.post.create_report_from_configuration(report_settings=props, solution_name="NexximTransient") -out = cir.post.export_report_to_jpg(cir.working_directory, report2.plot_name) -Image(os.path.join(cir.working_directory, report2.plot_name + ".jpg")) +report2 = circuit.post.create_report_from_configuration(report_settings=props, solution_name="NexximTransient") +out = circuit.post.export_report_to_jpg(circuit.working_directory, report2.plot_name) +Image(os.path.join(circuit.working_directory, report2.plot_name + ".jpg")) # - # The ``props`` dictionary can be used to customize any aspect of an existing report or generate a new report. @@ -87,23 +89,23 @@ props["expressions"] = {"V(Battery)": {}, "V(U1_VDD)": {}} props["plot_name"] = "Battery Voltage" -report3 = cir.post.create_report_from_configuration(report_settings=props, solution_name="NexximTransient") -out = cir.post.export_report_to_jpg(cir.working_directory, report3.plot_name) -Image(os.path.join(cir.working_directory, report3.plot_name + ".jpg")) +report3 = circuit.post.create_report_from_configuration(report_settings=props, solution_name="NexximTransient") +out = circuit.post.export_report_to_jpg(circuit.working_directory, report3.plot_name) +Image(os.path.join(circuit.working_directory, report3.plot_name + ".jpg")) # ## Eye Diagram # # Create an eye diagram. the JSON file can be used to create an eye diagram, including the eye mask as demonsrated here. -report4 = cir.post.create_report_from_configuration(os.path.join(project_path, 'EyeDiagram_CISPR_Basic.json')) -out = cir.post.export_report_to_jpg(cir.working_directory, report4.plot_name) -Image(os.path.join(cir.working_directory, report4.plot_name + ".jpg")) +report4 = circuit.post.create_report_from_configuration(os.path.join(project_path, 'EyeDiagram_CISPR_Basic.json')) +out = circuit.post.export_report_to_jpg(circuit.working_directory, report4.plot_name) +Image(os.path.join(circuit.working_directory, report4.plot_name + ".jpg")) # + -report4_full = cir.post.create_report_from_configuration(os.path.join(project_path, 'EyeDiagram_CISPR_Custom.json')) +report4_full = circuit.post.create_report_from_configuration(os.path.join(project_path, 'EyeDiagram_CISPR_Custom.json')) -out = cir.post.export_report_to_jpg(cir.working_directory, report4_full.plot_name) -Image(os.path.join(cir.working_directory, report4_full.plot_name + ".jpg")) +out = circuit.post.export_report_to_jpg(circuit.working_directory, report4_full.plot_name) +Image(os.path.join(circuit.working_directory, report4_full.plot_name + ".jpg")) # - # ## Save project and close AEDT @@ -111,9 +113,11 @@ # Save the project and close AEDT. The example has finished running. Project files can be retrieved # from ``temp_dir.name``. -cir.save_project() -print("Project Saved in {}".format(cir.project_path)) -cir.release_desktop() +circuit.save_project() +print("Project Saved in {}".format(circuit.project_path)) + +circuit.release_desktop() +time.sleep(3) # ## Cleanup # diff --git a/examples/07-Circuit/_static/spectrum_plot.png b/examples/07-Circuit/_static/spectrum_plot.png new file mode 100644 index 000000000..44dc027e8 Binary files /dev/null and b/examples/07-Circuit/_static/spectrum_plot.png differ diff --git a/examples/07-Circuit/index.rst b/examples/07-Circuit/index.rst index 5cedc20ba..74bf15bc2 100644 --- a/examples/07-Circuit/index.rst +++ b/examples/07-Circuit/index.rst @@ -11,5 +11,5 @@ This includes schematic generation, setup, and postprocessing. Circuit_Subcircuit_Example.py Circuit_Transient.py Create_Netlist.py - Reports.py + Results.py Touchstone_Management.py \ No newline at end of file diff --git a/examples/07-EMIT/ComputeInterferenceType.py b/examples/07-EMIT/ComputeInterferenceType.py index 3eb5f934f..9658ea8ff 100644 --- a/examples/07-EMIT/ComputeInterferenceType.py +++ b/examples/07-EMIT/ComputeInterferenceType.py @@ -66,7 +66,7 @@ def install(package): non_graphical = False new_thread = True desktop = pyaedt.launch_desktop( - desktop_version, non_graphical=non_graphical, new_desktop_session=new_thread) + desktop_version, non_graphical=non_graphical, new_desktop=new_thread) # ## Download project @@ -78,7 +78,7 @@ def install(package): # ## Launch EMIT and open project -emitapp = Emit(non_graphical=False, new_desktop_session=False, projectname=path_to_desktop_project) +emitapp = Emit(non_graphical=False, new_desktop=False, project=path_to_desktop_project) # ## Get a List of Transmitters # diff --git a/examples/twin_builder/dynamic_rom_creation_and_visualization.py b/examples/twin_builder/dynamic_rom_creation_and_visualization.py index 864471ba5..5791cf959 100644 --- a/examples/twin_builder/dynamic_rom_creation_and_visualization.py +++ b/examples/twin_builder/dynamic_rom_creation_and_visualization.py @@ -65,10 +65,10 @@ # a default setup for building the dynamic ROM component. tb = TwinBuilder( - projectname=generate_unique_project_name(), - specified_version=desktop_version, + project=generate_unique_project_name(), + version=desktop_version, non_graphical=non_graphical, - new_desktop_session=new_thread, + new_desktop=new_thread, ) # ## Desktop Configuration diff --git a/examples/twin_builder/rc_circuit.py b/examples/twin_builder/rc_circuit.py index a798c00d4..e47131eac 100644 --- a/examples/twin_builder/rc_circuit.py +++ b/examples/twin_builder/rc_circuit.py @@ -32,10 +32,10 @@ # a default setup. tb = pyaedt.TwinBuilder( - projectname=pyaedt.generate_unique_project_name(), - specified_version=desktop_version, + project=pyaedt.generate_unique_project_name(), + version=desktop_version, non_graphical=non_graphical, - new_desktop_session=new_thread, + new_desktop=new_thread, ) tb.modeler.schematic_units = "mil" diff --git a/examples/twin_builder/static_rom_creation_and_visualization.py b/examples/twin_builder/static_rom_creation_and_visualization.py index ebaad54f1..31f2f2eb0 100644 --- a/examples/twin_builder/static_rom_creation_and_visualization.py +++ b/examples/twin_builder/static_rom_creation_and_visualization.py @@ -69,10 +69,10 @@ # a default setup for building the static ROM component. tb = TwinBuilder( - projectname=generate_unique_project_name(), - specified_version=desktop_version, + project=generate_unique_project_name(), + version=desktop_version, non_graphical=non_graphical, - new_desktop_session=new_thread, + new_desktop=new_thread, ) # ## Desktop Configuration diff --git a/examples/twin_builder/wiring_rectifier.py b/examples/twin_builder/wiring_rectifier.py index 8ef2ec013..8db2a12e7 100644 --- a/examples/twin_builder/wiring_rectifier.py +++ b/examples/twin_builder/wiring_rectifier.py @@ -37,10 +37,10 @@ # a default setup. tb = pyaedt.TwinBuilder( - projectname=os.path.join(temp_dir.name, "TB_Rectifier_Demo"), - specified_version=desktop_version, + project=os.path.join(temp_dir.name, "TB_Rectifier_Demo"), + version=desktop_version, non_graphical=non_graphical, - new_desktop_session=new_thread, + new_desktop=new_thread, ) # ## Create components for bridge rectifier