lisa-marie mueller

lisa-marie mueller

bullet pont

rotating elevation markers link

March 27, 2020

ipad with title, large neon star, movie real, marker, blue Happy Friday everyone! Today has completed my second week of WFH and I have to say, I appreciate the short commute. I hope you have settled into a new routine as well and have all been staying safe and healthy.

As you know, I am tackling placing exterior elevations based on selected walls. An important step of our plug-in is to correctly align our elevation marker to our wall. When we placed our marker in Part 1, we put the ViewSection on the first available index on the marker. Now, we need to rotate the marker to correctly align to the wall. This will work for both orthogonal and angled walls.

goals and considerations

  • create an elevation marker for exterior walls by having the user select the walls
  • place the marker and elevation offset from the wall so it is legible
  • correctly phase the elevation markers
  • accommodate curved and angled walls

if you missed it:

Part 1: elevation by wall

Part 2: phases

GetViewSectionNormal

In order to get the angle that we will use to rotate the elevation marker, we first need to get the normal of the ViewSection. This is the vector of the direction that the view is looking. The only points that you can look up for a ViewSection are the minimum and maximum corners of the crop box. Normally, when rotating elevation markers, you can work in the model coordinate system. This is because the ViewSection CropBox and the elevation Marker are both in the model coordinate system. However, it is not possible to find all four corners of a rectangle without also knowing the transform angle. Since we know that in the view’s coordinate system, the transform angle is zero, we need to transform our points into the view’s coordinate system. Once the points are transformed, we know that the vector we are looking for is in the negative Z direction. Then we apply the inverse transform to get the endpoints of the vector back into the model coordinate system and subtract them to get the ViewSection normal.

GetAngleViewtoWall

The second part is finding the normal of our wall. In Revit, the normal of an exterior walls points to the outside. Walls have an Orientation property which is the wall’s normal. Once we have the ViewSection normal and the Wall normal, we can determine the angle between. Since we want these two vectors facing each other, we want the angle between them to be Pi radians (180 degrees). So we take Pi radians and subtract the current angle between the two vectors that we found.

The other aspect to consider is that the AngleTo method does not return a negative angle. Because of this, we have to manually determine which direction to rotate the elevation marker (clockwise or counter clockwise). We can write a simple if statement to do this.

RotateMarker

Finally, we have the angle we need to rotate our elevation Marker. We can create an axis of rotation at the center of the elevation Marker and rotate it by the angle we determined in the previous step.

add to execute

The elevation marker needs to be rotated after it is placed so we can add our new methods to our Execute method after the marker is created.

And that is how we can rotate our markers to face our exterior walls regardless of if they are orthogonal or at a different angle. The last couple items we want to look at are associating the Marker with the correct level, cropping the view to the extents of the wall, and allowing users to select walls in their project.

resources

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.

Revit API Docs

bullet pont

phases link

March 13, 2020

ipad with title, large neon star, movie real, marker, blue For my next series, I am tackling placing exterior elevations based on selected walls. For our plug-in we need to understand the phase of views, rooms, and walls. This week, I will try to assist in letting you know where to look for and manipulate this information. When working with phases you will need to make some assumptions. Users can rename phases as they like so I always try to get the phase from an active view. It is important to review phases because Revit automatically uses the last phase in a project when creating an element and sometimes even when using a FilteredElementCollector. As a reminder, our goals for the complete plug-in are listed below.

goals and considerations

  • create an elevation marker for exterior walls by having the user select the walls
  • place the marker and elevation offset from the wall so it is legible
  • correctly phase the elevation markers
  • accommodate curved and angled walls

if you missed it:

Part 1: elevation by wall

element phases

If you have worked in Revit, you know that everything you place has a phase. These things are in the Element class in the Revit API and therefore have a CreatedPhaseId and a DemolishedPhaseId property. This is how you read and set the phase of Elements including walls, components, and other families. These are the most straight-forward to understand and are well documented.

view phases

