Happy Friday! This week I am starting a new series about a plug-in for tagging materials in views. I’m going to focus on tagging walls in the interior elevation views, but you can also adjust it for other views. There’s a few challenges I ran into after placing the tags with the API, but I still want to share the process.
We need two methods to collect the views we want. The first is the filtered element collector to get the interior elevation ViewTypeId. We look for all view of Type elevation and that contain the string “int”. If you want to collect other types of views, like floor plans, you can adjust the filter accordingly.
The second method then collects all the views that match the TypeId we just found. In our case, it filters down to the interior elevation views in the project.
Then we can use another filtered element collector to get all the walls for each of the views we collected. We want to tag walls since we are looking at the interior elevations views. If you are applying this to plan views, for example, you can collect the floors instead.
And in a few simple steps, we have a list of all the elements that we want to tag. Next week, we’ll take a look at determining the tag location.
If you want to learn to code and don’t know where to start check out my posts about Steps to Learn to Code [for architects and designers] Part 1 and Part 2.