h1

Custom Revit Fill Patterns with AutoCAD & HatchMaker.lsp

December 3, 2010

I’ve been looking online for some help to create more custom fill patterns to add to my Revit library. There’s not much out there if you are willing to:

  • go cross-eyed figuring out how to type code (1, -1, 0, 7)  to create a  .pat file that Revit will read and display correctly (open the .pat file in Notepad and see)
  • hand over $125  for HatchKit

In your arsenal of tools, I’m sure you have an ancient 2D program called AutoCAD. Remember that one? In most cases it is probably installed on your machine because a) it is part of the AutoCAD-Revit Suite b) you still keep a Desktop shortcut of it to complete your documents. Well, blow the dust off  AutoCAD and prepare to use it for this step-by-step tutorial. We’re going to create a Split Face CMU model fill pattern. Don’t worry. I’ll get you in and out of AutoCAD in no time and displaying the nice new model pattern in Revit.

  1. Open AutoCAD
  2. File> New (using the default drawing template is fine)
  3. In the Command prompt type: APPLOAD
  4. Navigate to the HatchMaker.lsp file (you can download it here)
  5. Load & Close the dialogue box
  6. In the Command prompt type:  DRAWHATCH (note: the message of the 1×1 box, etc),  Click OK
  7. In the Command prompt type: L
  8. With the line tool, draw the 3 horizontal lines (red) and then the 3 short vertical lines (blue). This will make up the repeating module for the CMU block fill pattern.
  9. We need add a sand/dot poche to the block to make it stand out as a different type of block
  10. In the Command prompt type: H (this is the hatch command)
  11. Make your settings like this. You’ll also need to select the 1×1 polyline square to define the limits of the hatch. You can Preview or hit OK to accept the settings
  12. Select one of the dots of the poche to select the hatch itself
  13. We need to explode the hatch by typing X in the command prompt
  14. Now the poche is just a series of very small lines and not a bounded hatch
  15. In the Command prompt type: SAVEHATCH
  16. Read prompt, hit enter and window select everything
  17. Read the Command prompt and describe the hatch: splitfacecmu
  18. Name and save your .pat file
  19. Open your newly created .pat file in Notepad
  20. Replace the first line with*Split Face CMU,   Split Face CMU
    ;%TYPE=MODEL
  21. Save and Close Notepad
  1. Open Revit
  2. Go to Manage> Settings> Fill Patterns
  3. Under Pattern Type, click the radio button Model
  4. New> radio button Custom> Import
  5. Load the Split Face CMU .pat file
  6. Import Scale:  16 (Because the width of the module was one block wide, and typically one CMU block is 16 inches)
  7. Click OK
  8. Now you have a Split Face CMU Model pattern that can be used to differentiate different types of block

Things to Note:

  • If your sand/dot poche is too dense, printing your view can be timely, so choose your hatch scale wisely
  • The preloaded .pat file for Revit resides:
    C:\Program Files\Revit Architecture 20XX\Data
  • HatchMaker only accepts lines and dots. Polylines will not work. When in doubt Explode
  • It is neccessary to add those first couple lines of text in the .pat file via Notepad in order for Revit to read it correctly
  • Consult your Help file to learn more about custom fill patterns.

This is a graphical way to get what you need as a fill pattern instead of typing out code. Hope this helps.

-Kirk

SARUG Similar Link (Revit Addon)
SARUG Similar Link 001
SARUG Similar Link 002

2 comments

  1. I was trying your method and during the hatch creation I get this error:

    error: AutoCAD variable setting rejected: “HPNAME” “splitface”
    ; error: An error has occurred inside the *error* functionAutoCAD variable setting rejected: “Aperture” 0

    Any ideas on what that means? I think the result is that when I try to load it in revit, it give the Error, “No “Model” type Pattern found”


    • I figured out what I messed up. I messed up the First line. It wasn’t exactly clear that I needed rename it EXACTLY like you said. I copy and Pasted and Boom, it worked. So the first 2 lines should look EXACTLY like this

      *Split Face CMU, Split Face CMU
      ;%TYPE=MODEL

      THANKS! This should make life much easier in the future!



Leave a comment