Base Command added more than once into ArcMap

958
3
01-18-2011 03:43 PM
HailongLi
New Contributor
Hi there,

I am trying to make a Base Command with VB.net 2005 for ArcMap 9.2. What I did was:

1. added a Base Command from ArcGis templetes into my project.

2. changed all the values below to "test"
        MyBase.m_category = "test"  'localizable text
        MyBase.m_caption = "test"   'localizable text
        MyBase.m_message = "test"   'localizable text
        MyBase.m_toolTip = "test" 'localizable text
        MyBase.m_name = "test"  'unique id, non-localizable (e.g. "MyCategory_ArcMapCommand")
3.run the project.

By the way, I did not change any parts of the codes.

But there were 3 same "test" commands in ArcMap. In other words, after running the project, I went to ArcMap, and then I went to Tools->Customize, and then I went "Command" tab, and then I found 3"test" commands there, they were totally the same.

Hope you guys can understand me.

Thanks for any help.

P.S.
I just tried to delete the "ESRI" key in the regestry. But there will be one more the same command in ArcMap after I delete the key in the regestry. Say, I delete the key 2 times in the regestry then there will be 3 same commands showing in ArcMap.
0 Kudos
3 Replies
Venkata_RaoTammineni
Occasional Contributor
Hi there,

I am trying to make a Base Command with VB.net 2005 for ArcMap 9.2. What I did was:

1. added a Base Command from ArcGis templetes into my project.

2. changed all the values below to "test"
        MyBase.m_category = "test"  'localizable text
        MyBase.m_caption = "test"   'localizable text
        MyBase.m_message = "test"   'localizable text
        MyBase.m_toolTip = "test" 'localizable text
        MyBase.m_name = "test"  'unique id, non-localizable (e.g. "MyCategory_ArcMapCommand")
3.run the project.

By the way, I did not change any parts of the codes.

But there were 3 same "test" commands in ArcMap. In other words, after running the project, I went to ArcMap, and then I went to Tools->Customize, and then I went "Command" tab, and then I found 3"test" commands there, they were totally the same.

Hope you guys can understand me.

Thanks for any help.

P.S.
I just tried to delete the "ESRI" key in the regestry. But there will be one more the same command in ArcMap after I delete the key in the regestry. Say, I delete the key 2 times in the regestry then there will be 3 same commands showing in ArcMap.



Do not use test ..use some other word... and build the application and try again...

or you can debug the application so that .. you will understand which component is basically adding to arcmap...
0 Kudos
HailongLi
New Contributor
Hi Venkat,

Thanks so much for your reply.

I have tried different names, there were still multiple occurences of the command button I made. In fact, not only the command button but also the base tool and others.

Each time after I delete the key in registry, there will be one more same command button showing in ArcMap.
0 Kudos
Venkata_RaoTammineni
Occasional Contributor
Hi Venkat,

Thanks so much for your reply.

I have tried different names, there were still multiple occurences of the command button I made. In fact, not only the command button but also the base tool and others.

Each time after I delete the key in registry, there will be one more same command button showing in ArcMap.


try to debug it ?.. add component and mostly as per you 2 component suppose to add right ?...then put debug point in your project and click one component and see how it goes...
0 Kudos