Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am migrating .NET, C# code for custom extension from version 9.3 to 10.1. The code is creating many toolbars on the fly and add commands to them.

The code snippets for creating one toolbar is like follows:

ICommandBars bars = m_application.Document.CommandBars;
ICommandBar newBar = bars.Create("my new toolbar",  esriCmdBarType.esriCmdBarTypeToolbar);
UID uid = new UIDClass();
uid.Value = "{E1F29C6B-4E6B-11D2-AE2C-080009EC732A}";
object index = 0;
newBar.Add(uid, ref index);
newBar.Dock(dockstyle, referencetoolbar);

so the above code works fine for 9.3 But when I recompile it on 10.1 , it produce an empty toolbar that has nothing. I investigate, and found out that the command "Dock" is corrupting the toolbar.

So, without Dock, the toolbar is created properly

I am reading on ArcObjects, and the documentation of ICommandBars.Create, says that this will create VBA toolbar, and if you are using non VBA platform, then use IToolBarDef instead.

So, is this command (ICommandBars.Create) is not supported with 10.1 and .NET?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.