Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance properties data access and changes #5587

Open
SMoraisAnsys opened this issue Dec 17, 2024 · 0 comments
Open

Enhance properties data access and changes #5587

SMoraisAnsys opened this issue Dec 17, 2024 · 0 comments
Labels
enhancement New features or code improvements

Comments

@SMoraisAnsys
Copy link
Collaborator

Description of the current limitations

Following #5488 it seems that some features of AEDT started to fail when updating some AEDT object properties.

For example, previously it was possible to update the motor steel type of an Rmxprt instance with
rmxprt.rotor["Steel Type"] = "steel_1008". While I feel like this was a "side effect" of the exception handling in

, it was still allowing users to write user friendly changes.
This is no longer working as the recent changes no longer trigger the exception and lead to executing aedt_object.SetPropValue("Steel Type", "steel_1008"). While this call returns True, it doesn't update the object correctly as calling aedt_object.GetPropValue("Steel Type") returns ['Not Assigned']. A workaround fixing that is to update the code to rmxprt.rotor["Steel Type"] = ["Material:=", "steel_1008"] which is not really great from a user point of view.
My question is thus, would it make sense to add some lines of code to handle such behavior ? Ofc, we need to figure out which other properties might be affected and if this behavior also applies to AEDT 25.1

Another thing I wanted to mentioned is how properties are accessed from some objects. Using the rotor as an illustration, one has to call rmxprt.rotor.properties.properties to get the properties in a dictionary format while rmxprt.rotor.properties returns a BinaryTreeNode. What about updating the code to directly returning the BinaryTreeNode properties instead of leaving that extra task to the user ?

Pinging @maxcapodi78 @Samuelopez-ansys @gmalinve for visibility

Code sample expected

NTBD

Useful links and references

No response

@SMoraisAnsys SMoraisAnsys added the enhancement New features or code improvements label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

No branches or pull requests

1 participant