Skip to content

Commit efbe7ca

Browse files
FEAT: Added a new class to customize Page Ports and added 2 new properties (#6374)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 8d44e44 commit efbe7ca

File tree

10 files changed

+462
-448
lines changed

10 files changed

+462
-448
lines changed

SECURITY.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
SOFTWARE.
2323
-->
2424

25-
## Reporting a vulnerability
25+
# Security Policy
26+
27+
## Reporting a vulnerability
2628

2729
> [!CAUTION]
2830
> Do not use GitHub issues to report any security vulnerabilities.
@@ -32,7 +34,7 @@ mentioning the repository and the details of your finding. The team will address
3234

3335
Provide the PyAnsys Core team with this information:
3436

35-
- Any specific configuration settings needed to reproduce the problem
36-
- Step-by-step guidance to reproduce the problem
37-
- The exact location of the problematic source code, including tag, branch, commit, or a direct URL
38-
- The potential consequences of the vulnerability, along with a description of how an attacker could take advantage of the issue
37+
- Any specific configuration settings needed to reproduce the problem
38+
- Step-by-step guidance to reproduce the problem
39+
- The exact location of the problematic source code, including tag, branch, commit, or a direct URL
40+
- The potential consequences of the vulnerability, along with a description of how an attacker could take advantage of the issue

doc/changelog.d/6374.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a new class to customize page ports and added 2 new properties

src/ansys/aedt/core/application/analysis_nexxim.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
from ansys.aedt.core.generic.general_methods import pyaedt_function_handler
2929
from ansys.aedt.core.generic.settings import settings
3030
from ansys.aedt.core.modeler.circuits.object_3d_circuit import CircuitComponent
31+
from ansys.aedt.core.modeler.circuits.object_3d_circuit import Excitations
3132
from ansys.aedt.core.modules.boundary.circuit_boundary import CurrentSinSource
32-
from ansys.aedt.core.modules.boundary.circuit_boundary import Excitations
3333
from ansys.aedt.core.modules.boundary.circuit_boundary import PowerIQSource
3434
from ansys.aedt.core.modules.boundary.circuit_boundary import PowerSinSource
3535
from ansys.aedt.core.modules.boundary.circuit_boundary import Sources
@@ -90,7 +90,7 @@ def __init__(
9090

9191
self._modeler = None
9292
self._post = None
93-
self._internal_excitations = None
93+
self._internal_excitations = {}
9494
self._internal_sources = None
9595
self._configurations = ConfigurationsNexxim(self)
9696
if not settings.lazy_load:
@@ -366,9 +366,11 @@ def design_excitations(self):
366366
>>> oModule.GetExcitations
367367
"""
368368
props = {}
369+
369370
if not self._internal_excitations:
370-
for port in self.excitation_names:
371-
props[port] = Excitations(self, port)
371+
for comp in self.modeler.schematic.components.values():
372+
if comp.name in self.excitation_names:
373+
props[comp.name] = comp
372374
self._internal_excitations = props
373375
else:
374376
props = self._internal_excitations

src/ansys/aedt/core/internal/grpc_plugin_dll_class.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,15 @@ def __GetPropAttributes(self):
204204

205205
def __dir__(self):
206206
ret = super().__dir__().copy()
207-
for attrName, _ in self.__GetPropAttributes():
208-
ret.append(attrName)
207+
try:
208+
for attrName, _ in self.__GetPropAttributes().items():
209+
ret.append(attrName)
210+
except Exception:
211+
try:
212+
for attrName, _ in self.__GetPropAttributes():
213+
ret.append(attrName)
214+
except Exception:
215+
return ret
209216
return ret
210217

211218
def __getattr__(self, attrName):

0 commit comments

Comments
 (0)