Monday, July 14, 2008

Automatic Pipe Size and Length




In Fire Protection designs, it is necessary to display both the size and length of a piece of pipe. It can be quite tedious to size and dimension a large Fire Sprinkler Piping plan, so here are the steps needed to use AutoCAD MEP Property Sets and Label Curve Styles to automatically complete these tasks.

In my experience, for Fire Sprinkler Piping plans, the size of the pipe is shown above, and the length below. The size is given without the inch mark ("), with no spaces and stacked fractions. The length is also given without feet and inch marks, with a dash separation and no zero suppression. The font used for this discussion is Romans, which supports 1/4 and 1/2, but not
3/4. The codes for these are:

alt+0188 = ¼
alt+0189 = ½

For more information you can take a look at the Windows Character Map (Start > Programs > Accessories > System Tools > Character Map

Here is a depiction of what we are looking for:

Piping Depiction

What we will be doing is creating a new Template file (.dwt), which will contain the necessary Property Set Definitions and Label Curve Styles. Then we will simply use this Template file for our new drawing creation. For this discussion, we will make a copy of the "Aecb Model (US Imperial Ctb).dwt" file and save it as "GeniuSoft.dwt".

When we insert a new Pipe (Command: Pipeadd), it automatically brings in a Style named PipeStyles, with two Definitions attached: CustomData1 and SupplierName. This is the Style that we want to add our Property Sets to. The trick is that these need to be added before any Piping is brought into the drawing.



Now for some steps...

To view a video showing all these steps, visit: http://www.geniusoftllc.com/mvparts/videos/fp_pipe.asp

  1. Start a new drawing
  2. Format > Style Manager > Drawing1.dwg > Documentation Objects > Property Set Definitions > Right-click > New
  3. Name the Style "PipeStyles"
  4. Go to the "Applies To" tab, change the "Applies To" to be Styles and Definitions, then check the box for "Pipe Style"
  5. Go to the "Definition" tab, click on the "Add Automatic Property Definition" (the button that looks like a lightning bolt)
  6. Check the box for "Length", click ok
  7. Click on the "Add Automatic Property Definition" again
  8. Check the box for "Nominal Connection Diameter", click ok
  9. Click on the "Add Formula Property Definition" (lightning with 2+4 on it)
  10. Name the Definition "PipeSize" and use the Formula #1 below, click ok
  11. Click on the "Add Formula Property Definition" again
  12. Name the Definition "PipeLength" and use the Formula #2 below, click ok
  13. Click ok to exit the Style Manager
  14. Have a sip of your favorite beverage, consider buying me a beer
  15. Format > Style Manager > Drawing1.dwg > Documentation Objects > Label Curve Styles > Right-click > New
  16. Name the Style "Fire Sprinkler Pipe Size"
  17. Go to the "Label Style Annotation" tab, change "Options" to be "Use Property Set" and select "PipeStyles" and "PipeSize" from the pulldowns
  18. Change the Text Style to Romans, uncheck the box for "Mask Curve"
  19. Go to the "Label Style Offset" tab, select "Force Outside of Bounding Box" and set the "Clear Distance Offset" to be 3"
  20. Click ok to exit the Style Manager
  21. Repeat step 14
  22. Format > Style Manager > Drawing1.dwg > Documentation Objects > Label Curve Styles > Right-click > New Name the Style "Fire Sprinkler Pipe Legth"
  23. Go to the "Label Style Annotation" tab, change "Options" to be "Use Property Set" and select "PipeStyles" and "PipeLength" from the pulldowns
  24. Change the Text Style to Romans, uncheck the box for "Mask Curve"
  25. Go to the "Label Style Offset" tab, select "Force Outside of Bounding Box" and set the "Clear Distance Offset" to be 0.25"
  26. Click ok to exit the Style Manager
  27. Repeat step 14
  28. Save the Template as a new file (Command: Saveas), change File Type to Template (.dwt)
  29. Close the drawing
  30. Start a new drawing, using the template you just created, insert a pipe (Command: Pipeadd)

If all went well, your pipe should come in with Size and Length.



NOTE: For each formula, the two variables (shown in grey between [ ] ) need to be inserted via the "Insert Property Definitions" area, not just typed.

Formula #1:
D=[NominalConnectionDiameter]
If D = 1.25 Then
RESULT="1¼"
ElseIf D = 1.5 Then
RESULT="1½"
ElseIf D = 2.5 Then
RESULT="2½"
Else
RESULT=D
End If

Formula #2:

L=[Length]
If L/12-Int(L/12) > .9167 Then
RESULT=vbCrlf & vbCrlf & Int(L/12)+1 & "-0"
Else
RESULT=vbCrlf & vbCrlf & Int(L/12) & "-" & Round((L/12-Int(L/12))*12)
End If

2 comments:

Anonymous said...

This is great... however it would be really great if the Length could be acurate to the 1/4" and stack the fraction...?? I would need this in order to be useful for shop/ installation drawings.

Is there a formula for this??

Either way again this is very helpful thank you, I definately owe you a cold beverage! And let me know if it is possible to stack the fractions on the length....

Buzz Wright said...

I believe all you would need to do is modify the dimension style to have the length rounded to 1/4" and have the fraction stacked. Type DIMSTYLE and see if that gets you what you want. Thanks for the beer! :)