Search This Blog

Monday, October 03, 2005

ADT: Routine to Copy Layer Keys Between Layer Key Styles

Ever wish you had a method for copying Layer Keys between styles? Grab a copy of this routine and you'll be able to copy keys from one drawing to another or among styles within the same drawing. To run this routine:

1.) using VBARun at the command line choose to run the "showformnew" macro.

2.)Once the Main dialog is shown select the source layer key style drawing by clicking the "Browse" option from within the "Source" combo dropdown identified by the number 1 in the graphic shown above. Once you browse to a file and choose it, you will be asked whether to open the drawing read only.

3.) Once you have chosen a drawing, click in the Source Layer key Style dropdown identified by the number 2 in the graphic shown above and choose your Source layer Key Style from those provided in the list. (See Graphic for example)

4.) You will now see a popup dialog confirming your selection and directing you to begin selecting your target file and keystyle. This dialog box will dismiss itself after 3 seconds. Repeat the process begun in steps 2 and 3 by choosing from the right side of the main dialog box. Choose your target drawing file by clicking the target drawing file dropdown indicated by the red number four in the first graphic.

5.) Proceed to the last dropdown box and select your target key style from those listed in the key style drop down box indicated by the red number 4 in the first graphic.

6.) Once you have completed the target file and keystyle selection you should see the form stretch to display the missing keys found in the source but not found in the target. (see graphic below.)

7.) All that remains is for you to choose whether to allow overrides, select the keys to be copied, and click the button in the lower right hand corner to complete the task.

Note: This was all done via vba. I have unlocked the macro so feel free to improve the routine. All I ask is that you please email me your improved/debugged copies and let me know what you think of this utility.


dkurtz said...

Thanks for the routine; I see people ask for this a lot.
And most thanks for not locking the VBA code. I also preferr to distribute my stuff "open source"...

space to ceiling grid

beau turner said...


This is extremely helpful.

Keep up the great work.


beau turner said...

one minor item, is it possible to add the search of file type to include .dwt files?

David Butts said...

Hey Richard...

Tried out the 2007 version, got an error when trying to migrate ABS layer keys - can I email you the error message and help figure out what the error is?


David Butts

Curt Smock said...

Richard -

This routine works inside ADT 2007 great, but gives me errors inside of ACA 2008. Is there an updated version? Or can you tell me what part of the code needs to be updated?