Autodesk Fabrication: Best Practice #7

Don’t work in a Live Sync’d Database

This warrants a little explanation.  Many companies have multiple locations and need to sync Fabrication configurations between those sites. Other companies have their Fabrication configuration copied locally to the users system from a central network location.

To keep from having to manually keep different sites or local computers up to date, it’s natural to look so some of the many technology solutions like Microsoft’s One Drive, Box.net, Dropbox, Google Drive, DFS Replication etc. 

Here’s the problem….most of these solutions sync files in their own order and time frame. You often can’t control when they sync. When using CADmep, ESTmep or CAMduct, just using the software can cause the program to read back from the database files. Many of the database files reference each other using indexes. Take for example, the Specifications and Materials….both of those database areas refer to each other.

When changes are made, what happens is the files get updated where you make the changes, but the two files that get changed, may sync somewhere else at different times. As you’re using the software, if it happens to reread some of the database files when some are sync’d and others aren’t, this can cause unspecified problems.

One of the more common issues is when a system you’ve drawn changes to a completely different system. Have you ever had a Cast Iron No-Hub waste line all of the sudden day it’s Supply Air 2″ Positing Water Gauge?  This is our of sync syncing issues is often the result.

How do you work around this? Try to find sync solutions that allow more control, like after hours sync. I personally like an old batch file running RoboCopy as it allows a lot of control and I can have it fire up when the user logs on. They can also manually run it during the day if I push our a critical update otherwise the get the update tomorrow when they log in. When syncing servers from different sites, I schedule it to run after hours. 

This issue is most common w/CADmep, ESTmep and CAMduct. Because Revit loads and stores your services, it doesn’t read back to the database unless you explicitly tell it to reload the services so it’s risk is greatly reduced to the point where I wouldn’t worry about it.

Now, there are people that are doing local Sync’s in real time. My prior firm, we had some…let say…”creative folks” who would take liberties with the database if they knew it was local. As such, I used Windows OffLine Files to sync a local copy but make it look like it’s still on line. This is a Sync’d local copy and goes against what I recommend above. However, we forced it to rescan frequently so when there were changes, they were small, just a few files and they’d sync quickly about the same time. Larger changes involving a lot of files can open up your risk window to having issues.

If you’re going to use life syncing utilities, proceed carefully and watch for unexplained issues. Making large changes after hours and smaller changing during working hours can help.

And if you’re considering using Window’s Offline Files, prepare for a long learning curve and experiment with yourself first. Offline Files have little control from the User Interface and is best managed with Group Policy.

CADmep Properties via AutoLISP

If you’re an AutoLISP programmer and use Autodesk Fabrication CADmep, you most likely know that there’s a COD Scripting language in Autodesk Fabrication that provides read and/or write access to CADmep properties. The problem with COD Scripts, is that sometimes they’re not powerful enough to do all of the other things you’d like to do and you may want to use AutoLISP.

What you may not know is that you can access the vast majority of CADmep properties from AutoLISP. To so this, you need to configure CADmep’s List Setup dialog which will provide a light weight but similar interface to what you see when you build reports in Autodesk Fabrication. 

To access List Setup, right-click in an open area or the drawing editor and then select “CADmep” -> “Setup” -> “List Setup” from the menu. 

List Setup will Provide access to CADmep Properties

Configuring List Setup will provide access to the configured properties via DXF codes which are one of the most common ways of accessing object properties in AutoLISP. (You can also access these same DXF based properties via VBA, ARX or .Net)

The following image shows the List Setup dialog before (left) and after (right) being configured. Simply add the properties you want to extract in the order you want them.

Before and After Configuration of List Setup

Once you’ve configured the properties you want, a simple call to the (ENTGET) function in AutoLISP will return the data you’re looking for. You can see in the following image, that we’ve saved the DXF data to two different variables in the VisualLISP editor. The listsetup-blank variable (left) was done before configuration and the listsetup-config variable (right) was done after the configuration of List Setup.

CADmep Properties can be Found in the 300 DXF Group Codes

The code used to extract the data is the following….

(setq listsetup-blank (entget (car (entsel))))
(setq listsetup-config (entget (car (entsel))))

