Ad

Wednesday, December 03, 2008

Action Recorder

I was pretty disappointed when the Action Recorder first came out. I was hoping for a product more like the macro recorder in the Office products that writes the actions in VBA. I do find the action recorder useful in seeing if you can program the creation of Civil 3D labels by sending the required information to the command line. For instance you can create a General Label by sending the AddNoteLabel to the command line and then send the location where you want the label to be placed (X,Y format).

The AddNoteLabel will use the default style set in the command settings. To change it using VBA use the following line of code:

g_oDocument.Settings.GeneralCommandsSettings.AddNoteLabelSettings.StyleSettings.NoteLabelStyle.Value = "Standard"

Where the "Standard" is the name of the style you want to use and the g_oDocument is the global variable that is used in the sample vba projects that ship with Civil 3D.

No comments:

LinkWithin

Blog Widget by LinkWithin

Ad