Vote for AU 2017 Class Proposals – Vote Now!

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
  • Conquer Revit Roofs Like a Ninja

http://au.autodesk.com/speaker-resource-center/call-for-proposals/voting

DIMENSION STANDARDS TOOLS

DIMENSION STANDARDS TOOLS

I’m bringing some more standards tools to you today. A quick copy and adjust of the original text tools graph resulted in three tools for dimension styles. The first allows the user to select a dimension type and then selects all elements in the current project that use that style. The elements are selected in Revit, so the user can use the type selector to change the type.

3 tools image
3 tools in One Graph

The second tool reports all dimension types and writes them to the chosen excel file in a worksheet named dimensions after the category chosen.

Dimension report image
Reporting Dims to Excel

The third tool allows the user to choose a dimension type and change the elements selected by the “type” filter and change their family type to the desired type within Dynamo.

Here is a the complete screen capture of the 3 tool graph.

3 tools image 2
3 Dimension Tools for Dynamo

and a download BTC_DIM_STYLE_FIX

Condensed Version of Project Standards Graph

In my last post, I mentioned a simpler graph to complete the same workflow.

Categories based image
Categories Method to Export

This workflow starts with the category and achieves the same result, in a lot fewer nodes.  Grab a copy here:

BTC_Excel_Export_Element_Types_by_View_V2

Dynamo Based Project Review

Dynamo Based Project Review

As I was updating existing templates and building some new ones, I wanted a better way to determine what fonts/text styles are in use and where they are being used.

Exploring some existing dynamo graphs and custom nodes, I put the following graph together.

capture info
Full Capture

This graph searches the current project, builds a list of graphic views (plan, section, elevation, drafting, legend, and callout) and then builds a list of elements in those views.

The data is then output to an excel file for review. Here is what the output looks like.  As you can see, the graph outputs the textnote style and the viewname the text element was found in.

 

Excel Image
Output from Graph

 

For those of you who want to do it yourself and understand how I reached the working version of the graph, follow along as I describe how I created the graph.

Input graph section
Input Path to excel, and boolean toggle

 

First Step – Insert the White_Dynamo_Graphic_Standard node, edit the custom node and copy all the precreated groups, pasting them into your new home workspace.  I edited the file notes contained inside this standard and saved it so I have a ready to use set of groups whenever I need them.

Since we are trying to determine where standard elements are being used in projects and templates, and I know I want to be able to reuse the data in excel, lets get started with the beginning and end in mind.  Type excel into the search tool in the Dynamo graph editor and add the Excel.WriteToFile node.  This node presents a number of connectors helping us to quickly add the necessary inputs by search.

Excel Write to File Node Image
Excel Write to File Node

Add a File Path node, a Categories node, and a Boolean node as we will be able to quickly connect these up as we begin to think through the logic of what the rest of the graph will require.   I prefer the the file path node to a string based input, because I can select an excel file by browsing to it.  The categories node allows us to select the category to be reviewed (Text Notes).   I will add a “String from Object” node and connect it to the Categories node, so I pass in the sheet name directly from my chosen category.  The boolean node lets us control whether the data is refreshed and whether the excel file is overwritten.  I know that I want to start filling the excel file from column A and Row 1, so I’ll add a code block by double clicking in the editor and preparing to pass out a value of zero.  I will connect up the nodes like this:

Begin with the End in Mind Image
Begin with the End in Mind

As you can see in the image above, I have already provided 5 out of the six input nodes required by the Excel.WriteToFile node.  So now we tackle the data input.  Since I want to figure out where all my text note styles are being used, so I can standardize the text note styles, I’ll next add the Document.Views node from the clockworks package to generate a list of all views contained in the current project.  Click on your Excel.WriteToFile node, right click your mouse and freeze this node til we have the data input prepared. Click run to see the output from the Document.Views node.

First Design collection
Graph Design Area 1