There are some things that inherit the above-mentioned properties from the Element class, but do not use these properties. ViewSections inherit the Element class and thus inherit the CreatedPhaseId property and the DemolishedPhaseId property. However, for views like ViewSections and ViewPlans, these parameters are not used. It makes sense if you think about it because the ViewSection itself does not have a phase, instead it is displaying a specific phase. Because of that, what you actually need is the enum BuiltInParameter called VIEW_PHASE. The ElementId for a specific phase is always the same regardless of which parameter it is used in. So the ElementId to set the BuiltInParameter VIEW_PHASE to the phase "New Construction", for example, is the same as the ElementId used to set the CreatedPhaseId property to the phase "New Construction".

room phases

For rooms, there are four different places to look for phases, as you can see below. The one you want is BuiltInParameter.ROOM_PHASE.

Additionally, when you use a FilteredElementCollector to gather all the rooms in the project, it will automatically collect the rooms in the last phase of your project. I wrote a RoomHelper class with utility methods that takes the active document and the phase as inputs and then it filters for the rooms that were created in that phase. This makes sure that the collector is returning the expected list of rooms, even if the project has multiple phases.

elevation marker phases

When placing elevation markers through C#, they will automatically be created in the last phase of the project. You do not need a ViewPlan to place the ElevationMarker, but you do need one to create the elevation ViewSection on the marker. Generally, the phase of the ViewPlan that the ElevationMarker will be visible in, should be the same as the PHASE_CREATED of the marker. You can see how you can set the marker’s phase to that of the view plan phase (indicated by variable “p”) in the sample below.

Additionally, once you create an elevation ViewSection, you can set the phase that the view is displaying. Generally, you will also want to set this to be the same phase as the ViewPlan. The Elevation uses the BuiltInParameter VIEW_PHASE so we can set it to the same phase as our ViewPlan which is indicated by variable “p” below.

As you can see, phases are an intricate process and sometimes require trial and error. If you are expecting something to show up in Revit and it does not, a good thing to check is the phase. I hope to have clarified a few items to make your process easier. As we are creating and filtering elements, it is always a good idea to keep track of what phase they are in.

resources

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.

Revit API Docs

bullet pont

elevation by wall link

March 6, 2020

ipad with title, large neon star, movie real, marker, green For my next series, I am tackling placing exterior elevations based on selected walls. Generally, templates have North, South, East, and West elevations set up, however, there are many uses for exterior elevations where you would need more than just those four. Storefront schedules, for example, can be expedited if exterior elevations could be placed by selecting the wall and automatically cropping to that wall. This would also make it easier to add elevations for angled walls.

goals and considerations

  • create an elevation marker for exterior walls by having the user select the walls
  • place the marker and elevation offset from the wall so it is legible
  • correctly phase the elevation markers
  • accommodate curved and angled walls

inputs

To simplify the problem, I almost always hard-code the selection process and adjust it to be a user selection later on. This allows me to focus on the functionality of the plug-in and handle the user interaction once it works. So for now, I will gather all the exterior walls in a list. I am accomplishing this based on the assumption that the name of all exterior walls in the project contain “ext” in the name. You can customize this to filter the correct walls.

placing the marker

Once we have the walls, we can place the elevation marker. There are several parameters we need for the CreateElevationMarker method. We need the document, the FamilyTypeId of the exterior elevation marker, a location for the marker, and a scale. Passing through the document is straight forward and to get the FamilyTypeId we simply have to filter for it.

We can hard-code the scale for now and later adjust this to a user selection. That only leaves us the location. We want the location of the marker to be the center of the selected wall. We create a new public method that will return an ElevationMarker and name it Place Marker. The parameters that are required are the document and the bounding box of the wall. To find the center, we take the minimum and maximum values for the X and Y values of the bounding box and divide by two.

This method allows us to place the marker at the center of the wall. Next week, we will look at off-setting the elevation marker from the wall since this will allow the marker to be legible on drawings.

resources

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.

Revit API Docs

bullet pont

strategic planning [part 2] link

February 28, 2020

Large light and wooden trees with quote and blue background A handful of unexpected turns during February meant some changes to the origional plan. I'm back for the last post of the month to discuss the follow up to my thoughts on strategic planning. Next week, I will get back into coding!

