Category Archives: Tutorials

You are here: Home » Category: "Tutorials"

Creating a Duct Elevation Tag - Part Four

Posted by  | Categories: Autocad MEP, Tutorials

In our last post we added to the duct elevation tag by creating an option to include or not include the insulation thickness in the elevation value.  This time we are going to add a manual property definition that will allow us to add a custom offset to each piece of duct.  This time instead of adding an option to include or not include the offset in the elevation calculation we will instead always add the offset.  By setting the value of the offset to 0′-0″ we can effectively turn off the option.  So lets get started!


The first thing we need to do is add a manual property set definition called ElevationOffset to our ECCustomData property set.  We should set its Type to Real and its default value to 0.0.  This will effectively turn if off by default.  The visibility box should be checked so we can type in the value of the offset on the property palette.  Lastly we should set the order that the visible property set definitions will be displayed.  By default they are always displayed in alphabetical order but by giving the property set definitions a numerical value we can change the order in which they are displayed.  We are currently only displaying two property set definitions, ElevationOffset and ShowInsulationOnElevationTag. So it will be easy to find in a large list lets make sure that the ElevationOffset is at the bottom of the list.  Number the BOD_Tag as 1, ShowInsulationOnElevationTag as 2, and the Offset as 3.  Next we need to make sure that the format for ElevationOffset is set to Standard.  Setting to anything else could possibly break our formula and the display of the elevation tag.  The last thing we need to do to update our tag is to modify the calculation used to calculate the bottom of duct elevation.  If you remember in part three we split the calculation into two separate parts.  One with the insulation thickness and one without so we will need to subtract the offset to both of parts of the conditional statement.  Yes, you did read that correctly, we need to subtract the offset from the elevation.  We are subtracting the offset value because a negative offset (think of this as a negative change in floor height) will cause the duct to appear higher than its surrounding pieces.  This means that we must subtract the value from the current elevation.  Subtracting a negative value is the same as adding a positive value.  If you remember your grade school math two negatives make a positive.  The picture to the right shows the complete formula.

The hard stuff is now finished and the only thing left to do is to test our manual offset!  to do this just select a piece of duct.  You should now see a property set definition called ElevationOffset on the Extended Tab of the Property Palette.  Inserting a numerical value will now adjust the elevation tag accordingly for the piece of duct.

Below is a video of the entire process that was described in today’s post.


In the next part of the series we will give the duct even more intelligence by giving it the ability to know where it is located in the project by using AEC Spaces.  We will then be able to modify the elevation calculation to take its elevation from the bottom of the space.  So if the space itself is lower than its surrounding spaces then the duct will know automatically and adjust its elevation accordingly with no input from the user.

Creating a Duct Elevation Tag - Part Three

Posted by  | Categories: Autocad MEP, Tutorials

In our last post we looked at creating the actual tag based on property set definitions that we created in the first post of the series.  In this post we will be adding the ability for our bottom of duct (BOD) elevation tag to include or not include the insulation thickness in the elevation display.  Not only will we modify the elevation but we will also modify BOD to read instead BOI to indicate that the elevation is from the bottom of insulation and not the bottom of duct.  So lets get started!

The first thing we need to do is add an automatic property definition to our ECDuctCustomData property set.  You can refer to the first part of the series if you do not remember how to do this.  The property we are looking to add is called Insulation Thickness and we should turn its visible property off.  There is no need to show it on the property palette as it is already available on the design tab.  We will also need a manual property definition called ShowInsulationOnElevationTag.   We should set its type to True/False, change its default value to False and leave its visible property on.  We will want to see this on the property palette so we can choose to see the insulation thickness elevation if we desire.

ECDuctCustomData - BOD_Calculation Formula

ECDuctCustomData – BOD_Calculation Formula

