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

get materials in project #3886

Merged
merged 11 commits into from
Nov 17, 2023
Merged

get materials in project #3886

merged 11 commits into from
Nov 17, 2023

Conversation

gmalinve
Copy link
Collaborator

No description provided.

@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@gmalinve gmalinve linked an issue Nov 15, 2023 that may be closed by this pull request
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Merging #3886 (0b68c12) into main (d269917) will decrease coverage by 2.60%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3886      +/-   ##
==========================================
- Coverage   81.29%   78.70%   -2.60%     
==========================================
  Files         182      182              
  Lines       62822    62825       +3     
==========================================
- Hits        51071    49445    -1626     
- Misses      11751    13380    +1629     

Copy link
Member

@Samuelopez-ansys Samuelopez-ansys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmalinve this returns the project materials and not the design materials, right?

What’s the difference with the is_used method?

Copy link
Collaborator

@MaxJPRey MaxJPRey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@gmalinve
Copy link
Collaborator Author

@Samuelopez-ansys I should have used the method GetInUseProjectMaterialNames() instead but for me this method is also useful to get the used project materials as a list whereas is_used is a property of the material.
I could retrieve all materials in a project and then parse them in a for loop to check if they are used with the is_used prop but this method automatically retrieve the list, which in same cases can be useful.

pyaedt/modules/MaterialLib.py Outdated Show resolved Hide resolved
pyaedt/modules/MaterialLib.py Outdated Show resolved Hide resolved
Copy link
Member

@Samuelopez-ansys Samuelopez-ansys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_unittest/test_03_Materials.py Outdated Show resolved Hide resolved
_unittest/test_03_Materials.py Outdated Show resolved Hide resolved
pyaedt/modules/MaterialLib.py Outdated Show resolved Hide resolved
Samuelopez-ansys and others added 4 commits November 17, 2023 11:26
Co-authored-by: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com>
Co-authored-by: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com>
Co-authored-by: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com>
@gmalinve gmalinve changed the title get materials in design get materials in project Nov 17, 2023
pyaedt/modules/MaterialLib.py Outdated Show resolved Hide resolved
@gmalinve gmalinve merged commit 9eeb5d9 into main Nov 17, 2023
12 checks passed
@gmalinve gmalinve deleted the get_materials_in_design branch November 17, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get list of materials used in project
4 participants