Because the VisualLISP editor does not word wrap it’s results, you can use the Inspect

Now, there are a few things to know about this method….

  • All CADmep properties show up in DXF Group Code 300. If you are returning multiple properties, you’ll have multiple 300 codes to parse through.
  • The order the properties are configured in List Setup is the order the properties will appear when returned in AutoLISP. There really is no other foolproof way of knowing which codes are which properties (unless obvious by their value) without knowing the order List Setup was configured.
  • If you later change the properties or their order, you’ll likely break your existing code. Think carefully about what you may want later and add it from the start even if you don’t want it at this time. If you need to add properties later, simply add them to the end of the list.
  • This method works well for reading Fabrication properties. It doesn’t allow you to set them using functions like “(ENTMOD)” or “(ENTUPD)

Fabrication 2018.3 & 2019.1 Updates Available….Again.

After a very brief appearance toward the end of October, the Fabrication updates for 2018.3 and 2019.1 are back on line as of today.

Unlike previously speculated, they were not removed due to issues. They were intended to be released later but were inadvertently released early. If you happened to have them from their initial release, you don’t need to download the update again, the build numbers did not change. However, the PDF documentation of fixed issues on some of them did get more information listed in what was fixed. You can review all the issues addressed here…

Tag Opposite End of Fitting

In CADmep, using the Size command, you can tag the size of a fitting. But on a fitting like a transition, what if you wanted to tag the size of the opposite end?

This can be easily done but the sequence is a little nuanced. Type “SIZE” from AutoCAD’s command prompt or select the “Size” tool button on the CADmep toolbar.  

When prompted to Select Objects, select the fitting. Once the fitting is selected, instead of pressing <Enter> to end the selection like you normally would, press and hold the <TAB> key while you press the <Enter> on the keyboard at the same time. Your tag will display the size of the opposite end.

Depending on your AutoCAD and Mouse settings, right-clicking to end the select objects prompt may not work and instead bring up a right-click menu. For this reason, it’s recommended you use the <Enter> key on your keyboard while pressing <Tab>

The following video shows to transitions of the same size side by side. The left transition has it’s size tagged like you normally would. The fitting on the right, the <Tab> key his being held down when the <Enter> key is pressed which results in the tag displaying the size of the opposite end of the fitting.

Fabrication SP 2019.1 & 2018.3

On October 23 2018, Autodesk released Update 2019.1 and 2018.3 for all the Autodesk Fabrication products.  Within a week, the updates have disappeared. This most often happens when a critical issue arises with the update. No word on what it may effect but when this has happened in the past, the issues were often significant.

I have not taken the time to uninstall and reinstall my Fabrication products as I don’t do production work. I would advise anyone that does production work to seriously consider this if they’ve already applied the updates. 

So far with the limited Fabrication database administration I’ve done I haven’t noticed anything. I have tested nearly 1-1/2 dozen support issues I’ve logged over the last year and a half and only 1 was addressed. Many of my issues affected incorrect sheet metal pattern developments and require manual fixes each time.

If you’re interested in the issues that were suppose to be addressed, please refer to my Fabrication update page. Links are below. If past history holds true, the new updates will come out a month from now and be new versions which may not list the issues that were corrected.

CADmep 2018.3
CADmep 2019.1
CAMduct 2018.3
CAMduct 2019.1
ESTmep 2018.3
ESTmep 2019.1

Inserting List of Points into AutoCAD

Have you ever received a list of coordinates in a CSV file and wanted to place those in AutoCAD? Were you aware this can take as little as 2 minutes?

For a very long time, AutoCAD has supported SCRIPT files. A script file is nothing more than a text file (using only Notepad) that lists the everything that you’d typically type to AutoCAD’s command line.

Take for example the following CSV file. How would we get this into AutoCAD?

Points List in CSV Format Opened in Excel

To figure out what we need to type in AutoCAD, let’s first start by making sure our Point style is something other than a single dot so it’s more easily visible on your screen. To do this, type “PTYPE” at AutoCAD’s command line. If you don’t get the following dialog, Escape out of the command and type “DDPTYPE” and try again. Select a point style that suites you.