Lastly we will need to add some additional items to the BOD_Calculation formula.  The formula needs to be modified to show the elevation plus the insulation thickness if the value of ShowInsulationOnElevationTag is equal to TRUE and if the value is false then we can just display the elevation without the insulation thickness added.  To achieve this functionality we will have to use what is called VBScript.  According to Wikipedia “VBScript is an Active Scripting language developed by Microsoft that is modeled on Visual Basic.”  What this basically means is that it is a small programming language that we can use to inside of the formula editor of Autocad MEP.   In this particular formula we will be using three different VBScript components to determine our desired result.  First we will use a UCASE() formula to convert the value of ShowInsulationOnElevationTag.  I prefer to convert all text to upper case before use in a conditional statement.  This way there can be no errors due to upper or lower case letters.  Forcing everything to uppercase makes it easy to compare different values.  Second we will be using the constant RESULT.  RESULT is used to return the result of a formula.  And finally we will be using an if/then/else statement to determine which result we should return.  The final formula can be seen in the picture to the right.  Since we are in the calculation formula and not in the actual tag formula we should make sure that the format of each input value should be set to standard.  We have already taken care of the final formatting in the BOD_Tag formula that was created in part one of this series.

Once we have closed out of the formula editor and of the style manager our existing tags should be updated to reflect the changes we made automatically.  Since we only made a change to the BOD_Calculation and not the BOD_Tag we do not need to do anything to our existing tags.  To verify this we can select the piece of duct we added in part two add two inches of insulation to the duct.  The elevation tag will not reflect this change immediately.  This is because we set the default value of your true/false toggle to false!  If we keep the piece of duct selected and then select the Extended Data tab of the property palette we can change the  toggle from false to true.  Once we change this flag we can immediately see the elevation tag update with the new elevation.  It should now be two inches lower than it was before.

You can view a video of the entire process here:


In Part Four we will look at adding an elevation offset to each piece of duct allowing for an elevation change in certain parts of your drawing.

Creating a Duct Elevation Tag - Part Two

Posted by  | Categories: Autocad MEP, Tutorials

In our last post we looked at creating the calculations necessary to create a bottom of duct (BOD) elevation tag.  In this post we are going to create the actual tag.  We will create multiple versions of the tag that has a middle-left insertion point, middle-center insertion point, and a version with a middle-right insertion point.  So lets get started.

The first thing that we need to do is create an mtext item to start our tag with.  In order for the tag to display correctly with annotation scaling we need to create the text at 1″ tall and with annotation scaling turned OFF.  This will insure that the tag will display correctly at all annotation scales.  The tag itself will control the annotation scaling process so creating the text with annotation turn on will only compound the scaling.  This is something that we do not want.  Once we have added an mtext item we need to duplicate it for a total of 3 items and then set the justification for each of the three mtext items.  One each for Middle-Left, Middle-Center, and Middle-Right.



Select the text with the Middle-Left justification and start the DEFINETAG command.  This will bring up the Define Schedule Tag dialog box.  Lets name our tag Aecb_Duct_BOD_Tag_Left.  I like to create a naming scheme that is easy to follow.  Looking at the tag we can see that it is a building systems tag for duct that defines the bottom of duct elevation and its insertion point is Left.  A good naming scheme will allow you to select the correct tag using the property palette without referring to any additional documentation.  Now that we have the Define Schedule Tag dialog up and named correctly we can create the tag.  To do this select the Text in the Type column and change it to Property.  This will allow our tag to read from a property definition instead of reading a static piece of text.  Change the Property Set to ECDuctCustomData and choose the Property Definition to be BOD_Tag and then hit OK.  We should now define the insertion point of the tag by selecting the insertion point of the text.  Lets rinse and repeat for the Center tag and the Right tag making sure to change the name to reflect the justification of the tag.

Here is a video of the entire process.


In the next part of the series we will look at adding an option to show the bottom of insulation.

Creating a Duct Elevation Tag - Part One

Posted by  | Categories: Autocad MEP, Tutorials

