Can I assign a space label to an object as a parameter ?

Can I assign a space label to an object as a parameter ?

lorris_lassemblee
Community Visitor Community Visitor
241 Views
1 Reply
Message 1 of 2

Can I assign a space label to an object as a parameter ?

lorris_lassemblee
Community Visitor
Community Visitor

Hello,

 

In my projects I often have to write down manually on excel in which space/room an object is placed. the room has a unique label. I cannot seem to find a way to create a parameter to add to my family (whatever it is) that will automatically assign the label of the room to the said object, just from where it attachment point is (for example).

having 2 thousands electrical components (sensors, cameras, card scanners,....) per model, that would save me weeks per project ! 

Is this something revit can manage ? 

Thank you for reading that, I look forward seeing your opinion on that.

242 Views
1 Reply
Reply (1)
Message 2 of 2

pyaezoneas
Contributor
Contributor

There is FamilyInstance.Room class.

https://www.revitapidocs.com/2018/37944e7a-f298-9c25-20bb-9c0c1da46f41.htm

Maybe it will go like this.

1. Get all objects (family instances) using filtered element collector.

2. Get the room info of each family instance using the above mentioned familyInstance.Room method.

3. Get the label of the room you get on step 2. (I think it will be some new parameter you defined for that room)

4. Assign that parameter value to the required parameter value of your object(family instance).

0 Likes