Get your technology fix here. Stay tuned for general tech trends, news, and articles. Work with Autodesk products? I do too! I like to write VBA, lisp and create a lot of custom tools for general consumption too. You'll find all that here and more!
Looking for ways to automate your installations and customization within Revit or AutoCAD products? Wish you could control the project launch process? Need to maintain Revit project versions without accidental upgrades? Want to customize Revit deployments by studio, delivery group, or Office? Wish you could ensure that all project team members were on the same build and or service pack? Perhaps you just need to master Revit Roofs and would like to explore more than 35 different roof types and how to create them in Revit? I’ve submitted a few classes that will interest you. Vote Now, then attend in November!
AutoCAD Architecture Automation Anywhere!
Automating and Customizing Revit Deployments for the DIY Enthusiast
Revit Project Launch Scripting to Standardize All Studios
Spring is here and its time to get ready for the next Autodesk product upgrades. If you are a Revit user like me, you probably don’t look forward to upgrading the library with each release. In releases up to 2015, Autodesk always provided an upgrade families batch routine for Revit. Since 2016, that utility folder is missing. Have no fear, I have the solution for you. Ready? Lets get started.
Set up a duplicate folder tree for your next version library. I use “Tree Copy” to generate a duplicate folder structure from my existing library. Create a folder that you can use as work area. I named mine “~PROCESSING”.
Select a handful of folders from last year’s version of Revit and copy them into your “~PROCESSING” folder. I use a “right click” drag and drop process to ensure that I am copying the files not moving them.
Release your mouse when the cursor is over your destination folder and use the popup menu to choose “Copy Here”. Don’t worry that windows indicates “Move to ~PROCESSING” while you are dragging the files. If you right click drag, you’ll have the option to choose when you release the mouse button.
Now that you have your old files ready to be upgraded, copy the provided scripts to the same location using the “right click” drag and drop method as shown in the image below.
Here are direct links to the script files you’ll need:
To create the file list for your families upgrade, double click on the “Upgrade_RFA.bat” file inside your “~PROCESSING” folder.
When the batch file runs to completion, the famlist_rfa.txt file will appear as shown below. Note: the zip file download now contains two additional files a batch file to create a list of project files, and a journal file that will upgrade the project files.
We are now ready to process our upgrades. We will allow Revit to run in automated fashion using a custom written journal file that we drag on top of the Revit 2016 desktop shortcut.
Let Revit run in Automatic mode upgrading your files. If it errors out, it will present an “Entering Interactive Mode” warning like the image shown below.
Click Enter interactive mode, and click “OK” to accept any other message dialogs that appear. Exit out of Revit, saving the last file that it had successfully opened. Navigate your folder and find the journal.0001.txt or the highest number journal file that has been created if this has happened on more than one file.
Double click to open this journal in Notepad. Scroll to the bottom of the file and click at the end of the text found on the last row. Click the edit menu and choose find and then enter .rfa as the search term in the text box that displays. Change the search direction to “Up” and click “Find Next” three times to advance to the last opened file.
Highlight and select the filename and extension (.rfa) as shown in the image below. Copy this file name to your clipboard.
Close the text file and open the famlist_rfa.txt file in your ~PROCESSING folder using notepad.
Place your cursor at the very beginning of the file, click the edit menu and choose find.
Paste the filename from your clipboard to the search entry text area and click find next. Select the row that contains that filename and all the preceding rows. Delete them from the text file. Ensure that you delete the empty row at the top so the first row contains the next available file name and path. Save and close the famlist_rfa.txt file.
Left Click and drag the Upgrade_RFA.txt file from your ~Processing folder onto the Revit 2016 desktop shortcut as shown in the next image to restart the process.
Watch the magic happen as the batch routine continues reading the filepaths from famlist_rfa.txt and opens them one by one inside Revit 2016, saving and upgrading each in turn as if by magic. When the process is done, Revit will close itself.
At this stage, you have upgraded all your families, now it is time to move onto the Project files contained in your library. This process is very similar to the last one. Double click the Upgrade_RVT.bat batch file to generate a new Filelist_rvt.txt containing the names of all the project files in your library. Once that file is generated, Drag and drop the Upgrade_RVT.txt file onto your Revit 2016 desktop shortcut to start the automated process. If the process stops at the “Enter Interactive Mode” message box, perform the file cleanup by locating the last successful upgraded filename using the journal files and remove it and the files above it from the Filelist_rvt.txt file. Drag and drop the Upgrade_RVT.txt onto the shortcut to restart the process.
Double click the XDelete_RFA.bat file to perform final cleanup operations in your processing folder.
Once clean-up is done, move the folders out of ~Processing into your library and delete the ~Processing folder.
Remember, If Revit errors along the way with the “Entering Interactive Mode” message, search the journal to find the last file processed, remove the processed entries from the respective file list and continue processing the rest of the library.
We have been successfully using ACA rooms to meet program needs for one of our primary clients. Their requirements are based on a specific square footage formula for determining how many workstations should exist within certain room types. Recently they added additional room types beyond “Office” that also require workstation counts. In addition to the increase in room types, they also increased the workstation counts per square foot. On top of the those requirements, there is always a need in this business to override an automated value based on room geometry or other constraints, so the automation had to be flexible. The current workflow for overriding the count involved deleting the default room tag and replacing it with an alternate tag containing an attribute. Because I had to revisit the formulas, I took an opportunity to streamline the workflow while adjusting the formulas. I reduced the workflow for overrides from 12 clicks to 5 and eliminated the alternate room tag in the process.The original room tag had values being constructed via a formula, in a custom property set definition (psd) field called WS_Count. It was set up to always display the rooms square foot value by reading the gross area field from the RoomObjects psd. A relatively simple formula was used to check the space name and when “office” was in the name, the WS_Count value was concatenated to include a workstation count. The tag looks like this in operation:
As you can see from the image above using the same tag for both spaces results in a workstation count being displayed in office types and just the square footage for other type of rooms. This is accomplished with some simple statements inside the object based psd. Note the Space name is standardized and controlled by pulling from a list and is style based. To create something similar, you could introduce the following function in a psd field.
The logic within the above sequence first checks to see if the list based style name contains the word “office” if it does not, it will skip all the down to the Else statement and simply return a string containing the “GrossArea” automatic property of the room object which is concatenated with a space and the letters “SF”. If the space type contains the word “office”, then the value of the “GrossArea” automatic property is checked from smallest to largest using a “less than” comparison.
This tag was working well for this clients projects, but based on the previous mentioned changes, I introduced two new fields into the psd (WS_Override & WS_Detect) to eliminate the non coordinated overrides and to reduce the multi-view block count by 1. Because I wanted the value of the workstation count to always get calculated, I added a simple “less-than” function to calculate the count in the new property field titled: WS_Detect as shown below.
This function checks the string value from the property WS_Count to see if “WS” is found, meaning that the room type required a workstation count, and checks the new property WS_Override to see if its value is defaulted to 0 representing no override. If both prove true, then the square footage is calculated based on the square footage program requirements set by the client using a similar “less-than” approach. If either value is false then the manual integer based property value of WS_Override is used.
With the two new properties in place, anytime an override is needed because of space geometry, pilasters, or other obstructions that might require a deviation from the program, the designer simply places a positive value in the WS_Override property of the space. With the calculated value being tracked in a separate property, the original WS_Count property formula was modified as follows:
The original space type check was modified using the boolean “Or” to check for “Office” as well as the new space types that also get workstation counts. If no workstation count is required, then the formula skips to the Else statement and simply presents the Square footage value as before. If a workstation count is required, then the logic begins to check for a positive value in the WS_Override property. When a positive value is found, the formula concatenates the square foot value with the workstation count from the WS_Override property. If no override is in place, the original program based workstation count is used by concatenating the square foot value with the WS_Detect property.
The room tag multiview block was created using the following psd properties within an attributed block as shown below. This block is used as a display block within the multi view block.
Client_SPACESTYLES:LENGTH x Client_SPACESTYLES:WIDTH
Note: in the above attributed block definition the middle line contains a simple text object with the letter “x” to allow the length and width size to be displayed. I set the Length as right justified and the width to be left justified. The first and third lines are middle center justified.
To give visual feedback to the designer as they are placing the spaces, I added a display theme to color the spaces based on workstation count. I also added a room based schedule to display the workstation counts and provide a running total. This schedule is set to automatically add new spaces and to search within blocks so that it is always up to date. This setup is estimated to save approximately 10 – 15 minutes per project every time the plan is created or changed. This is projected to save the company more than 80 man hours per year. It also eliminates counting errors and inaccuracies which may be introduced through human error. The image below shows the original space layout on the left with the new display theme based layout and legend displayed on the right.
An image of the schedule that maintains tracking of Workstation Count is shown below.
The image below shows the settings used for the display theme.
Finally, the formula used in the Workstation Count Schedule is provided for reference.
The above formula checks the psd property WS_Count for the string “WS” indicating a workstation count is being calculated based on the space type. If the formula doesn’t find the string then the workstation count is set to a value of zero. If it finds the string “WS”, then the value of the property WS_Override is checked. If it is greater than zero, its value is used directly, if not, then the value of WS_Count property is parsed using the split function. The split is based on a space value and the third element of the resulting array is returned, which is the workstation count.
Let me know if this helps in your work. Here is a tip, you can cut and paste formulas like these shown in this blog post into the editor in ACA, but you’ll need to highlight any values found within square brackets and double click to replace the property set data using the interface. I frequently do this when working with a long formula. I’ll copy it out of a working example into notepad, add the necessary logic, and then paste back into the formula editor. When you paste it back in, look for any bracketed properties that do not display the dark background. You’ll need to replace those by highlighting them and then double clicking on the property from the object list below the code area. Use the sample results area as a check.
When the sample results area displays a proper sample value you are ready to use it. Below you’ll see an example of the property formula editor in both working and non-working order. Remember if you see the formula in the sample results area, you still have some replacements to make.
Here is a repost of an old tool recently updated for Revit 2014…
I thought you might be able to use a tool to identify what Revit build is sitting on your pc. If so, continue reading…
Are you a CAD/BIM manager responsible for installing and updating Revit on multiple computers?
How about a quick way to check all the Revit Build Numbers on each computer without actually launching Revit?
Sounds good right? Download the zip file containing a short vbscript routine and run it on each machine that has Revit installed. It will display a web page with all the build information for each Revit product installed. It will look more or less like the image shown below.
Want to capture info from multiple computers?
Search the code for the following string: “c:BTCrevitbuild.log”
Replace it with a path to file somewhere on your network.
Make sure to create the file in the appropriate folder
Every machine that runs the script will now append it’s info to the log file.
I’ve updated the Revit Build checker for the 2011 products. Looks like I get to wait until April 8th to try it out, so if anyone would like to test and report back, I would welcome it. Here is a new build updated for Revit 2011 products.
As part of the process of updating some machines to 64bit this week, I realized that I’ll have to adjust existing code to automate updates and service packs on the affected machines. I wrote previously about a similar function in lisp here.
Problem: Schedule Formula (simple area addition) does not display as intended.
Solution: Check your format for the underlying property set variables.
As you can see from the image above, the combined area of two properties is not displaying as intended. What can I do to get a simple sum that displays in square feet? Here is the executive summary.
1.) Verify that your Schedule Cell format is set to Area. 2.) Now check each variable in the formula and scroll to the right setting their format to “standard” instead of area as shown in the following image.
That’s it! Your Problem is solved!
Continue reading below for the step by step version.
Step by Step: Step 1:Select your schedule table, right click your mouse and choose “Edit Schedule Table Style…” from the pop up menu.
Step Two:When the Style Editor dialog box appears, navigate to the offending column and select it by left clicking with your mouse. Now move your mouse to the “Modify…” button at the bottom of the dialog box and left click it with your mouse. Now find the sample values list area indicated by #3 in the image below and left click and hold your mouse button down while sliding your mouse to the right. When you can see the format column you can let go of the mouse and continue to the next step.
Step Three:Double check that your chosen data format is “Area” for the Column Properties as shown in #1 in the image below. Next move your mouse back to the sample values list and change the format value for your variables to “standard” from “Area” as shown in the image below next to #2 and #3 in the image.
Step Four:Left Click the “OK” button and verify that your schedule updates to display as shown below. You did it! Congratulations!