For my first post I thought that I would start a series of posts on how to create tags and more specifically an elevation tag for duct.  The criteria for this tag will be that it needs the following abilities:

  • Show bottom of duct elevation (BOD)
  • Create the tag using a property set that is automatically attached to duct
  • Show the bottom of duct elevation with or without insulation
  • Show bottom of duct with or without an elevation offset
  • Have the ability to tag a regular piece of duct or a locked piece of duct
  • Have the ability to know if the bottom of duct elevation is below the ceiling elevation of an AEC Space

So now that we have a couple of criteria in place we can get started creating the tag.  To find the BOD a couple of pieces of information about the duct will be required.  In property set terms this information is called automatic properties and for duct the Z elevation is considered an automatic property.  In other words, this property is supplied by the program automatically to any property set that wishes to use it.  Unfortunately the elevation supplied is not the bottom of duct, it is instead the centerline elevation of the duct.  So we will need to know the height of the duct to calculate the BOD elevation.  Fortunately the height of a piece of duct is considered an automatic property and returns the depth of a rectangular piece, the minor of an oval piece, or the diameter of a round piece of duct.

So now that we have our two automatic properties we can get started creating our tag but first we need to decide in which property set to calculate our new BOD elevation tag.  The ductobject property set supplied by Autodesk already contains our two automatic properties so we could just create the tag there but we want our property set to automatically be attached to each piece of duct and any property sets supplied by Autodesk out of the box do not have this functionality.  We could use the ECDuctSystemData which is attached automatically when the DUCTSCHEDULEDATA command is ran or when the duct is set to be automatically broken into sections and tagged but this would not be a good idea.  Any information in this property set can be changed or removed from release to release.  Instead we will place our information inside of the ECDuctCustomData property set which acts exactly like ECDuctSystemData but will never be modified by EastCoast.  This means that when the next release comes out we can be 100% confident that our property set will still work as intended.  Since ECDuctCustomData is shipped completely empty we will need to add the automatic properties to it and once we do that we can get started creating our tag.

To add the automatic properties to ECDuctCustomData we need to start the stylemanager and navigate to the property set section.  A shortcut for to get to this section is to just type the command PROPERTYSETDEFINE at the command line.  This will bring up the property set manager as shown below where we can add our two automatic properties.  Since this is the first time we have added anything to ECDuctCustomData it will be empty.


Create an Automatic Property

To add an automatic property we just need to select the automatic property button as shown in the picture to the right.  This will bring up a dialog where we can select LocationZ.  We then need to create another automatic property and select Height.  Once we have these two automatic properties created we can start to create our formula to calculate the BOD elevation.  To do this we will need to create a formula property definition.  The button for this can be found immediately below the automatic property button.  This will bring up a dialog similar to the one shown below.  As shown in the picture I named the formula BOD_Calculation and I have already entered in the formula to calculate the bottom of duct elevation. ([LocationZ] – [Height]/2).  Anywhere you see an item enclosed in brackets you should not type in the value but instead choose it from the list in the Insert Property Definitions: section.  In the Enter Sample Values: section make sure that the format is set to standard for each entry.



Why did we set the format to standard?  We really want the elevation to display in an architectural format so why didnt we set it here?  Well the answer is that this is not the property that we are going to read with our tag.  This property is just being used to calculate our elevation.  We will format the elevation correctly in our next property which we will call BOD_Tag.  This should also be a formula property set and in this case we will name it BOD_Tag.  Enter in the formula “BOD: [BOD_Calculation]” this time typing in “BOD: ” and then selecting BOD_Calculation from the list under ECDuctCustomData.  Make sure to set the format correctly this time to Unit-Distance Feet Inches – No Comma.



One last thing to do today is to look at all of the properties of ECDuctCustomData and turn off the visibility of all property definitions except for BOD_Tag.  This will insure that the only property definition that will show on the property palette will be just the one we are interested in.  Below is a video of the entire process.

In Part Two we will show how to create the actual tag itself and save it in the correct style drawing.