Hi, I have some questions about ArcObjects for ArcGIS 10.4.
I've got a custom toolbar to ArcMap. This toolbar has developed for ArcMap 10.0. Although, I need to upgrade this toolbar to ArcMap 10.4. I've done few steps. See below.
--- Update Library References ( Changed From ArcObjects 10.0 to ArcObjects 10.4)
--- Recompile the solution.
--- Change the .NET Framework Version (From 3.5 to 4.5).
--- Create an installer (.msi) for the toolbar
PS : This toolbar opens the ArcMap.
After I had done those steps, When I executed the installer. The ArcMap opened strangely as if it hadn't loaded completely.
(See the picture).
.
Also, See Below my a part of source code.
<SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">FuncoesArcGIS</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="token preprocessor">#region Variáveis </SPAN>
<SPAN class="keyword token">private</SPAN> <SPAN class="keyword token">string</SPAN> StrPatchFile <SPAN class="operator token">=</SPAN> System<SPAN class="punctuation token">.</SPAN>IO<SPAN class="punctuation token">.</SPAN>Path<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetDirectoryName</SPAN><SPAN class="punctuation token">(</SPAN>System<SPAN class="punctuation token">.</SPAN>Reflection<SPAN class="punctuation token">.</SPAN>Assembly<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetExecutingAssembly</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>CodeBase<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">enum</SPAN> tpPapel
<SPAN class="punctuation token">{</SPAN>
A0 <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN>
A1<SPAN class="punctuation token">,</SPAN>
A2<SPAN class="punctuation token">,</SPAN>
A3<SPAN class="punctuation token">,</SPAN>
A4<SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">enum</SPAN> StateSelect
<SPAN class="punctuation token">{</SPAN>
SelectAll <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN>
DeselectAll<SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">enum</SPAN> OrientacaoPapel
<SPAN class="punctuation token">{</SPAN>
Retrato <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN>
Paisagem<SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">enum</SPAN> TipoOttobacia
<SPAN class="punctuation token">{</SPAN>
Montante <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN>
Jusante<SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">private</SPAN> IApplication pIApplication<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">public</SPAN> IApplication PIApplication
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">get</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">return</SPAN> pIApplication<SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">set</SPAN> <SPAN class="punctuation token">{</SPAN> pIApplication <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">value</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">/// <summary></SPAN>
<SPAN class="comment token">/// Work Space Factory</SPAN>
<SPAN class="comment token">/// </summary></SPAN>
<SPAN class="keyword token">private</SPAN> IWorkspaceFactory pIWorkspaceFactory<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">public</SPAN> IWorkspaceFactory PIWorkspaceFactory
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">get</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">return</SPAN> pIWorkspaceFactory<SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">set</SPAN> <SPAN class="punctuation token">{</SPAN> pIWorkspaceFactory <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">value</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">private</SPAN> IPoint pPoint<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">public</SPAN> IPoint PPoint
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">get</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">return</SPAN> pPoint<SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">set</SPAN> <SPAN class="punctuation token">{</SPAN> pPoint <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">value</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">private</SPAN> IPointCollection pGonColl<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">public</SPAN> IPointCollection PGonColl
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">get</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">return</SPAN> pGonColl<SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">set</SPAN> <SPAN class="punctuation token">{</SPAN> pGonColl <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">value</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">private</SPAN> IFeatureLayer pIFeatureLayer<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">public</SPAN> IFieldChecker fieldChecker<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">private</SPAN> IFeatureWorkspace pFeatureWorkspace<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">public</SPAN> MxDocument pMxDocument<SPAN class="punctuation token">;</SPAN>
<SPAN class="token preprocessor">#endregion</SPAN>
<SPAN class="token preprocessor">#region Construtor</SPAN>
<SPAN class="keyword token">public</SPAN> <SPAN class="token function">FuncoesArcGIS</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pIWorkspaceFactory <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">ShapefileWorkspaceFactoryClass</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pPoint <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Point</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pGonColl <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Ring</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//new MultipointClass();</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pIFeatureLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">FeatureLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>fieldChecker <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">FieldCheckerClass</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pFeatureWorkspace <SPAN class="operator token">=</SPAN> <SPAN class="token function">SetaWorkspace</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">Destructor</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FinalReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pIWorkspaceFactory<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FinalReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pPoint<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FinalReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pGonColl<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FinalReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>fieldChecker<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FinalReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pFeatureWorkspace<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pIWorkspaceFactory<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pPoint<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pGonColl<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>fieldChecker<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pFeatureWorkspace<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Marshal<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ReleaseComObject</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>fieldChecker<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pIWorkspaceFactory <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pPoint <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pGonColl <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pIFeatureLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>fieldChecker <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>pFeatureWorkspace <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
GC<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Collect</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
GC<SPAN class="punctuation token">.</SPAN><SPAN class="token function">WaitForPendingFinalizers</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="token preprocessor">#endregion</SPAN>
<SPAN class="token preprocessor">#region Metodos</SPAN>
<SPAN class="token preprocessor">#region LoginSplash</SPAN>
<SPAN class="comment token">//1</SPAN>
<SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">StartArcMap</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">bool</SPAN> blVisible<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
ESRI<SPAN class="punctuation token">.</SPAN>ArcGIS<SPAN class="punctuation token">.</SPAN>ArcMap<SPAN class="punctuation token">.</SPAN>Application objApp<SPAN class="punctuation token">;</SPAN>
pMxDocument <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">ESRI<SPAN class="punctuation token">.</SPAN>ArcGIS<SPAN class="punctuation token">.</SPAN>ArcMapUI<SPAN class="punctuation token">.</SPAN>MxDocument</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//.MxDocument//(IMxDocument)pIApplication.Document;</SPAN>
<SPAN class="keyword token">try</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>pMxDocument <SPAN class="operator token">!=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// Get a reference to the application</SPAN>
<SPAN class="comment token">//objApp = pIMxDocument.Parent;</SPAN>
objApp <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>Application<SPAN class="punctuation token">)</SPAN>pMxDocument<SPAN class="punctuation token">.</SPAN>Parent<SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Show ArcMap</SPAN>
objApp<SPAN class="punctuation token">.</SPAN>Visible <SPAN class="operator token">=</SPAN> blVisible<SPAN class="punctuation token">;</SPAN>
<SPAN class="token function">MontarBarras</SPAN><SPAN class="punctuation token">(</SPAN>objApp<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">catch</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="token class-name">Exception</SPAN> exL<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">throw</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Exception</SPAN><SPAN class="punctuation token">(</SPAN>exL<SPAN class="punctuation token">.</SPAN>Message<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">//2</SPAN>
<SPAN class="keyword token">private</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">MontarBarras</SPAN><SPAN class="punctuation token">(</SPAN>ESRI<SPAN class="punctuation token">.</SPAN>ArcGIS<SPAN class="punctuation token">.</SPAN>ArcMap<SPAN class="punctuation token">.</SPAN>Application objApp<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">try</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">string</SPAN> strBarra <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
DataSet recBarra <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">DataSet</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
ICommandBars commandBars <SPAN class="operator token">=</SPAN> pMxDocument<SPAN class="punctuation token">.</SPAN>CommandBars<SPAN class="punctuation token">;</SPAN>
ICommandBar menuBar <SPAN class="operator token">=</SPAN> commandBars<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Create</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"GeoDIMSYS - "</SPAN> <SPAN class="operator token">+</SPAN> Assembly<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetExecutingAssembly</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetName</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>Version<SPAN class="punctuation token">.</SPAN>Major <SPAN class="operator token">+</SPAN> <SPAN class="string token">"."</SPAN> <SPAN class="operator token">+</SPAN> Assembly<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetExecutingAssembly</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetName</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>Version<SPAN class="punctuation token">.</SPAN>Minor<SPAN class="punctuation token">,</SPAN> ESRI<SPAN class="punctuation token">.</SPAN>ArcGIS<SPAN class="punctuation token">.</SPAN>SystemUI<SPAN class="punctuation token">.</SPAN>esriCmdBarType<SPAN class="punctuation token">.</SPAN>esriCmdBarTypeToolbar<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
UID cmdId <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">UIDClass</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">object</SPAN> objIndex <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">object</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
recBarra<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ReadXml</SPAN><SPAN class="punctuation token">(</SPAN>StrPatchFile <SPAN class="operator token">+</SPAN> <SPAN class="string token">@"\Barras.xml"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">for</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">int</SPAN> i <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN> i <SPAN class="operator token"><</SPAN> recBarra<SPAN class="punctuation token">.</SPAN>Tables<SPAN class="punctuation token">[</SPAN><SPAN class="string token">"row"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>Rows<SPAN class="punctuation token">.</SPAN>Count<SPAN class="punctuation token">;</SPAN> i<SPAN class="operator token">++</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>recBarra<SPAN class="punctuation token">.</SPAN>Tables<SPAN class="punctuation token">[</SPAN><SPAN class="string token">"row"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>Rows<SPAN class="punctuation token">[</SPAN>i<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="string token">"Dll"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToString</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">==</SPAN> <SPAN class="string token">"GDSBAR"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
strBarra <SPAN class="operator token">=</SPAN> recBarra<SPAN class="punctuation token">.</SPAN>Tables<SPAN class="punctuation token">[</SPAN><SPAN class="string token">"row"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>Rows<SPAN class="punctuation token">[</SPAN>i<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="string token">"Dll"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToString</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">+</SPAN> <SPAN class="string token">"."</SPAN> <SPAN class="operator token">+</SPAN> recBarra<SPAN class="punctuation token">.</SPAN>Tables<SPAN class="punctuation token">[</SPAN><SPAN class="string token">"row"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>Rows<SPAN class="punctuation token">[</SPAN>i<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="string token">"Class"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToString</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//cmdId.SubType = 5;</SPAN>
cmdId<SPAN class="punctuation token">.</SPAN>Value <SPAN class="operator token">=</SPAN> strBarra<SPAN class="punctuation token">;</SPAN>
objIndex <SPAN class="operator token">=</SPAN> menuBar<SPAN class="punctuation token">.</SPAN>Count<SPAN class="punctuation token">;</SPAN>
menuBar<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Add</SPAN><SPAN class="punctuation token">(</SPAN>cmdId<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">ref</SPAN> objIndex<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">catch</SPAN><SPAN class="punctuation token">(</SPAN>Exception exl1<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">throw</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Exception</SPAN><SPAN class="punctuation token">(</SPAN>exl1<SPAN class="punctuation token">.</SPAN>Message<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="token preprocessor">#endregion </SPAN>
<SPAN class="token preprocessor">#endregion</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Well, The main question is : Is there any difference to create commandbar from ArcObjects 10.0 to ArcObjects 10.4 ??
Best Regards,