I added and connected the Lunchbox node: Remove Null Values to the output of the Document.Views node, because I saw some null output after running it the first time.  Looking at the list of views provided, I realized that there were many views that would not be of use to me in this process, so I searched for a node that could give me a way to filter out these nodes.  Having found no such node, I decided to modify the View.IsTemplateView node from Clockwork for my use.  The easiest way, I’ve found is to simply add this node to your graph, then select it and right click choosing to “Edit custom node”.  Once the node is open in the editor, copy all the internal nodes to the clipboard and then close the View.IsTemplateView node.  Remove it from your graph and click “File” new custom node.  When the editor opens, paste the contents of the clipboard to your new custom node.  It should look like the following image:

custom node content image
Custom Node Contents

I named my custom node: View.IsGraphicView and added it to the BesideTheCursor Package, I’ll publish it later tonight or tomorrow.  In the mean time, you can do what I did and modify the python script as shown in the image below.  I added some exclusions of view types to exclude.  This results in a view filter that effectively rips out the views that wouldn’t contain graphics.

Custom Python Code
Custom Python Code

I modified the original python code very slightly, see the difference view image below:

image 3
View Nodes Code Difference

I used a boolean if else line to accomplish what i needed as seen in the images above.  A quick run of the partially completed graphs shows that I am now effectively identifying the views that I do not wish to process.  I can use the true false output from my new custom node with the List.FilterByBoolMask to filter out the view types I no longer want to include.   I connect my node to the bool input and connect the cleaned output to the list input on the List.FilterByBoolMask node.

View.IsGraphicvView in action
Identifying True and False

I am now ready to pass my list of included views into the Springs.ElementsFromViews node, to begin building the list of elements found in every view. A quick run at this time reveals many thousands of elements.  Don’t get worried by the spinning blue wheel.  It will run to completion rather quickly.

count of elements in views
Element Count is High!

Now its time to filter for the type of element I’m looking for.  We can add a code block and type in the TypeName description for TextNotes.  You can see what is required from the Object.Type node.  We connect this into the String.Contains node to search our large element list and build a boolean list of true and false.  Connect these up to a List.FilterByBoolMask and then flatten the output will complete our data filtering down to just TextNotes as shown below.

Filtered
Filtering Element Types

Lets add some more nodes.  Add Element.OwnerView, Element.Name (Universal), TextNote.Typename and we’ll connect them up and build a new list using List.Create with two input connectors as shown below:

ViewName Id
Getting View Names from Elements

Lets run this graph and take a look at the output from our list to this point.  As can be seen in the image below, we are getting two sublists; the first contains the viewnames and the second list contains the textnote typenames.  Having worked with the Excel.WriteToFile node in the past, I know from experience that the data input node prefers lists that contain rows and columnar data.  Lets add the List.Transpose node to convert our list to this format and connect it into the Excel.WriteToFile data input connector.  Now its time to run the graph, so unfreeze the final node and get ready to review your list of textnotes used by view.  You can grab a copy of the graph here:, but its always best to build it yourself to gain a better understanding of how Dynamo works.

During the process of writing this blog post, I realized that the path I took was longer than necessary and can actually be accomplished without the custom node created, but what fun would that be?  Check back later for an update and a simpler graph to complete the same workflow.

 

 

 

Cumulative Area and AutoCAD Hatches

Cumulative Area and AutoCAD Hatches

I was asked this question recently:

I noticed the “cumulative area” when attempting to add up SF numbers from multiple polygons. Please see the two images below. Why can I select 4/5 polygons and have it add them in the cumulative area space (Shown in Image 1) but when I select the 5th area the cumulative area disappears (Shown in Image 2)? Do you know why this occurs?

Screen Capture 1
Image 1
Screen Capture
Screen Capture 2

I suspected that there was a boundary issue, that prevented the hatch from calculating the area.  This can occur when a polyline boundary overlaps itself before its closed.  Since a hatch can generate a new boundary, I felt that was the easiest way to resolve the problem.  Here is my response:

The problem exists with the last hatch area. If you select it by itself, it displays no Area. I suspect that the boundary is probably overlapping itself. It’s not related to the number of hatches chosen, it’s actually that hatch by itself. To fix it, I did this:

1.) Unfreeze the layer containing the hatch, and make it current.
2.) Isolate that layer so only the hatch objects are visible. You can use layiso to isolate the layer containing the hatch.

Screen Cap 3
Image 3

3.) Now that the hatch is visible and isolated, select the problem hatch, right click and choose generate boundary.

Screen Capture 4
Image 4

4.) Once the new boundary is created, you can delete the original hatch.
5.) Use boundary hatch to place a new hatch into the generated boundary, to match existing hatches already created, you can use match properties.

Screen Capture 5
Image 5

 

Viola problem solved.

DYNAMO FOR ELEMENT BY LEVEL SELECTION

DYNAMO FOR ELEMENT BY LEVEL SELECTION

I received a request to assist an architect in fixing their model yesterday.  They were attempting to adjust a level elevation, but found other objects were also moving.  The request went something like this:

Level locked to alternate floors needs to be moved but others move with but are called out as different levels and are correct.

Based on the description above, I suspected there were multiple competing layers at the same elevation and objects were hosted on the wrong or undesired level. A quick check on a column confirmed my suspicions. As shown in the image below, there are multiple levels with similar names like “03 Level” and “Level 03”, “02 Level – 1004’” and “Level 02”.

Column Base Constraint
Too many levels with similar names

I reviewed the existing elevation and section views and couldn’t find the offending levels, so I created a quick new section to help solve that issue.

Section in Plan
Add a section and expand the visibility

Once the new section was created and activated, I uncropped the view and zoomed extents to find the missing elevation elements.

Levels discovered

The original problem statement indicated that elements were moving unexpectedly, so I flexed the Level Datums to get a visual indicator of the objects that might be bound together.

Level constraints
Elements move with Level

Since I can’t simply delete the levels I think I don’t need, for fear of losing elements hosted to the level, I must find a way to select or determine what elements belong to a level I might wish to delete.

Revit Elements Notification
Revit provides no warnings when a level is deleted

 Note: If you were unaware, Revit does not notify you when it deletes elements hosted to a level.

 

Let’s launch Dynamo and see if it can assist us.   For this functionality, I can create a quick dynamo graph and use it to identify whether a level has any host elements on it.

Dynamo (V 1.2.0) Recipe:

  • Nodes: Levels, All Elements at Level, SelectInRevit, Watch

Connect them up as follows:

Levels, to All Elements at Level, to SelectInRevit, to Watch.

Simple Graph
Simple Graph

If you need to move elements to a different level, switch back to the Revit drawing window after running the graph and use the following key sequence to reselect the items selected by the dynamo graph.

Macro Keys
Shortcut Keys

Then you can change their constraints and parameters to move them off the level.  When you run a graph and it comes up with no elements on the level, it is an easy task to delete the level.

If you feel ambitious, you can format the graph to be shared, so others can read and utilize the graph more easily.

Dynamo Graphic Standard

The graph above is the recipe with the same nodes, but the graph is formatted using the Dynamo Graphic Standard created by Vladimir Ondejcik of White Arkitekter AB

Final Graph
Final Modified Graph

The final graph with empty level deletion. Select Elements by Level_DynamoV1.2.dyn

You’ll need to install the Archi-lab_Grimshaw package.

Walk and Fly are available only in perspective views.

Walk and Fly are available only in perspective views.

All of a sudden, this dialog box started popping up again while performing a 3DOrbit inside AutoCAD Architecture.

Walk-n-Fly
Walk-n-Fly

After checking this thread for a solution and finding none, I offered the following:

Add the following to your section in your FixedProfile.aws

 <HideableDialog id=”VMToolsUI.WalkFlyToPerspectiveView” title=”Walk and Fly – Change to Perspective View” category=”Navigation” application=”” result=”1001″><Preview><TaskDialog Source=”/AcTaskDialogs;component/TaskDialogs.xaml” Id=”VMToolsUI.WalkFlyToPerspectiveView” xmlns=”clr-namespace:Autodesk.Windows;assembly=AdWindows”></TaskDialog></Preview></HideableDialog>

Make sure you do this while AutoCAD is not running, or the fixedprofile.aws file will get overwritten when you do close AutoCAD.

Update: Using DOS and VBScript to Upgrade your Revit Library for Free

Minor update to scripts and addition of scripted upgrade for template (rte) files as well as automated cleanup of associated files. Please grab a copy of the updated zip file here:

RevitUpgradeScripts.

Using DOS and VBScript to Upgrade your Revit Library for Free

Using DOS and VBScript to Upgrade your Revit Library for Free

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”.

Processing Folder
Create a folder to process the upgrade files.

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.

Screen cap for drag n drop
Drag and Drop Copy

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.

Choose copy
Release the Dragged Copies

 

Let Windows do the Copy
Let Windows do the Copy

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:

RevitUpgradeScripts

 

Right Click Option
Right Click Option

To create the file list for your families upgrade, double click on the “Upgrade_RFA.bat” file inside your “~PROCESSING” folder.

Double Click to Run
Double Click to Run

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.

Scripts for Family Upgrade
Scripts for Family Upgrade

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.

Launch the Upgrade
Launch the Upgrade

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.

Brings Upgrade to a Screeching Halt
Brings Upgrade to a Screeching Halt

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.

Find the last journal file
Find the last journal 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.

Find the last opened rfa file
Find the last opened rfa file

Highlight and select the filename and extension (.rfa) as shown in the image below.  Copy this file name to your clipboard.

Copy the filename
Copy the filename

Close the text file and open the famlist_rfa.txt file in your ~PROCESSING folder using notepad.

Double Click to Open
Double Click to Open

Place your cursor at the very beginning of the file, click the edit menu and choose find.

Find the filename in the list
Find the filename in the list

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.

Delete all processed files
Delete all processed files

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.

Restart the Process
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.

Final Cleanup

Double click the XDelete_RFA.bat file to perform final cleanup operations in your processing folder.

 

Delete all scripts and backups
Delete all scripts and backups

 

Cleanup in Process
Cleanup in Process

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.

~Richard

V-Ray for Revit not finding a license?

V-Ray for Revit not finding a license?

After installing V-Ray for Revit public beta the other day, I rebooted my workstation and found that everytime I launched Revit, there was a delay and V-Ray would error out with a message indicating that no license was available.

Revit throws error when VRay seeks license server from existing install
Revit throws error when VRay seeks license server from existing install

Since I knew that I had successfully installed and had ample licenses available, the problem must be in a setting somewhere.  I checked the localhost:30304 server and found plenty of unused licenses on the online tab.  Since I have an install for Sketchup and 3DSMax, I thought that the new beta may be using an existing mechanism to find  the server.  I suspected that the 3DSMax license tool was telling Revit to look in the wrong place.  Once I reconfigured the original install to use localhost as primary and moved the network ip location to the “Alternate Server 1” slot, Revit was able to pull licenses when launched.

Steps to fix this issue:

Find the chaos group folder under your start menu.

Within the 3DSMax tools find the license administration folder

Right click and choose “Change V-Ray…”

3dsmax license controller

 

When the V-Ray License Server information dialog box displays, make sure that “localhost” is assigned to the primary license server with 30304 as the connection port.  If you were grabbing a license from a dongle attached to another machine(s), just add them in Alternate license server 1 and/or 2.

restoring localhost for online licensing

This worked for me… your mileage may vary.