Point Style Dialog

Now that you have a point style that’s more visible on the screen, lets type the Point command and see what input it takes.

You can see from the below image of the command line that once we type “POINT” and press ENTER or SPACEBAR, there’s a little text that displays the current point style and size. You’re then prompted for the coordinates. The points in this example were entered by typing X,Y,Z coordinates for one point and X,Y coordinates for the other. After typing the coordinates and pressing ENTER, the command completes.

X,Y or X,Y,Z Formats Can Be Used For Points

To test this theory, we can use Notepad to manually create a Script file. Type the contents you in the below image and name your file with an “SCR” File extension. You’ll want to make sure Notepad’s “Save as type” drop down list is set to “All Files (*.*)” or else Notepad will append a TXT to the end of the file.

One other thing to also note is that the cursor is after the last line, just below it. This is because there’s an “Enter” after the last point…this is just like hitting Enter on the keyboard to complete a command in AutoCAD.

Use Notepad to Create a Script File

After you’ve created your text file, type the “SCRIPT” command at AutoCAD’s command line and select the Script file you just created. When complete, AutoCAD should have added 2 more points to the drawing.

The Script File’s Input Looks The Same As Manually Typing.

So, now you know how the basis for a script file (same as you’d type manually) and how to create one (using Notepad), the next thing you need to do is convert the CSV file in Excel to a Script file. That’s actually quite simple.

You’ll use Excel’s “CONCATENATE” function which takes several pieces of text and puts them together. In this example, this is the formula we’re using…

=CONCATENATE("Point ",B2,",",C2)

The first piece of text is the Point command. Remember, we can use the SPACEBAR after a command and it’s the same as if we’re pressing the ENTER key. That’s why you see the space after the “POINT“. Each piece of typed text is also contained in double quotes. 