As I discussed in January, this year was the first time DAHLIN has held a team-wide Design Technology group strategic planning session. Following our team process, which you can read about here, we had champions for our four major teams: Maintenance, Automation, Education, and Innovation. Their responsibilities since January were developing a path to meet the goals the group set and to refine these goals to ensure they fit in with the Design Technology and the company’s vision.

As champion for the Automation team and a member of two of our other teams, I was able to experience the process both as a champion and a team member.

as a team champion

One of the biggest challenges that I faced was shifting from the mindset of wanting to accomplish everything to being realistic with the time we have in the coming year. You have to be open when first gathering ideas. As you refine those ideas, you need to become increasingly realistic because you are narrowing them down to goals that the group will be held accountable for.

Some key items I learned:

overcome the tendency to focus on the fun tasks

When you have a long to-do list, many people focus on the fun tasks first. For example, if there are 15 template fixes mixed in with two new dynamo scripts, I will always want to focus on the scripts first. I have to intentionally complete the sometimes mundane items to make sure we’re on track. As a champion, it is your responsibility to manage those tasks and ensure the team is working on all the goals.

prioritize and adapt

It is your responsibility to keep the team on track with the goals you have set, however, unexpected circumstances will almost always arise. When some things just can’t get done, it’s okay to prioritize. Additionally, as other information or requirements come up throughout the year, don’t be afraid to adjust your priorities and even your goals to better align.

stay focused, but remember the bigger picture

It is so easy to get caught in the task at hand and only focus on your team’s goals. It is your responsibility to understand how your team's tasks fit into the big picture. Focus on moving your team’s goals forward, but always understand how they fit in with the company’s vision.

listen

Good leaders listen to their team members and respect everyone’s opinions. You are not responsible for having all the answers. You are responsible for asking the right questions and bringing out the best in everyone.

as a team member

We have organized our Design Technology group in a way that allows many opportunities for leadership and involvement. In addition to having a champion of each team (Maintenance, Automation, Education, and Innovation) we also have a champion for each goal. The champion is responsible for moving that goal forward but anyone can help out with the goal. People can champion multiple goals or they can co-champion goals. I feel that a benefit of this is it allows people to take responsibility for the tasks they are working on. Team members are the driving force for each team and critical in accomplishing the tasks at hand.

Some key items I learned:

stay engaged

A team is only as strong as its weakest link. Champions are there to make sure the team stays on track, but the strength lies in the team. Having an engaged team allows everyone to get things done. As a team member, you have the power to take responsibility for tasks and see them through to completion.

be involved in topics you are passionate about

It is much easier to focus on tasks when you are interested in them. Of course, there will always be some dull items on your list, but in general, stay involved in topics you enjoy.

bring your expertise

Different knowledge, interests, and backgrounds contribute to the success of a team. A diverse team is a strong team. Bring your knowledge to the team and don’t be afraid to share. Speak up if you disagree with something or have a new perspective to contribute to a topic.

As the year moves forward it will be exciting to see all the teams working towards their goals. We have weekly meetings for the Design Technology group that cover a range of topics and one meeting per month is dedicated to check-ins for each team. The intention of the team-wide strategic planning is to have input from everyone in the process and I feel that we accomplished that this year. It is exciting to see the team move forward with our goals and better the resources and support for our firm.

bullet pont

Radio Silence link

February 23, 2020

Green radio, text:Appolagies for the radio silence, the next post is coming February 28 Apologies for the radio silence, the next post is coming February 28

bullet pont

WinForms ComboBox link

February 7, 2020

Laptop with code on screen, film camera, dice, green As I discussed last week, user interfaces can be useful when creating plug-ins. They allow you to show information or allow selections. The post from last week goes into more specific details than I will cover this week.

ComboBox

As a reminder, once you have created your WinForm, you will have a .cs file for your WinFrom and you will have a .cs file for the plug-in within the project. Generally, best practices recommend to have the code for your program in the program’s .cs file and to only have the methods you need for the interface within the WinForms .cs file.

