Skip to content

Fix for #2818 ensure#2819

Merged
jmcouffin merged 2 commits intopyrevitlabs:developfrom
Wurschdhaud:fix-for-#2818-ensure
Sep 26, 2025
Merged

Fix for #2818 ensure#2819
jmcouffin merged 2 commits intopyrevitlabs:developfrom
Wurschdhaud:fix-for-#2818-ensure

Conversation

@Wurschdhaud
Copy link
Copy Markdown
Contributor

Description

Fixes missing Int64 check.


Checklist

Before submitting your pull request, ensure the following requirements are met:

  • Code follows the PEP 8 style guide.
  • Code has been formatted with Black using the command:
    pipenv run black {source_file_or_directory}
  • Changes are tested and verified to work as expected.

Related Issues

If applicable, link the issues resolved by this pull request:


Additional Notes

tested in Revit 2024 via:

from pyrevit.revit.db.ensure import ensure_element_ids
from pyrevit import revit

el = revit.pick_element()

el_id = el.Id
el_id_val1 = el_id.IntegerValue
el_id_val2 = el_id.Value

print(el_id_val1, type(el_id_val1))
print(el_id_val2, type(el_id_val2))

print(ensure_element_ids(el))
print(ensure_element_ids(el_id))
print(ensure_element_ids(el_id_val1))
print(ensure_element_ids(el_id_val2))

Output:

(1588869, <type 'int'>)
(1588869L, <type 'Int64'>)
[<Autodesk.Revit.DB.ElementId object at 0x000000000000C3F7 [1588869]>]
[<Autodesk.Revit.DB.ElementId object at 0x000000000000C3F8 [1588869]>]
[<Autodesk.Revit.DB.ElementId object at 0x000000000000C3F9 [1588869]>]
[<Autodesk.Revit.DB.ElementId object at 0x000000000000C3FA [1588869]>]

Thank you for contributing to pyRevit! 🎉

@devloai
Copy link
Copy Markdown
Contributor

devloai bot commented Sep 26, 2025

Unable to perform a code review. You have run out of credits 😔
Please upgrade your plan or buy additional credits from the subscription page.

@jmcouffin jmcouffin added the API Change Revit API change that breaks pyRevit [class->Upgraded #{number}: {title}] label Sep 26, 2025
@jmcouffin jmcouffin merged commit e399529 into pyrevitlabs:develop Sep 26, 2025
@jmcouffin
Copy link
Copy Markdown
Contributor

@Wurschdhaud keep them coming!

@Wurschdhaud Wurschdhaud deleted the fix-for-#2818-ensure branch September 26, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Change Revit API change that breaks pyRevit [class->Upgraded #{number}: {title}]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: revit.db.ensure - ensure_element_ids missing support for Revit>2024

2 participants