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.
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.