Creating Custom Commands via the ADT Design
Center
This exercise demonstrates how
you can create a custom command that is keyed to the right layer.
Define a Command Some time ago I was asked by an ARCHIdigm.com reader if ADT had the ability to draw lines that knew what layer they should be on. Well, I finally figured out how to answer that question and here's what I came up with. Though it may be somewhat silly, it works well and should demonstrate the potential for more powerful uses. From the Design pull-down menu, select Design Content and cascade down to Create AECContent... On the Create AEC Content Wizard dialogue box, illustrated to the right, check the radio button for Custom Command. In the text field under Command String, type your command. In this example, I typed pline. Pick the Next > button. |
|
Keying a Custom Command
(autolayering) On the second part of this process, the only thing we need to do is pick the Select Layer Key... button and choose a layer. In this example, I am keying my pline to the Util (A-site-util) layer. Pick the Next > button. |
|
Saving a Custom Command On the final part of this process, we need to save the command as a .dwg file to a location that ADT's Design Center will recognize correctly. After running several tests, it appears that for this type of routine to run correctly, you have to save the command to some place within ADT's Content folder; as illustrated to the right. In this example, I added my custom command to a new folder, under the Imperial folder, that I named custom; i.e., "C:\program Files\Content\Imperial\custom". I named my custom command "utility-line.dwg". Yes, it gets saved as a drawing file which wastes a lot of memory but that's how this routine works. Pick the Finish > button.
|
|
Use a Custom Command via ADT's Design
Center Once you have saved your custom command, use the Design Center and direct it to the folder we saved the command to, above - should be: "C:\program Files\Content\Imperial\custom" or a similar path/name. As illustrated, right, you can now drag-n-drop (or double-click) the picture of your custom command into and ADT drawing and not only will it draw a pline, but the pline will automatically be placed on the "A-site-util" layer. I have tried expanding on this concept by adding lisp functionality inside the custom command but that seems to blow the autolayering out, so I am afraid that this system is a bit limited. You can only write up to 255 characters for your command and I have yet to figure out how to invoke returns without using lisp. My thought was that you could create lines that no only automatically landed on the right layer, but would also become various types of lines like a gas_line, electrical_line and sewer_line depending on which icon you double-clicked. If I find a way to do this or if anyone e-mails me a solution, I'll post it here. |
|
© Copyright 2000 ARCHIdigm. All rights reserved.