Friday, October 31, 2014

Confirm Acquire Coordinates

I'd like Revit to display a confirmation when I successfully acquire coordinates. It would also be nice if it displayed the coordinate "shift" that occurred in the dialog too. If I failed to select a source then it would be nice if Revit let me know I failed, try try again.

Tuesday, October 28, 2014

Occupancy Calculations and JavaScript

The other day I read a post at Revit Add-ons about integrating Java Scripts into Revit. I was intrigued by an example it described which provides a connection between a java script calculation (formula) and assigns it to a parameter. A very common request among Revit users is to be able to associate with a formula with a Shared Parameter, and in this case occupancy calculations. Timing is a funny thing because an email came in the same day asking for advice doing these calculations.

The application is called LazJS and is currently offering a beta version 1.0. Fwiw, I created an Occupancy Calculation sample project years ago which you can download HERE. I thought I'd open that project and try LazJS out on it. Since we can't put a calculated value in a tag the example uses a schedule so we can transfer values manually. With the advent of the API there are more options but for anyone who is leery of programming it's still a bit intimidating.

I found it was really easy to get this installed and configure LazJS to fill in the values for me automatically and keep them updated if I make any changes. This is the dialog that appears for their ParamJS tool. I started by choosing the Rooms category. Then I chose the parameter that is in my room tag. Then I dragged the parameter whose value I wanted to be in the tag up to the code editor window. Once the code was present I clicked Run, seeing values in the results window I clicked Save.


Now whenever I add a room and assign a occupancy type its tag fills in the appropriate Occupancy Factor for me (the script does). Same for any editing I do of existing rooms.


Worth a closer look if only for this piece of their whole application.

Monday, October 27, 2014

Visible Parameter and Associate Family Parameter

When we work with Forms, Symbolic and Model lines and nested families they each have a parameter called Visible and we can use Associate Family Parameter to control their visibility.


If you decide to remove this relationship Revit applies the current state of the parameter that was controlling it to the Visible parameter. If it was checked (visible on) then removing the parameter relationship leaves it checked. If the reverse is true (visible off) then the opposite happens.

It's subtle and can cause a few minutes of confusion when you reload a family and find it isn't visible.

Friday, October 24, 2014

Including a Sheet File Name and Path

Ever since we started using computers to generate architectural and engineering drawings we've been inclined to provide a place on a title block to help people find the file. Sometimes it is just the file name and other times it is necessary to have both the file name and path to the folder it is in.

The path is useful to the team working on the files but if those files are passed along to someone else it may be meaningless to them, or confusing at the very least. The file name is useful to anyone who happens to be looking at the drawings as long as they are in a position to access the digital version of the file too.

In a Revit model, which usually contains all the sheets for a project, the file name doesn't have the same usefulness when compared to a file based system like AutoCAD. That's true unless you are printing multiple layouts from a single DWG file, then it's not all that different than Revit. When someone is looking at a printed sheet and sees the file name and path it doesn't help them find the digital version, like a PDF file for Sheet A100 for example, because the file name is the Revit model, not the resulting PDF export.

As such Revit misses the mark in helping us carrying on that tradition. Since there are a number of ways our sheets can end up as individual files it is hard for Revit to anticipate or provide a suitable way to plug in a unique value until the data is exported outside of Revit. I'm sure there are some things that they could do to help us with this but it hasn't happened yet.

Revit's API could be used to capture the sheet information and store a contrived file name in a parameter for each sheet. When we print or export we might end up with the correct file names matching the resulting files or bearing a slight difference. I don't recall an existing application that deals with this specifically but one might exist, like Xrev Tools for example.

If we forget limitations within Revit for the moment, since the output format of a set of documents is where the appropriate file data is really needed it might make sense to consider focusing on how we handle the output files instead, at least for now. For example, the company Bluebeam offers software to process, review, and markup PDF documents. It includes the ability to add custom headers and footers, which can be the file name (among other things). It can also Batch Process files to include the file name. The file path is another available choice to put in a header or footer so we can combine them if we want to include both.

If it is necessary to provide the specific file name (and path) for exports to DWG it is probably best to add it those files after exporting, this way they'll point to an actual file instead of the Revit project file. Again some customization could add the necessary fields pretty effectively.

It seems like post processing this information is probably as effective as trying to come up with a way to deal with it internally in Revit.

Thursday, October 23, 2014

Filter Filtering Gotcha

When you create or edit a view Filter we can apply a Filter to the list of categories based on discipline.


Filtering the list of categories has a direct impact on the Filter Rules > Filter by: list too. If you tell Revit to only show you Architecture categories then you'll find the available parameters listed in the Filter by: criteria drop down will not include parameters that are related to other disciplines. For example, if you were hoping to use the filter to alter the way MEP elements look when they are linked into your model then you might be confused until you realize that earlier you told Revit to only show you Architectural stuff.

Remember the Filter's Filter. Same thing can happen in the View Templates, Visibility/Graphics dialog and Object Styles dialogs.