Datasheet
16
|
CHAPTER 1 The Basics of auTocaD civil 3D
4 . Right-click the Sample Files toolbox, and select New Category as shown here.
5 . Expand the Sample Files toolbox to view the new category, and then click the name to edit it in
the preview area. Change the name to VBA, and press ↵.
6 . Right-click the VBA category, and select New Tool.
7. Expand the VBA category to view the new tool, and then click the name to edit it in the preview
area. Change its name to Pipe Sample.
8 . Change the description to Sample VBA.
9 . Working down through the properties in the preview area, select VBA in the drop-down menu
in the Execute Type field.
1 0 . Click in the Execute File field, and then click the More button.
1 1 . Browse to C:\Program Files\Autocad Civil 3D 2012\Sample\Civil 3D API\COM\
Vba\Pipe\, and select the file PipeSample.dvb.
1 2 . Click Open.
1 3 . Click in the Macro Name text field, and type PipeSample as shown here.
1 4 . Click the green check box at the upper right to dismiss the editor.
1 5 . You will be asked, “Would you like to apply those changes now?” Select Yes.
You’ve now added that sample VBA macro to your Toolbox. By adding commonly used macros and
custom reports to your Toolbox, you can keep them handy without modifying the rest of your Civil
3D interface or programming buttons. It’s just one more way to create an interface and toolset for
the way you work.
016817c01.indd 16 5/24/11 10:17:43 AM