To use a ComboBox, there are two aspects. displaying the data to the user and the final user selection. In the WinForms .cs file we can add the methods that will complete these functions. I will use the user input selection of the View Family as an example.

Our constructor will take in the lists of all the different items we will want to display. In this case, the ViewFamilyType. After we initialize the dialog box, we can display data in the ComboBox. We had named the ComboBox “viewFamilyTypeBox” in its properties menu. Then we set what the ComboBox will display and what the value will be. The reason we need these to be different is that our program will need the ElementId, however, to a user, the ElementId would be meaningless. In order to display the choices in a legible way, we need to show the name as a string. This is why we set the DisplayMember as the ViewFamilyType Name and the ValueMember as the ViewFamilyTypeId.

Then we need a method that allows us to collect the user input. The viewFamilyTypeBox’s selected value is only exposed to the PlaceElevationsDialog class. In order for our program to read the input, we need to provide other classes access to the information. We do this through a public getter property.

We will also want accept and cancel buttons like last week.

execute method

We also have to add a few things to our execute method which is located in the plug-in’s .cs file. We only want this plug-in to run if the selections in the dialog were accepted by the user. We accomplish this by placing it inside an if statement that checks to see if the user pressed the “Okay” button. As you can see in lines 29, 34, 38, and 40 in the snipit below, we call the properties of the dialog box throughout the code and use them in our program’s methods.

Those are the minor adjustments we need to make to add user selections to our Create Elevations Plug-In.

resources

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.

if you missed it:

