Good morning all,
I was wondering if someone can help me create a macro that allows me to assign a value to a shared parameter in revit based on a scope box location.
For example, scope box A represents Building A and I want to assign a code for all the columns in that building at ground level. Is there a way to do that?
Thank you in advance!
I cannot seem to find the Scope Boxes in the categories drop-down list… is that normal?
Thank you for your time Vikram!
@georges.rizkallah Try downloading and using the Dynamo build I’ve used from here
That’s great! It works.
Now I’m having an issue with the new parameter that you called “building”. when I go back to my Revit model, the parameter is empty.
Thanks again for your help!
@georges.rizkallah Building is a project parameter I created for this example, you can replace it with the shared parameter you mentioned in your original post
Yes I am aware of that, I create the shared parameter and everything, but when I run the macro, the parameter is still empty, the values I put in the code block do not fill the parameter. Is there a reason for that?
Thanks
In the absence of files to look at I’d suggest checking if the parameter type is Text (as we are feeding in strings). But this is just a wild guess, would be better if you upload a small sample file.
Vikram,
Actually it is returning a value for one column only, not all of them.
I don’t know if that helps.
Observe the lacing on the nodes in my post.
The lacing on BoundingBox.Contains is set to Cross Product.
Also ensure that the the number of values corresponds with the number of scope boxes.
1 Like
Is there a way to modify the shape of the bounding box, for example give the bounding box the shape of a mass (cylinder, building footprint,…)?
Or the bounding box has to be a cube? If not, how can I detect all the elements found within a mass excluding everything around it?
Thank you!
Check which elements, selected Element geometry intersects.
Use Geometry.DoesIntersect
Could you show me how it would work with the previous example.
I want to detect all the columns (elements) that intersects with mass 1 and mass 2 and name the column parameter based on the mass it intersects
Thank you in advance
This seems to work for only one column, and not all
Explore other Lacing options (Longest and Cross Product) on Geometry.DoesIntersect node
I have, the longest also works for one column.
The cross product gives this warning: Warning: Internal error, please report: Dereferencing a non-pointer. (3f47aacd)
I think the problem is that the GeometryDoesIntersect Node creats a sublist and this list does not get mapped in the ListMap Node.
Is there a way to overcome this?