Custom command to label assemblies in Civil 3D: alab

Download file: alab.zip  

Since corridor files can get pretty busy, a good method to keep assemblies organized is to add mtext “labels” with fields that pull the name out of the assembly object.  This process can be a little tedious since the user has to place the mtext/field, point it to the proper object, select the appropriate field, and repeat that for each assembly.  The end result looks something like this:  

Mtext fields point to each assembly and display the name value.

In order to make the labeling process a little easier, I’ve written a short command to label one or more assemblies, with fields, using only a a single command.  To use this command, download this file and unzip it.  Then follow the instructions from the alab-readme.txt file as shown below:  

Instructions:  

  • Copy the DLL for your version of Civil 3D to a local drive
  • Run Civil 3D and load the DLL with the NETLOAD command.
  • For advanced users, it can also be automatically loaded by adding (command “netload” “c:/yourpath/alab”) to your acaddoc.lsp file.
  • Execute ALAB at the command line
  • Select one or more assemblies

Notes:  

  • Unless you’re very familiar with configuring the dotnet framework, this DLL must be stored on a local drive.  With the stock dotnet configuration, dotnet DLLs will load into your Civil 3D session from a network volume, but they will cause fatal errors when executing the commands.
  • The labels are drawn on the current layer, using the current text style.
  • Versions for Civil 3D 2010 (alab-2010.dll) and Civil 3D 2011 (alab-2011.dll) are included in the zip file.  You only need to load the DLL for your version of Civil 3D.
  • This command is free to use.  There are no warranties.

Leave a Reply