Part 1: filtered element collector [c#]

Part 2: finding centroids and considering exceptions

Part 3: ViewFamilyTypeId

Part 4: ViewPlanId and Levels

Part 5: phases & goal #1 complete [includes GitHub link to the release]

Part 6: view tempaltes

Part 7: resizing CropBoxes

Part 8: creating FilledRegions & Goal #2 Complete [includes GitHub link to release]

Part 9: coordinate system utilities

Part 10: rename views & goal #3 complete [includes GitHub link to release]

Revit API Docs

bullet pont

WinForms DataGrid link

January 31, 2020

Laptop with code on screen, party hat, whistle, blue As you dive into creating plug-ins, you will most likely want to also utilize a user interface to show information or allow selections. WinForms allows you to provide pop-up interfaces to do just that. The benefit of using WinForms is that there are pre-defined interface elements - like buttons, drop-down menus, and more - that you can drag and drop into your form. You don’t have to code the visual features of your interface, you simply code the function.

DataGrid

I’m not going to cover how to get started with WinForms because it is well documented and there are lots of excellent resources. I’m going to jump into after you have created your WinForm with a DataGrid. Generally, you will also want at least two buttons as part of your interface - one to allow the user to accept and run your plug-in, the other to allow the user to cancel. Once you have created your WinForm, you will have a .cs file for your WinFrom and you will have a .cs file for the plug-in within the project. Generally, best practices recommend to have the code for your program in the program’s .cs file and to only have the methods you need for the interface within the WinForms .cs file.

I am going to walk through how I am using a DataGrid for the stand-alone Rename Interior Elevations plug-in I started. First, I will discuss the WinForms .cs file. When you create a WinForm, certain files are automatically created and updated. The class for the WinForms .cs file, which will contain the methods you write to add functionality to your interface, is a “partial” class. The other part of the "partial" class is the autogenerated designer file.

We want to think about what we are displaying and how to display it. The goal is to have a two-column chart that displays the old name of the interior elevation and the new name of the interior elevation. This way the user can review the proposed changes and either accept or cancel the rename action. To display the names for our Rename Interior Elevation tool, we are using a list of key-value pairs. These pairs are taken in as a parameter from our plug-in’s .cs file. We can write a method that takes these pairs of data and separates them into the OldName and the NewName properties. Then a second method converts each row to the displayable data type.

To have our dialog box display, we need a constructor for our interface. We will call this RenameElevationsDialog. We already discussed that we want to display our information in a table. For our DataGrid, we will want to create two columns. We defined this in the properties menu of the DataGrid so we do not need to define this in the code. We called one column “elevationName” and the other “renameTo”. In our code, we need to assign the appropriate field to bind to each column. To achieve this, we assign the property as a string. For example, we bind the OldName property by assigning the string “OldName” to the DataPropertyName of elevationName.

Then all we have left to add are cancel and accept buttons. To generate these methods, simply double click on the respective button, or you can assign these event handlers on the button’s properties. If you are using the methods, you can then fill in what each method does.

execute method

Now we have to add a few things to our execute method which is located in the plug-in’s .cs file. First, we need to create a list that will save the new names of the interior elevations to display. In the snippet below, we do this in line 1 where we create the List of KeyValuePairs and call it newNames. When we cycle through our interior elevation views, we add the new name and the old name to our list. In the snippet below, you can see this in line 11.

And those are the changes we had to make to add a dialog box with WinForms. All the code is available on my GitHub account and you can download the Rename Interior Elevations plug-in in the releases section. Next week I will take a look at using a ComboBox in WinForms (similar a SelectElement in HTML).

resources

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.

if you missed it:

Part 1: filtered element collector [c#]

Part 2: finding centroids and considering exceptions

Part 3: ViewFamilyTypeId

Part 4: ViewPlanId and Levels

Part 5: phases & goal #1 complete [includes GitHub link to the release]

Part 6: view tempaltes

Part 7: resizing CropBoxes

Part 8: creating FilledRegions & Goal #2 Complete [includes GitHub link to release]

Part 9: coordinate system utilities

Part 10: rename views & goal #3 complete [includes GitHub link to release]

Revit API Docs

bullet pont

is point in room link

January 17, 2020

laptop with code on screen, party hat, whistle, red After automating the interior elevation process in my last series, I wanted to see what it would take to just rename interior elevations. I am using the same naming rules as I did in Part 10 of the previous series. When I automated interior elevations, the steps started with a room so the room information and elevation name was easy to pair. When looking at renaming elevations as a stand-alone tool, you need to determine which room each elevation is in.

room helper methods

The first two steps are very straight forward. I wrote two methods that I added to my Utility project because I found I was using them a lot. The first is a simple FilteredElementCollector to get all the rooms. The next item we need to consider is phases. We need to filter out the rooms that are the same phase as the interior elevation that we are looking at. This is because you may have rooms that overlap in different phases of the project and you want to make sure you are renaming the interior elevation according to the correct room number and name.

GetElevRoom

Then we can write the method that finds the room that our elevation is in. We create a new public method that will return our Room and call it GetElevRoom. It needs a ViewSection and the list of rooms as parameters. First, we take the BropBox of the interior elevation ViewSection and assign the min and max values to a variable. Then we find the center of the CropBox. The center is located in the coordinate system of the interior elevation ViewSection but we need to find that coordinate in the project coordinate system to compare it to the rooms. To do this, I use a number of the methods I had written for my Utility project which you can read more about in Part 9 of the Automating Interior Elevations series. These methods rotate the coordinate to orient it to the project coordinate system. We still need to translate the point which we do by adding the interior elevation’s Origin property. Lastly, we check each room in our list of rooms to see if the point is in that room. If it is, we need to return the room so we can use it to rename the elevation.

add to execute

In our execute method we now need to call the method we just wrote. We use a for-each loop to circle through each interior elevation. First, we get the list of rooms filtered by the correct phase, then we find which room the elevation is in, and finally, we rename the elevation with a similar process as I discussed in Part 10 of the Automating Interior Elevations series.

And that’s all it takes to rename the interior elevations. Next week, I will discuss how to add a WinForms user interface with a DataGrid to this plug-in.

resources

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.

if you missed it:

Part 1: filtered element collector [c#]

Part 2: finding centroids and considering exceptions

Part 3: ViewFamilyTypeId

Part 4: ViewPlanId and Levels

Part 5: phases & goal #1 complete [includes GitHub link to the release]

Part 6: view tempaltes

Part 7: resizing CropBoxes

Part 8: creating FilledRegions & Goal #2 Complete [includes GitHub link to release]

Part 9: coordinate system utilities

Part 10: rename views & goal #3 complete [includes GitHub link to release]

Revit API Docs

bullet pont

strategic planning [part 1] link

January 10, 2020

Large light and wooden trees with quote and yellow background Happy New Year everyone! Wishing you a year filled with opportunities and success. I am taking a short break from discussing the Revit API to cover another topic that I’m sure many people are thinking about. In our personal lives, we set goals for the new year. In our professional lives, we participate in strategic planning. In December, DAHLIN had its first team-wide Design Technology group strategic planning session and I wanted to share some thoughts about the process.

At DAHLIN, we do not have a BIM manager. Instead, we have a group of very talented people across market sectors and offices that are on the Design Technology group. We meet every two weeks to discuss new projects, standards, template items, and more. For this upcoming year, we have divided the group down into small teams based on four key subject areas: Maintenance, Automation, Education, and Innovation. Each team has a Champion who is responsible for the planning and execution of the team’s responsibilities. The goal of the new organization structure is to help productivity and allow people to focus their efforts on topics they are most passionate about. In order to update our goals and align them with our new organization, we decided to get everyone involved with a series of strategic planning activities.

dream big

To start off, we all got together in a room with snacks and lots of post-it notes to complete a brainstorming session. We held this initial three-hour meeting while everyone was visiting our headquarter office because the engagement is higher in person than over video conferences. We currently have fourteen members so we decided to split in half to make the setting more conducive to conversation. One team was focused on Maintenance and Automation, the second on Education and Innovation. We started with an introduction to the process. Then, each group of seven took two topics for approximately 30 minutes and then the groups switched. This way everyone had input for all of the topics. 

Some of the key items we learned from the initial session:

write down every idea first, organize later

Focus on what you want to accomplish in the next year, the next three years, and the next five years. The group does not need to discuss how everyone will accomplish those items because that is not critical in the brainstorming step.

always “yes and” ideas

There are no ideas that are too big. There are no ideas that are too small. The point of the initial group workshop is to receive any and all ideas. Having a positive attitude and encouraging creative goals is key to hearing from everyone.

have a moderator for each group

Relating to the two mentioned above, it was immensely helpful to have a moderator to keep people focused on the task at hand. We were all tempted to discuss how we could get to the next step, but it was more important to think about the bigger picture. Additionally, the moderators were able to facilitate conversation and encourage everyone to contribute. We had informal moderator roles, but with larger groups, it may be helpful to have a more defined role.

get organized

After we filled the tables with sticky notes, each team presented the goals they wished to see, and the entire group provided feedback. Then, teams went back to their original topics and began organizing the goals based on the target completion date. We grouped goals into those that should be focused on in the next year, the next three years, and beyond. The teams then presented to the entire team for feedback.

Some of the key items we implemented for organizing goals:

stay positive

This is the step where you have to bring things back to reality a bit, however, it’s important to not think of all the negatives. Even though an idea can be challenging to achieve or require a shift in company standards, if you believe it is where the industry is headed and an important goal, keep it.

understand the constraints

It is a balance between encouraging ideas but also considering realistic challenges. Keep the "dream goals" and the "reach goals", but also keep in mind constraints like budget and time when setting target deadlines. Maybe the "reach goals" fall into the three-year time period so that you can take steps to make them easier to accomplish. 

be realistic

You do not need to get into the specifics of how each goal will be accomplished in time, but it is important to consider a realistic deadline for each goal. Think about things like the required approvals and the number of people involved in achieving each goal when setting a timeframe.

ownership and champions

After brainstorming, we all looked at the four topics and each person volunteered to be on the team for a minimum of one topic. Additionally, people volunteered to champion each effort: Maintenance, Automation, Education, and Innovation. Having the Champions helps to ensure that tasks are going to be completed because there is someone organizing and moving forward each topic. Once these roles were assigned, there was one critical task left. We had to determine the path to accomplishing all the goals that the group discussed. This plan includes measurable objectives and check-in points to determine objective progress and completion. Finalizing this plan was handed off to the Champions and their teams. This is what our Champions are working on this month, and I will cover a wrap-up of our strategic planning by the end of February. 

Some of the key strategies we are using for the smaller teams:

balance team size with tasks

Certain categories have a lot more to do. For example, the Maintenance group handles all of our standards, templates, and libraries. Because it takes the majority of our time, it is our largest group. 

allow Champions to manage their topic and team

When you have a group managing the Design Technology branch of your firm, it’s important to let the smaller groups handle their own responsibilities. Making decisions with fourteen people is not realistic. Instead, the tasks and oversight can be handled by the groups and they can present back to the larger team so knowledge is shared and distributed across teams.

let people choose

One concern we had when starting the process is that some topics may be viewed as boring and would not receive a Champion. If you have a diverse group of people, chances are people will naturally gravitate toward different things. We received a wide range of interest in all the topics and teams. If there is not enough interest in a topic, you can always pair popular and unpopular topics together so everyone is involved in at least one thing they are passionate about.

Setting goals for our group allows us to identify trends we see in the industry and prepare for them. It also allows us to spend time strategically improving the resources, training, and tools we provide for the firm. By going through strategic planning with our entire team, everyone has the opportunity to be a part of the process. Their ideas are valued, their ideas are heard, and they are shaping the path of the Design Technology group.

bullet pont

rename views & goal #3 complete link

December 13, 2019

Laptop with code on screen, film camera, floppydisk, yellow This week we continue on the path to automating interior elevations. As a reminder, I have been building a plug-in that automates various parts of creating interior elevations, and I will continue to develop it. Since this project will evolve as I continue, I have determined to set my primary goal for each stage. With this goal in mind, I will develop a functioning piece of software to meet the goal. Then I will discuss topics that cover key aspects for each step for building the plug-in. At the end of each stage, I will move the plug-in to a public repository on GitHub so you can use it too.

if you missed it:

Part 1: filtered element collector [c#]

Part 2: finding centroids and considering exceptions

Part 3: ViewFamilyTypeId

Part 4: ViewPlanId and Levels

Part 5: phases & goal #1 complete [includes GitHub link to the release]

Part 6: view tempaltes

Part 7: resizing CropBoxes

Part 8: creating FilledRegions & Goal #2 Complete [includes GitHub link to release]

Part 9: coordinate system utilities

primary goal #3

Rename the interior elevations based on the room name, add a suffix based on the cardinal directions to identify the elevations

RenameElevation

Since we set up our utility methods last week we now have a very easy time renaming our elevations. We create a new public method that does not return anything and call it RenameElevation. It uses the document, the interior elevation ViewSection, and the room as parameters. For this plug-in I have decided to rename the elevations starting with the room number, then the room name, and then a suffix based on the direction the interior elevation is looking (utilizing the utility methods GetVectorAngle and Angle2Cardinal discussed in Part 9). I decided to assign the suffix A to North, B to East, and so on, rotating counterclockwise. You can change this to be whatever you like. We do want to use a try-catch statement when concatenating our string because I found that when a room is not placed, sometimes assigning the new name fails. This way our program skips the name assignment so our program doesn’t crash if there are any problems.

add to execute

Then we just add this method to the Execute method of our plug-in and we are done!

We have created a plug-in that will automate your interior elevations for you, create the tag at the center of the room, consider multiple levels and phases, assign a view template to the interior elevations, reset the crop boundary, set up a masking region, and rename the interior elevation based on the room number and name. You can access the updated code on my GitHub account . There you can also download the DLL so you can use the updated plug-in too.

Next week we'll take a short break from plug-ins and discuss BIM strategic planning.

Please note that since we have now added even more filters and hard-coded selections, there are a couple of things you need to use this plug-in as written. Your Revit file needs:

  • to have all the rooms placed for which you want to create the interior elevations
  • an elevation ViewFamily type with a name that contains “interior”
  • a ViewPlan with a name that contains “interior elevations”
  • a ViewTemplate with a name that contains “interior” and “elevation”
  • a FilledRegionType with the BackgroundPatternColor set to white (RGB 255, 255, 255)
  • a LineStyle with a name that contains “05” and “solid”

resources

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.

Revit API Docs