Last Update: 2021.04.26
I use the following scripts in CADmep, CAMduct and ESTmep a fair amount. If you manage content, troubleshoot content issues or write your own COD scripts for Autodesk Fabrication products, you may want to check them out.
Check back or watch for any of my blog posts for when they get updated. They tend to get edits done throughout the year as I run into things. I already have a few enhancements and new scripts I’m thinking of. Below you’ll also find an FAQ about the scripts.
If you find issues with the updated scripts, you can try the older versions located here or drop me an Email and let me know what issues you are having. A sample ITM or small MAJ/DWG with the problem ITM really can help.
v4 – 2022.0 and later versions
v3 – 2019.1 through 2021.0 versions
v2 – 2019.0 and earlier versions
COD Script FAQ
What’s the difference between the v2 (2019.0 & Earlier), v3 (2019.1 – 2021.0) and v4 (2022.0 an later) script libraries?
Not a lot. The DEBUG Scripts are 99% the same, the main differences are in the JOB and LIBRARY Scripts. Those scripts report the CID number in their output in 2019.0 and earlier. In 2019.1, Autodesk added the ability to look at the Pattern Number so those scripts use that. The Pattern Number is technically more accurate. While the CID Number is typically the same as the pattern number, it technically can be edited and can be misleading. In 2022.0 Autodesk added another property to SEAM/SKINSEAM Objects which fails in prior versions.
Simply put, the latest scripts are the most complete but also require the specified version or later to run properly. Older libraries will work on older versions of Fabrication but may be missing some properties. If you need to support multiple versions, you may want to download each set and keep them in separate folders.
What are the DEBUG Scripts used for?
The DEBUG scripts are intended to be run on only one or 2 selected items as a time. You can select more but a dialog will be displayed for each item selected. There’s a number of reason to use them. Here’s the most common reason use them…
- When writing my own COD scripts, it’s sometimes helpful to see how the property data is formatted or returned. I simply run the appropriate DEBUG script and it’s displayed. e.g. “Does XYZ property return a “group & name or only a name?)
- I can quickly find specific properties about an items without navigating the EDIT ITEM dialog and/or the ITEM PROPERTIES dialog.
- Some properties are not displayed anywhere and I want to see them. e.g. A Hanger does not list an Insulation Specification anywhere. But using the Insulation DEBUG script, I can see that not only does a Hanger have that property, the property is inherited from the pipe/duct it’s cut into.
What are the JOB ITEM Scripts Used For?
When you run the JOB ITEM scripts on selected items in your MAJ or AutoCAD DWG, it exports the properties to a CSV file in the root of the Items folder in your database. You can then review the properties of the items in your database. Useful for QA/QC of items or tracking down the items that may be using a wrong connector or similar types of situations.
What are the LIBRARY ITEM Scripts Used For?
I use the LIBRARY ITEM scripts most often when making or editing content. I can quickly review the items in the library to see which ones are using which property. Like the JOB ITEM scripts, it also exports the property data to a CSV file in the root of your Fabrication Configuration’s Items folder.
Another reason I use these scripts is when doing database maintenance. Lets say you have a particular Connector or Material or Price List you want to delete but it somehow keeps coming back. It’s likely an ITM bringing it back in…you can use these scripts to sort the data in Excel and find which ITM is causing the issues and fix it so the errant database entry can be removed once and for all. This is really the most frequent use I make of all these scripts.
What do I do with the ZIP Files?
You can extract them anywhere but like to extract them into sub-folders under the SCRIPTS folder in my Fabrication configuration. This way, when the script command prompts me for the scripts, they’re right there in a sub-folder. Note: The MAP.INI file is where this path is configured. You can edit the MAP.INI file directly with notepad or use the Edit Configuration utility to change the path anywhere you like. Just extract the zip files under that configured location.
How do I run the scripts?
Type “EXECUTESCRIPT” in AutoCAD at the command line or select “OPEN SCRIPT” from the File menu in CAMduct/ESTmep. If using CAMduct/ESTmep, you can also highlight items in your takeoff and use the Right-Click menu to execute scripts as well.
Note: While the DEBUG and JOB ITEM Scripts work on items in your DWG/MAJ file, the LIBRARY ITEM scripts work in the ITM’s in your library folder structure…there’s nothing to select. You are still prompted to select items and you can or just hit enter without selecting anything.
Can I share these scripts with others?
If you open any of the scripts in Notepad, you’ll see usage restrictions. While the scripts are free to use for everyone, I’d really prefer you direct people to this page to download themselves so they get the latest scripts. The only other site authorized to host these files currently is XtraCAD.com.