PDA

View Full Version : Problem in Toolbar Macro Modified via VBA



arshiel88
2006-03-03, 10:23 AM
I have my toolbars working fine in AutoCAD 2005. I have a VBA macro that modifies a toolbar macro and it works fine. But in AutoCAD 2006 with the new CUI customization file, it doesnt work. Maybe because my macro saves in the MNS file and not on the CUI file.

1. Is it possible to access/modify CUI files via VBA?
2. I also found out that the Keyboard Shortcut associated with a toolbar now have its own macro and doesnt update once you modify the toolbars macro. (am i right? coz i'm not sure about this.)
3. Lastly, I use Ctrl+Arrow keys as keyboard shortcuts, Ctrl+Down, Left and Right arrows work fine, but the Ctrl+Up scrolls in the previous command. Is there a seeting to disable this? And why the Ctrl+Arrow keys are NOT being accepted in the keyboard shortcut customization?

RobertB
2006-03-15, 10:43 PM
1. Yes, it is possible, but not advisable. The CUI file is simply an XML-based file.
2. I'm not sure what you are getting at.
3. Ctrl+Arrow keys are not supported by the CUI, sorry.

arshiel88
2006-07-13, 02:43 PM
Related on No. 2, I used to modify macros of a toolbar via VBA in AutoCAD 2005 and save it by MenuGroupObject.Save. But later, I found out that this statement does not work since AutoCAD 2006 when they introduce the CUI customization file.

Is there any other way?

RobertB
2006-07-14, 06:48 AM
2007 now has a .NET API for the CUI. I haven't examined the API yet.

arshiel88
2006-07-24, 03:46 AM
Just started learning .NET. They say its a lot similar with VB. I'll check for it. Thanks.