=CONCATENATE("Point "

Each piece of text that is concatenated is separated by a comma. After the command, you start typing the X-Coordinate which is the Easting column in the CSV file. Because we’re not explicitly typing text, we can simply use a cell reference like so…

=CONCATENATE("Point ",B2

When typing coordinates in AutoCAD, we separate them with a comma, so we use another comma for Excel’s Concatenate function, then a comma explicitly typed in double quotes.

=CONCATENATE("Point ",B2,","

Finally, we add the Y-Coordinate which is in the Northing column using a cell reference, again, remembering to separate all the pieces of data with a comma and close the Excel function with a closing parenthesis.

=CONCATENATE("Point ",B2,",",C2)

When you’re done, copy the formula to the other cells. You can see in the image, that we have a line of text similar to what we typed in Notepad manually the first time. The below image, I’ve used the F2 key to edit the first cell so you can see the formula and the cell references.

Excel Used to Build a Script File

Now that you’re text in Excel is in a Script File format, you can guess the next step. Copy/Paste the text into Notepad, Save with a TXT extension on the file name.

Make Sure the Cursor is on the Last/Empty Line

The last step is to run the script file in AutoCAD using the Script command. Zoom Extents in AutoCAD to see your points. The CVS file, Excel File and Script files can be downloaded for examination from this link.

Here’s a screen recording of making and running the script file. As you can see, it takes a CSV file, gets converted into a Script file and places the points in AutoCAD in less than 2 minutes.

CSV Points List to AutoCAD Points in Less Than 2 Minutes

Script files are quite easy. You could easily add more text, and use different commands to do the same thing like Insert an attributed block into the drawing and use the point number as the attribute value. You just need to make sure all your system variables are set to prompt you upon insertion for the attribute value.

The only real downside to Script files is they’re not intelligent. They don’t like extra characters or spaces, the don’t work well with commands that prompt for user input or display dialog boxes and they don’t perform conditional logic to do different things depending what they find. They will however call AutoLISP routines so when I have more advanced work I want to do in a script file, I just have the Script call and run my Lisp as well. 

Revit Hardware Benchmark

Every CAD or BIM user I talk to is in the same boat. The struggle and fight with their IT department to spend for adequate hardware. IT departments, tasked with keeping down budgets and slowing hardware refresh times simply go to the software vendors web site and look at minimum and recommended specs. Take for example, Autodesk’s requirements for Revit 2019…

https://knowledge.autodesk.com/support/revit-products/troubleshooting/caas/sfdcarticles/sfdcarticles/System-requirements-for-Autodesk-Revit-2019-products.html

What most don’t know is that these specifications are typically based on what most customers are using. If most customers are using low quality hardware, the recommendations will also be low quality hardware. Requirements and recommendation also typically don’t reflect what you’re doing….2d drafting or rendering for example.  

Autodesk has gotten better about listed recommendations for large and small data sets, but it’s still doesn’t give you a good picture of what’s going on.

One this you can do is run some bench marking on your systems. This is typically an automated process that runs your system through various activities and ranks it based on the time to perform those tasks.

For Revit, a sharp guy named Gordon Price has helped develop a set of Benchmarking utilities for Revit. They’re posted to https://www.revitforum.org for free download and posting feedback. 

You can download the utilities from this page…

https://www.revitforum.org/hardware-infrastructure/35955-rfo-benchmark-v3-x.html

I’ve got to say, I anticipated having to fuss a bunch, re-configuring support folders, repathing files and such. To my surprise, it was very simple. Like, extract the files to a folder, read the README.TXT file to understand what the various benchmark options were then click the shortcut. 

You can get a little more advanced and have the benchmark assemble the results to a network location so you can benchmark all your machines and keep all the data on one place. But if you want to just run a simple benchmark, it’s very easy to do so although running the Expanded benchmark can take hours as it’s pretty exhaustive.

When you’re done, you get a text file summary of your particular systems results, Here’s a sample of data from my laptop….not very impressive but it’ not my primary system, just for home.travel use.

RVT 2019 - Full_Simplified set - 2018.10.06 @ 08.23.24 on MYCOMPUTER.txt
RFO Benchmark v3.2 (build 01.05.2018)
RevitForum.org

All times are in seconds, lower is better.

Run on Revit 2019.1
____________________________________________________ Model creation benchmark
16.46 opening and loading the custom template
20.78 creating the floors levels and grids
32.13 creating a group of walls and doors
52.27 modifying the group by adding a curtain wall
19.79 creating the exterior curtain wall
15.05 creating the sections
6.79 changing the curtain wall panel type
25.36 creating area plans
3.61 creating and applying view template
192.24 TOTAL
____________________________________________________ Graphics
7.99 activate View Styles view
4.17 change view to Wireframe
0.21 change view to Hidden
0.67 change view to Shaded
0.87 change view to Consistent Colors
0.66 change view to Realistic
3.01 refresh Wireframe Line view x10
9.24 refresh Hidden Line view x10
9.50 refresh Shaded view x10
8.91 refresh Consistent Colors view x10
10.77 refresh Realistic view x10
0.84 activate View Cube view
5.96 rotate view x1
62.80 TOTAL
Notes:
Graphics benchmark measures the entire graphics stack, which includes CPU and memory.
To meaningfully compare graphics cards, test all cards in the same
machine and use the 'Graphics - expanded' benchmark.
TEST CONDITIONS:
____________________________________________________ Mfr: Dell Inc.
Model: Latitude E5470
OS: Microsoft Windows 10 Enterprise64-bit
____________________________________________________ CPU: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
Max Clock Speed: 2.496Ghz
Number of Processors: 2
Number of Logical Processors: 4
Total Physical Memory: 8GB @ 2133Mhz
____________________________________________________ Drive Type: local Disk (NTFS)
Drive Model: SanDisk X400 M.2 2280 128GB
____________________________________________________ Graphics Card: Intel(R) HD Graphics 520
Graphics RAM: 1GB
Driver version: 22.20.16.4836
____________________________________________________ Screen Resolution: 1366x768x32bit @ 59Hz
DPI Scaling: 100%

CID’s That Support Field Layout

I’ve been asked from time to time, which Autodesk Fabrication Patterns (CID’s) support exporting points for field layout. If you want to use Trimble, Topcon or similar hardware for field layout like hanger inserts for MEP, these points are important.

So, with this post, we’ll show you that information but also hope to accomplish something else in the process. I’ll walk you through a couple ways to do it, one significantly better than the other. It’s not really important that you know how to do this same process again, once you have the information, you’ll likely save it somewhere. However, knowing how to do this process will hopefully give you ideas about techniques you can use for other types of data mining and extraction. It’s not hard after all, you just need to get creative with few things you already likely know how to do.

If you’d rather just get to the data, scroll to the end of this post and you’ll find the list of pattern numbers.  Otherwise, follow along and at the same time, explore some options for learning how to get this type of data yourself.

Step 1 – Get a copy of Every CID

The MAKEPAT command in Fabrication is how we create new ITM’s based on a particular CID. Most people working with Fabrication for a while know that. What they may not know is that you don’t have to randomly type patter numbers and run the command hundreds of times. CAMduct can do them all at once. If you don’ have CAMduct, install a trail version which you can download from Autodesk’s web site.

After starting CAMduct with a new project, the first step is to turn off prompting for Oversize which would keep prompting you on some large sheet metal patterns that exceed the material size. We turn this off to make the process run without pausing for user input.

Turn OFF Oversize Checking

The next step is to display CAMduct’s Command Window screen by pressing “CTRL-SHIFT-C“. 

Pressing “CTRL-SHIFT-C” on the Keyboard Displays the Command Window.

Next, in the Command Window, type the command “MAKEPAT ALL” and press <Enter>. (Note that the Command Window is also part of ESTmep but the MAKEPAT ALL function is not supported in ESTmep, only CAMduct.)

MAKEPAT ALL” will Create One of Each Pattern

Depending on the speed and resources of your computer or even other running processes, this can appear as if it’s locked up CAMduct at times. However, be patient and let it sit. Unless the software crashes, the process will complete. I’ve seen cases where it can take over 10 minutes or more.

When complete, there is no prompt. You’ll just notice the cursor back in the Command Window’s typing area. The last pattern should be CID 4522. You’ll also see the Job Contents will contain each pattern that was successfully taken off. These patterns exist only in this job, not in your database so you’ll want to save this job in CAMduct’s MAJ file format for future reference. If you like, you can download my copy here.

All Successful and Supported CID’s Are Now in One MAJ.

Step 2 – Examine Patterns

Now that we have a file with all the patterns, we can examine them. There’s a lot, and doing each one individually will take a lot of time. If you’ve ever been to one of my Autodesk University sessions, you’ll know that I frequently supply a lot of Fabrication COD scripts. This is where they can come in handy. You can download them here.

I typically place my COD scripts under the Scripts folder in my Fabrication Configuration like so…

Scripts Extracted to the Configuration’s “Scripts” Folder

If you look at a Hanger CID (1249 for example) you’ll see in it’s Options tab that there’s an “Export” option that tells CADmep if it should export field layout points or not.

The “Export” Option Controls Field Layout Point Exports

We’ll use this to determine which CID’s export points which is where the scripts come in. For this example, we’ll be using the following script…

.\Scripts\Job Items\WriteAllOptions (Job).cod 

This script will write all the Options for all the item in the CAMduct Job. To do this, click the Job Contents button on the ribbon, select all the items in the job, Right-Click and select the Execute Script option then browse to the above referenced COD script.

Use “Execute Script” to Run a COD Script on All Selected Items

After the script completes, it’ll have written to a text file all the options and their values for each of the items in the job along with their CID. You can find the file located in the root of your fabrication configuration’s Items folder. This is the file you’ll be looking for…

.\Items\WriteDWGOptions.Txt

Using Microsoft Excel, open the text file. Make sure you change the file extension to Text Files so Excel displays the file you created.

Change Excel’s File Type to “Text Files (*.prn;*txt;*.csv)

This will bring up Excel’s Text Import Wizard. Select the “Delimited” radio button and click Next.

Use “Delimited” as the Import Option in Excel

In the next screen of the Wizard, you’ll select the “Comma” toggle as one of the delimiters and then click the Next button.

Use the “Comma” Option as the Delimiter

In the next wizard page, you’ll highlight all the columns in the bottom portion and select the “Text” radio button to tell Excel to treat all the columns as text. From there, click the Finish button.

Change All Columns to “Text” Data Format

From here, Excel displays a line item for each option of each item in the job. You can now quickly filter this list by clicking the Data ribbon menu and selecting the Filter button. This adds a drop down arrow control in the first row of each column. “Column E” is the “Name” of the option. When you click the drop down arrow in that column, you see a list of all the values. Uncheck the top “(Select All)” option to deselect all the values and then scroll to the “Export” option and select it. This tells Excel to only display rows containing this text. From here, click the OK button.

Use AutoFilter to Display Only the Rows that Contain the “Export” Option

Once this is done, you’ll get a very short list in Excel. The left most column, “Column A“, is the CID  or Pattern Number for each item in the job (we make one of each pattern) that has the Export option.

Excel Quickly Filters Options to Only Those With an “Export” Option.

So now we have a list of Pattern Numbers that you know will export points for field layout. You also learned how you can use some of the scripts I have to Export and mine data from your fabrication configuration. The question you have to ask now is, are we certain this data is correct? 

Autodesk Fabrication allows you to rename Dimension and Option names. That would suggest that it’s possible to miss an option that was renamed to something other than Export. In this case, because we used CAMduct to create all the patterns from scratch, it’s most likely that it’ll have all the default names for it’s Options and Dimensions.

We’re still not in the clear however. It’s possible some patterns that support field layout points don’t have an Export option or have a similar option but name it something else. For this reason, we can’t be certain we know ALL the CID’s but we can be certain that we know SOME of them.

Step 3 – An Second (Better) Approach

How can we be certain we know ALL the CID’s that support field layout point exports? The simple answer is to export all of the items and see which have points.

To do this, we can use Fabrication CADmep. Start AutoCAD and load Fabrication CADmep. From here, if you saved the job you created in CAMduct as an MAJ file, you can use the “OpenJob” command in CADmep to import all those Items into CADmep.

CADmep will display all the items in the Fab Viewer before importing. Simply click the OK button to complete the import process. 

MAJ Imported into CADmep Displays Items in an Array

Once the MAJ is imported, CADmep will display all the Items in a large array. From here, we can use the “FPOINTE” command (previously the “TRIME” command) to export all the points. When the command asks you to select the points, type “ALL” at the select objects prompt. This will display the Field Point Sort dialog.

All Items Supporting Field Point Exports Will Appear in this Dialog.

Now we could finish exporting the points at this time but we’re not going to. This is because not all the information in this window actually gets exported. Specifically, the Tag column which displays the Item number (not the CID) and we need to know which Item number (which CAMduct sequentially numbered) to find the Item so we can check it’s CID later.

Instead, we’re going to select all the points in the bottom of the dialog, Right-Click and select “Copy” to copy the entries into the Windows Clipboard.

Without going into all the steps here, the next thing we naturally want to try is to Paste the items into Excel. If you go ahead and try it, you’ll likely notice that the coordinate fields are missing (that’s an interesting story with some history in itself) which isn’t a big deal for our purpose. But upon closer examination, you’ll also see that the columns aren’t lining up in Excel. Pasting this data into Excel is not going to work without a lot of fixing of data.

So the next thing I try, I paste the data into a blank Notepad file to see what it looks like there.

FPOINTE” Data Pasted Into Notepad

Looking at the data in Notepad, you can easily see there’s columns. A little lower in the file you see the columns tend to shift, bit there’s definitely columns there. A little further experimentation using the cursor and keyboard arrow keys you can see the cursor jump between columns. This is a clear indication that columns are separated with Tab character. If your data doesn’t look like this, try looking at the Word Wrap setting in the Format pull down menu and turning it off.

At this point, you should be guessing what’s next. Save the TXT file and open it in Excel like you did earlier. The only difference is that instead of selecting a comma as a delimiter, you want to make sure that Tab is selected as the delimiter, The resulting data in Excel should look like the following image…

FPOINTE” Data Opened in Excel

Lets keep in mind that some patterns export more than one point so there’s duplicates that aren’t needed. Additionally, we really don’t care about any of the exported data except for the Item Number which was in the Tag column in the Field Point Sort. This column is in Column F of Excel. For this reason, we’ll delete all the columns except for F. When you’re done, Column F will shift to Column A. From here, we can use Excel’s Remove Duplicates function on the Data ribbon to remove the duplicate Item Numbers.

Remove All Columns Except the One With the Tag Data and Run Remove Duplicates

When you’re done, you’ll have a nice short list of each pattern’s Item Number that was able to be exported. Note, this is the sequential Item Number that CAMduct assigned when creating the patterns. This is NOT the CID or Pattern Number.  Keep this Excel file opened for now, we’ll get back to it later.

At this point, it wouldn’t be too hard to look up each item number in CADmep or CAMduct and check it’s properties to find the Pattern Number of the item. But that can still take some time. We’ll go through another step to automatically look up the Item Number and show you the Pattern Number of the Item.

Step 4 – Using The Item Number to Find The Pattern Number (CID)

We need to somehow tie the Item Number to the CID or Pattern Number. To accomplish this, we’ll again turn to our scripts. All of my COD Scripts typically export the CID number. There’s also typically a script for each property. So we’ll be using the following script which will export the CID and Item Number of all the items in our drawing.

.\Scripts\Job Items\WriteAllNumbers (Job).cod

Type “ExecuteScript” in CADmep and browse to the above script file. At the Select Objects prompt, type “ALL” to select all the items in the drawing to run the script on. When the script is finished, it’ll export the data to the root of the Items folder like before. Open it just the same as you did prior making sure you use a Comma for a delimiter and change the column data types to Text.

.\Items\WriteDWGNumbers.Txt

Once you open the Item Number export file, it’ll look like the following image. This is what we’ll use to cross reference the Item Numbers with their corresponding Pattern Number.

Item Numbers Exported from our Job

Because we need to look up the Item Number in Excel, we’ll want to move the Number column in front of the CID column. This is because the function that we’re going to use in Excel needs the number it’s looking up in the first column. When complete, your data should look like the following image…

Number Column Moved To The First Column

Next, we’ll move this entire worksheet to the first Excel file that contains our points. Right-Click on the worksheet tab and select “Move or Copy…“, use the drop down list in the Move or Copy dialog to select the spreadsheet with your exported point data and move it to the end. Click OK when done. This will move the sheet with exported Item Numbers and CID’s to the end of the other workbook.

Move the Exported Item Numbers Worksheet to Your Point Export File

When you’re done, you’ll have two separate tabs in your first Workbook. One lists only the Item Numbers of the successfully exported points, the other contains the Item Numbers and corresponding CID’s.

Go to the first worksheet tab where it lists a single column with the Items Numbers that were exported. Add a blank row at the top and type the text “Item Number” in Column A and “Pattern Number” in Column B. In cell B2, type the following formula…

 =VLOOKUP(A2,WriteDWGNumbers!$A$1:$C$701,2,FALSE)

After typing the formula, copy it to the remaining cells in the column to complete the cross reference.

This formula tells Excel to look at the Item Number, and find it in the first column of the range in the second worksheet that lists all the Item Numbers and CID’s. When it finds that corresponding Item Number, return the value from the second column which contains the CID. The “$” in the cell address of the range tells Excel to NOT increment the range address as the formula is copied down…you want to look at the same range no matter what. Finally, the False flag tells Excel to do a strict match and not try to interpret close results. Your finished data should look like the following…

This completes our final list of Pattern Numbers (CID’s) that support Field Point Exports. You can look at my Excel file by downloading it from here.

Note that when we looked only at Items that contained the Export option, there were 14 patterns. However when we tested against the actual point export in CADmep, we ended up with 25 patterns. Our final list of Pattern Numbers (CID’s) that support field point exports is here…

149321322838972
10491189123812391240
12411242124312441245
12461247124812491250
19722189219021912192

Hopefully you’ve gained an idea on how to use some of the scripts, Excel and other processes to mine and extract data from your Fabrication configuration. It’s using techniques like these that allow me to assemble a lot of the information I have on this site like which versions of software have which CIDs’s and which ones are supported in Revit.