Commit 9b2610d 1 parent 82f373a commit 9b2610d Copy full SHA for 9b2610d
File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -374,8 +374,8 @@ def add_q3d_dynamic_component(
374
374
375
375
Returns
376
376
-------
377
- bool
378
- ``True`` when successful, ``False`` when failed .
377
+ :class:`pyaedt.modeler.cad.object3dcircuit.CircuitComponent` or bool
378
+ Circuit component object if successful or ``False`` if fails .
379
379
380
380
References
381
381
----------
@@ -481,7 +481,10 @@ def add_q3d_dynamic_component(
481
481
port_info_list .extend (port_info_list_A )
482
482
port_info_list .extend (port_info_list_B )
483
483
if not state_space_dynamic_link_type or state_space_dynamic_link_type == "RLGC" :
484
- state_space_dynamic_link_type = "{}RLGCTBLink" .format (design_type )
484
+ if dkp .aedt_version_id >= "2024.1" : # pragma: no cover
485
+ state_space_dynamic_link_type = "Q3DRLGCLink"
486
+ else :
487
+ state_space_dynamic_link_type = "{}RLGCTBLink" .format (design_type )
485
488
q3d_model_type = 1
486
489
ref_pin_style = 5
487
490
enforce_passivity = False
@@ -566,8 +569,10 @@ def add_q3d_dynamic_component(
566
569
]
567
570
)
568
571
569
- self .modeler .schematic .create_component (component_library = "" , component_name = component_name )
570
-
571
- if is_loaded :
572
- app .close_project (save_project = False )
573
- return True
572
+ component = self .modeler .schematic .create_component (component_library = "" , component_name = component_name )
573
+ if component :
574
+ if is_loaded :
575
+ app .close_project (save_project = False )
576
+ return component
577
+ else : # pragma: no cover
578
+ raise ValueError ("Error in creating the component." )
You can’t perform that action at this time.
0 commit comments