CAD Manager Theresa Lowe needed a way to place a string of text in AutoCAD piping drawings, so she created this pipe text LISP routine.
"I created this routine to automate the annotation of pipe types on mechanical and plumbing piping plans. It will place a string of text along a line, rotated to be plan-readable, on the same layer as the line, and trim that line around the text.
"The following defaults are set by this routine, but can be modified to the user's own preferences:
Text height is calculated by multiplying 3/32" (0.09375) by the current DIMSCALE setting
The default width factor of the text is 0.70
The default text style of the text is Standard
The default insertion point is Middle
The default text value option at the Command line is HWS.
"Note: Because of the feature to calculate a plan-readable rotation angle, this routine doesn't work with plines."
Notes from Cadalyst tip reviewer Brian Benton: This routine will help you label your pipe drawings quickly and keep the text on the layer you want. It also takes several steps to make sure your text is visible. It saves time by removing the copy, paste, rotate, and trim steps or the text, type in new pipe name, and rotate trim steps. It replaces them with click, Enter — very efficient. I did find that it didn't work in Civil 3D, so other AutoCAD verticals may have issues running it. But standard AutoCAD 2001 through 2014 tested just fine.