Search This Blog

Loading...

Thursday, May 26, 2005

Automatically Populate ADT Layers from your Layer Key

Can't wait for ADT to create a layer for your object? Do you want to ensure that the layers you create are generated by your layer standard? You can write your own Layer Populate routine for any version of Architectural Desktop 2002 (3.3) and above using the following code inside the VBA editor. Ready? Lets get started.

  • Create a new VBA project...I called mine MakeKeyLayers.dvb.

  • Select your new project in the Project explorer window and rename it...I called mine CreateLayersbyKey

  • Add the following reference files (for ADT 2005) by clicking "tools" then "references" from the menubar in the VBA editor. You will need to add: AEC Base 4.5 Application Library, AEC Base 4.5 Object Library, AEC Architectural 4.5 Application Library, and AEC Architectural 4.5 Object Library.
  • Note: if you are running ADT 2004 the libraries have 4.0 instead of 4.5 in the name, ADT 3.3? 3.0 instead., ADT 2006? Not sure, I haven't loaded it yet. I'm sure someone will chime in.


  • Download listing #1 by clicking here.

  • Right click in your project explorer window and choose "import file."

Add this routine to your startup suite or write a little lisp loader so that it is always loaded and available. Hope this saves you some steps!

1 comment:

Ben Jones said...

Good article!

2006 References 4.7 libraries.