Showing posts with label Property Set Definitions. Show all posts
Showing posts with label Property Set Definitions. Show all posts

Thursday, July 24, 2008

Flex Duct Lining & Insulation

In the recent creation of my Duct Material Schedule, I ran across a very annoying problem with the way AutoCAD MEP handles Flex Duct and regular Duct. To see my Duct Material Schedule, visit http://www.geniusoftllc.com/tools/ductmaterial.asp

The problem occurs when looking at Lining Thickness and Insulation Thickness. Duct has it, Flex Duct doesn't. Makes sense right? Well, but now click on your favorite piece of flex duct, right-click and select "Flex Duct Properties". Go to the "Lining and Insulation" tab - hmm...



So apparantly, you can set the lining and insulation thickness for flex duct, but the property set definition for them does not exist (nor can you add it).

This doesn't become a problem until you try to display properties of both Flex Duct and regular Duct in the same Schedule Table. And of course, I want to be able to display both in my Duct Material Schedule.

So how do you get around this?

First, you need to create a Formula Definition with an "On Error Resume Next" statement in it, here is an example:

On Error Resume Next
If UCase("[PartType]") = "FLEX DUCT" Then
RESULT = "N/A"
Else
RESULT = [LiningThickness]
End If

Next, you need to set the "Format" for the Property [LiningThickness] to be "Unformatted" (if you don't do this, the schedule will have errors).

Next, just save the schedule and add Flex Duct and Duct to it, verify that the formula works correctly and then go buy me a beer (http://www.geniusoftllc.com/beer4buzz) :)

Monday, July 21, 2008

Scheduled Images

In Air Device schedules, it can nice at times to have a representation of the air device shown for clarity. So a square cone diffuser and perforated face curved vane diffuser are easily differentiated. This may also prove useful for other objects.

To accomplish this, the use of a Graphic Definition is needed. Here are some steps to adding an image to your schedule:

1. First, create blocks of all the different images you will want to have, save them in one drawing file in a folder that is accessible from AutoCAD.

2. Start a new drawing, insert that drawing file into your drawing (to bring in those blocks). Then erase them, but don't purge them out.

3. Format > Style Manager > Drawing1.dwg > Documentation Objects > Property Set Definitions, double click on "DuctEngineeringData" (if it is not there, insert a temporary duct and then delete it, then the Property Set should be available).

4. Click on the "Add Graphic Property Definition" button, name it "AirDeviceImage", make the "Source" a Block (you could use .bmp files too, but they don't come out as clean as blocks), set the default to be *NONE*, click OK



5. Save the drawing as a Template (this way when you start new drawings, the Property Set and blocks needed are automatically part of the drawing), close

6. Start a new drawing using your new template, add a new Air Device (mvpartadd)

7. Click on the Air Device and go to properties, go to the "Extended Data" tab, under DuctEngineeringData, click on the *NONE* for AirDeviceImage

8. Change the "Block Name" to one of the blocks that you inserted into the drawing, click OK



9. Add an Air Terminal Schedule Table, right-click on it and select "Edit Schedule Table Style"

10. Go to the "Columns" tab, click on "Add Column", select the AirDeviceImage Definition from DuctEngineeringData, change the "Heading" to be "IMAGE", click OK, click OK

Here is an example schedule showing a couple different air devices with different images:

Friday, July 18, 2008

Power in Properties

It's the little things that get to us...

So you want to use the new Table Schedule Styles to display information relating to you exhaust fans, and one of the columns is for Motor Power, listing Voltage and Phase. No big deal right? Until you say that you want to show it with a dash...

  • 115/1
  • 208/3
  • 460/3

Well, this is an annoying problem.

When you create a List using Content Builder, and add these Power options to the List, any item in the List that has a "/" in it will not work. This is a problem with AutoCAD, but fear not... there is a work around.

This method of using a Formula Definition can be used in many areas. Anytime AutoCAD is not giving you what you want, give these methods a shot. If it still doesn't work, whine.

Here is a screenshot showing the MoterPower Property of an Exhaust Fan, set to the type of "List":


The first step is to get rid of those "/"s and replace them with a character that AutoCAD will except. For this example, I will use a "-". So our List becomes:

  • 115-1
  • 208-3
  • 460-3

Here is a screen shot showing the Edit List Values dialog box:


As you can see, you can input the "/"s, but once the mvpart is regenerated, it will not work. What we need to do is create a Formula that will Convert the value from a "-" to a "/".

  1. Create a new Property Definition (type: Fomula, the one with the lightning and 2+4)
  2. Name it "PowerConvert"
  3. Use an "if" statement to convert the text:
    If [MotorPower] = "115-1" Then
    RESULT = "115/1"

Here is a screenshot showing the entire formula:


Note that you could add as many power conversions as you need, just by adding more ElseIf lines. After creating this formula, and then saving the Definition, we want to insert one of the Exhaust Fans and create a schedule for it.

Here is a screenshot showing the Exahust Fan being inserted into the drawing, with the Power selected to be 208-3:


In the Schedule Table Style, when adding the Column for the power, instead of adding the Column using the Definition named "MotorPower", we want to use the Formula Definition we just created, called "PowerConvert".

Here is a screenshot showing the final outcome, with the Value correctly display with a "/" instead of a "-":

Thursday, July 17, 2008

Duct Material Schedule

I recently received a request to create a schedule that would list the amount of duct sheet metal on a job. A couple Property Set Definition creations and a little luck was all I needed to quickly create a Duct Material Schedule.

To purchase this Table Schedule Style, or to watch a video showing how the Schedule looks, visit:
http://www.geniusoftllc.com/tools/ductmaterial.asp

The schedule includes properties like:
  • Material (Galvanized, Stainless Steel 300 or 400 Series)
  • Sheet Metal Gauge (10-28)
  • System (Supply, Return, etc.)
  • Size
  • Length
  • Flex Duct Length
  • Sheet Metal Area (square feet)
  • Weight (lbs)
  • Liner Area (square feet)
  • Insulation Area (square feet)
  • Connection Type (Banded, Clipped, etc.)

Here is a quick how-to on creating the Property Set Definition for the Sheet Metal Area:

NOTE: Text shown inside of [ ] are variables and need to be added via the "Insert Property Definitions", not just typed.

First, create a new Formula Definition (named "SheetMetalArea") in the "DuctEngineeringData" Property Set (I use DuctEngineeringData so that this Property is automatically applied to the duct when the duct is inserted).

Format > Style Manager > Documentation Objects > Property Set Definitions > DuctEngineeringData, "Definition" tab, "Add Formula Property Definition" (the button that has the lightning bolt and 2+4).
Formula Definition

The formula will calculate the area of sheet metal, but in order to know which formula to use a couple "If" statements need to be used.

First, we need to check to see if the object in question is Duct or Flex Duct (because Flex Duct does not have any sheet metal, so its' area should be zero). This is accomplished by checking the value of "PartType".

If "[PartType]" = "FLEX DUCT" Then
RESULT = 0

Next, we need to check to see what shape the Duct is (Round, Rectangular, or Oval). This is accomplished by checking the value of "ConnectionShape".

ElseIf "[ConnectionShape]" = "ROUND" Then

Now we insert the formula for the area of a Round Duct:

RESULT = 3.14159 * [ConnectionDiameter] * [Length] / 144

Now for Rectangular Duct:

ElseIf "[ConnectionShape]" = "RECTANGULAR" Then
RESULT = ( 2 * [RectangularConnectionHeight] + 2 * [RectangularConnectionWidth]) *
[Length] / 144

Now for Oval Duct:

ElseIf "[ConnectionShape]" = "OVAL" Then
RESULT = ( 3.14159 * [OvalConnectionHeight] + 2 * ( [OvalConnectionWidth] - [OvalConnectionHeight] ) ) * [Length] / 144

Now end the madness:

End if

All together, the Formula should now look like this:




The next step is to change the "Format" of the Properties, here is what they should be changed to:

Here is an overall for the Property Set:

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