Message 1 of 15
VBA - Change currently active dimension style

Not applicable
01-26-2018
06:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I am trying to create a macro that I can run with a button, that enables the Dimension tool, and automatically sets a specific style as active, so I do not have to do it manually each time..
This code enables the Dimension tool in the drawing:
Dim oCommandMgr As CommandManager oCommandMgr = ThisApplication.CommandManager Dim oControlDef As ControlDefinition oControlDef = oCommandMgr.ControlDefinitions.Item("DrawingGeneralDimensionCmd") Call oControlDef.Execute oControlDef = oCommandMgr.ControlDefinitions.Item("DrawingNewDimensionStyleCtxCmd")
So far Its working great.. But now I would have to set the style to a specific one. Is there a way to do it via VBA?
Thanks
Best regards