Tuesday, November 30, 2010

DWG Import and Link Methods

A big tip for new players:

Never import a DWG file.  

And never, ever explode an Imported DWG file.


Nothing good will come of it.  Trust me.  Instead, do this (in order of preference):

  1. Use Revit natively, without adding messy DWG or CAD import data.
  2. Link DWG files, rather than import.
  3. Import DWG files into a Detail Component family, and then load that family in.
  4. Eat a very sour lemon.
  5. Import DWG file.
  6. Import DWG file and explode it.
  7. Cry
If you have any thoughts, or any other methods that you use (like Importing a DWG file into a RVT link and then using 'Linked Views', feel free to comment).



Thursday, November 18, 2010

Save All Families in a Project to RFAs and Folders AUTOMATICALLY

This is awesome.  Let's say you have a project with heaps of families in it, and you want to save them to individual files.  There is an API add on that does exactly this.  How do you get it and use it?

First of all, download this file (Chapter 24) from the Sybex resource page for the book Mastering Revit Architecture 2011.

Now:
  1. This is a ZIP file, so unzip the file.
  2. Browse in the contents to:
    \c24\ExampleApplication\ExampleApplication\bin\Debug\
  3. Copy everything from this folder to:
    C:\Revit Projects\
  4. Copy the two .addin files from the \c24\ folder to the correct location as shown below:
        * For a specific user:
              o For Windows XP - C:\Documents and Settings\\Application Data\Autodesk\Revit\Addins\2011
              o For Vista/Windows 7 - C:\Users\\AppData\Roaming\Autodesk\Revit\Addins\2011
        * For all users:
              o For Windows XP - C:\Documents and Settings\All Users\Application Data\Autodesk\Revit\Addins\2011
              o For Vista/Windows 7 - C:\ProgramData\Autodesk\Revit\Addins\2011
    Refer to this post at The Building Coder for more information.
  5. Restart Revit 2011
Now, on the Add-Ins ribbon, there will be a new section for the Revit Family Export Utility:












When you run this with a Project open, it will prompt you for a directory, and then it will save all the families from the current Project to .rfa family files, and it will put them into appropriate directories (by Category) for you!

This is a very cool tool - thanks to Don Rudder for his great chapter in the book, and for this excellent API demonstration.

Consider some ways you could use this:
  • Load a bunch of families into a project and get this tool to sort them into appropriate folders for you.
  • You have an RVT but you do not have the RFA files for families loaded into the RVT - use this tool to get them all out quickly.
  • Transfer all RFAs from one RVT to another by saving them out and then loading them all in at once.

Thursday, November 11, 2010

Re-ordering and re-grouping parameters for userfriendliness

So you have added a bunch of Shared Parameters to your Project, but you never bother to set the 'Group Parameter under:' property correctly...you are naughty, aren't you?

It can make using Revit a lot easier if you Group Parameters properly - its what revit wants you to do.

How do you do it?  Quite simply:

  1. Manage - Project Parameters
  2. Select Parameter - Modify
  3. Change 'Group Parameter under:' property to something more appropriate.
  4. OK, OK etc
Here is a quick video on how to do it:

Annoyingly, you can't change the grouping of parameters that are 'built in' to Revit.  It annoys me that 'Drawn By' is not grouped with Checked By, Approved By and Designed By on the Sheet Parameters:

If you know how to fix this, please comment!

Tuesday, November 9, 2010

Grouping sheets by Revision in Project Browser

I had a bit of a problem using Revit OOTB (out of the box) parameters to group sheets by Revision, so I did it super-quickly using a custom parameter.

Here are the steps:
  1. Add a new custom parameter to sheets, such as 'Sheet Revision Group' or similar.
  2. Open a schedule that shows the Revision you would like to group, and add this parameter to the schedule.
  3. Modify the custom parameter on all the sheets to match the Revision (you can do this quickly by toggling the 'Itemize each instance' tick box).
  4. Now you can easily use this parameter to group your sheets by the Revision.
Please note that this technique forms a 'break' between Revit native revision data and the custom parameter, so only use this technique if you understand this issue.

I have provided a quick video of the technique:



Tuesday, November 2, 2010

Fast searching for local Revit content using Free indexing tools

If you are searching for Revit files on your local hard drive, try using the search tool Everything - its super fast.  If you want to index local network shares, and you are:

using a 32-bit OS - you can use Windows Search and the Add-in for Files on Microsoft Networks.

using a 64-bit OS - you can use Google Desktop (Search), and then add the local shares as additional paths.

If you are using Google Desktop, you can also improve the indexing of CAD files by installing the 'General CADD Pro' indexer:
After installing Desktop Search, download, unzip the zip file and run SetupGeneralCADDIndexer.msi to install the General CADD Desktop Search Plug-In.
click this link  

From http://www.generalcadd.com/plugin-1.htm

These tools can help you if you want quick access to the families in your library, but your folder organisation leaves something to be desired...

Monday, November 1, 2010

Obtain Vector Information from PDFs using Free Tools

Sometimes you will have access to a PDF file, but not to the original DWG.  Is there any way you can get the base vector data, such as lines and arcs, out of the PDF and back into a DWG?  Yes, there is - and it's free.

You will need 3 things:
Ghostscript or here
GSView
pstoedit (or Windows exe link here)

Download and install each of the above tools.  Make your life easy and stick with the 32-bit version of everything.

Once you have installed them all, open a PDF file using GSView.  GSView is usually located in  
C:\Program Files\ghostgum\gsview\gsview32.exe

With your PDF open, take the following steps:
  1. Click on 'Media' and set the correct paper size.
  2. Go to 'Edit' and click on 'Convert to vector format...'
  3. At the resulting PS to Edit dialog box, choose dxf_s, and add the following Driver options:
    -mm -splineaspolyline -splineprecision 10
    (I have found these settings to work quite well)
  4. Click OK.
  5. Select the page in the next dialog (usually only 1), press OK, and then pick a place to save the DXF file.
  6. Click Save.
  7. Open in AutoCAD and scale to correct size.
  8. Save as DWG.
If you have any problems, feel free to comment and I will try and help you out.  If you intend to import the DWG into Revit, keep in mind that Revit is not very impressed with very short lines.

Enjoy your PDF hacking!