There are many times when the standard parts in AutoCAD MEP don’t have the proper parameter sizes that you may require in your designs. One way to add parameters to a part is to edit the xml file associated with it. For our example, let’s say we want to change the Throat Length of the standard “Rectangular Mitered Elbow US Imperial “duct fitting. By default, the Throat length is 2”, and this value cannot be changed in the properties of the part. This part is a good candidate for editing the associated xml file. We can add a Throat Length parameter in the xml file and add it to the calculation that is coded in the xml file.
Procedure for Editing a Part xml File
To start the process, be sure to copy an existing Part through the Content Builder:
1. Go to Manage > Content Builder and navigate to the Rectangular Mitered Elbow US Imperial duct fitting under Part Domain: Duct and the Duct and Fittings > Rectangular > Elbows chapter.
2. Double-click on Rectangular Mitered Elbow US Imperial or select the Modify Part Size button to open the CAD file associated with the Part. If the dialog that notifies you of the part being created in a previous version appears, just Close it.
3. Select the Save Part Family As button to save the part under a different name.
￼4. Change the Part name to Rectangular Mitered Elbow – Throat and the Part Description to Rectangular Mitered Elbow – Throat US Imperial. Click OK.
￼5. Close the Part file (click on the X at the upper right corner of the dialog).
The reason we copied a standard part through the Content Builder is so a new part will be created with a unique ID number that will automatically be added to the Duct Fitting catalog the next time we update the catalog. A unique xml file was also created for the part. This will be the xml file that we can safely modify without affecting any existing parts.
Next, navigate to the new part’s xml file and open it in Internet Explorer. The default location in Windows 7 is C:\ProgramData\Autodesk\MEP 2013\enu\MEPContent\USI\Duct\Rectangular\Elbows.
In Internet Explorer, Allow Blocked Content.
The portion of the xml code that lists the Catalog_Partname, Catalog_PartDesc and Catalog_PartID were automatically created when we copied the original part and are necessary for the new part to show up in the parts catalog the next time we use AutoCAD MEP.
To edit the xml code in Internet Explorer, select Page > Edit with XML Editor. This opens the code in Notepad so you can edit the text.
Change the following code to add the Throat Length to the part:
1. Add the following text to the code:
<ColumnConstList desc="ThroatLength" dataType="float" unit="" name="ThroatLength" id="CCL5" visible="1" context="CustomData" index="1">
Locate this code right above the line that reads:
<ColumnConst desc="Connection 1 Domain" dataType="string" unit="" name="DCD1" id="CC0" visible="0" context="ConnectionPort_Domain" index="1">Duct_Component</ColumnConst>
￼The added code creates the ThroatLength parameter, and sets it to a value of 6.”
2. Scroll down to the line that reads:
<ColumnCalc desc="Elbow Trim Length 1" dataType="float" unit="in" name="L1" id="CCA1" visible="0" context="PathGeometry" index="1">((0.500 * $RW1) * tan((0.500 * $A1) * 3.141592653589793 / 180.000)) + 2.00o</ColumnCalc>
and change the value of 2.000 to $ThroatLength. The value of 2.000 is what caused the original part to have a 2” throat length.
3. Then, File > Save to save the changes made in Notepad.
Now open AutoCAD MEP 2013 and re-generate the Duct catalog. Draw a Duct with the standard Rectangular Mitered Elbow US Imperial duct fitting. Notice the Throat Length is the 2” default that cannot be changed.
In the Duct Fittings Properties palette, click on the part to open the Select a Part dialog. Select the new Rectangular Mitered Elbow – Throat US Imperial part and notice the new ThroatLength parameter set to 6.”
Replace the existing elbow with the new part. Notice the 6” Throat Length.
Editing the xml file of a part in AutoCAD 2013 allows you to modify formulas and add custom parameters as needed.
Tod Stephens obtained his Bachelor’s degree in Electrical Engineering from Cleveland State University and his Master of Science degree in Education and Technology from Walden University. He has been working in the CAD, BIM and visualization field for over 15 years. He has worked for Autodesk resellers as an Architectural Applications Engineer and is currently conducting Revit and 3ds Max training for an Autodesk reseller, Advanced Technologies Solutions. Tod is also an adjunct instructor at the International Academy of Design - Online teaching Revit Architecture and 3ds Max courses for the BIM department. Tod is a Revit and 3ds Max Autodesk Certified Instructor as well as a Certified Professional in AutoCAD and AutoCAD Architecture. He also holds advanced Autodesk specializations in MEP, Structure and Simulation and was the Revit instructor for the national 2012 CAD Americas training days. He is a member of the Tampa Bay Autodesk User Group (TBAUG) and the Tampa Autodesk Animation (3ds Max/Maya) User Group. He also has several Revit/ 3ds Max Tutorials on YouTube under the nexgenviz channel (30 Videos, over 650,000 Views to date). He can be contacted at firstname.lastname@example.org.