Get elements of category inside Bounding Box

Hello, I’ve built out a script which gets rooms from a linked file and creates a directshape in the parent container file
I then use the bounding box of the room to get elements inside each room and assign the count of the object i.e furniture, specialty equipment etc to the mass as a custom parameter
I tested this script in rvt 2021 and worked fine however, upgrading to rvt 2024 the bimorph nodes aren’t functioning (refer to image attached)
Error messages on nodes are as follows:
LinkElement.OfCategory
LinkElement.OfCategory operation failed. Method not found ‘int32
Reviteements.category.get_Id()’.

Boundingbox.getelementsinside
Boundingbox.getelementsinside operation failed. Objectreference not set to an instance of an object

Hi @nathan.ominski and welcomehere…seems you are in 2024 right ? if so i dont think bimorph is upgraded yet…does it work in 2022-2023 ?

Hi @sovitek thank you for the welcome … correct currently need this to be functional for 2024
Not entirely sure if works in 22 / 23. Are there any other methods that you’d suggest to get the same results?

Hi you could try collectlinkedinstances from spring for now, instead of linkelementoffcategori from bimorph and try with some inetersect or try with ootb bounding box its depends what your endgoal is…btw seems you miss feed in a linked instance…arhh it was for room then try ispointinsideroom

Here is an example on airteminals with springs and ootb nodes…hope it could help…

Hi @sovitek
Yes that link instance was originally linked but was unlinked when I took the screenshot.
The end goal is to get a count of how many elements are inside the rooms bounding box

1 Like

Why will you do it with boundingbox these are alway xy alignment at least in older version…see now in 2024 boundingbox can align…try as i show above and see if that could work…or another way

I’m getting a null value at element toroom (refer attached)

fyi seem to be having luck with this solution