<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is it possible to start a model directly from an ArcMap-Toolbar? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51235#M1779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to start a model (generated from model builder) directly from an ArcMap-Toolbar? I don't want to start the toolbox just for one frequently used tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 9.3 edition &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2012 04:43:18 GMT</pubDate>
    <dc:creator>MOHAMMEDHABBOUB</dc:creator>
    <dc:date>2012-05-03T04:43:18Z</dc:date>
    <item>
      <title>Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51235#M1779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to start a model (generated from model builder) directly from an ArcMap-Toolbar? I don't want to start the toolbox just for one frequently used tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 9.3 edition &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 04:43:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51235#M1779</guid>
      <dc:creator>MOHAMMEDHABBOUB</dc:creator>
      <dc:date>2012-05-03T04:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51236#M1780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anyone can help?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 07:45:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51236#M1780</guid>
      <dc:creator>MOHAMMEDHABBOUB</dc:creator>
      <dc:date>2012-05-03T07:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51237#M1781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The capability of adding your own toolbar and tools (models, scripts, or system tools) is in ArcGIS 10, but not in 9.3. What you can do is to create your own toolbox and add any of the above tools to it. This video shows how:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.2/tutorials/Spatial_10.htm"&gt;http://webhelp.esri.com/arcgisdesktop/9.2/tutorials/Spatial_10.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 15:22:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51237#M1781</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2012-05-03T15:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51238#M1782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have wrote this code, but an error appears (see image):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Option Explicit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Private Sub UIButtonControl1_Click()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Public Sub Test()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Dim pGP As Object&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Set pGP = CreateObject("esriGeoprocessing.GPDispatch.1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; On Error GoTo EH&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; pGP.AddToolbox ("D:\DRASTIC_MODEL.tbx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; pGP.MyModel&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EH:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; MsgBox pGP.GetMessages(), vbOKOnly, "Test"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;reference: &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/31110"&gt;http://support.esri.com/en/knowledgebase/techarticles/detail/31110&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone can help?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 17:07:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51238#M1782</guid>
      <dc:creator>MOHAMMEDHABBOUB</dc:creator>
      <dc:date>2012-05-03T17:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51239#M1783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to have two Sub or all the code in the Click event. Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, the Click event method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Private Sub UIButtonControl1_Click()
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Call the Test method
&amp;nbsp;&amp;nbsp;&amp;nbsp; Test()
End Sub

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The second method (Test) is the worker method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Public Sub Test()
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Put all code here
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pGP as Object
&amp;nbsp;&amp;nbsp;&amp;nbsp; ......
&amp;nbsp;&amp;nbsp;&amp;nbsp; .....
&amp;nbsp;&amp;nbsp;&amp;nbsp; EH:
&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox pGP.GetMessages(), ......
End Sub

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let us know how it goes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:58:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51239#M1783</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2021-12-10T21:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51240#M1784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, I'm not sure that I did it right..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the first method, I did not get it (how could I call test() method?)... see image "FirstMethod"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In second method, EH error appeared ... see image"Secondmethod"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that I'm&amp;nbsp; beginner in VB codes... but I have to learn&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 19:46:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51240#M1784</guid>
      <dc:creator>MOHAMMEDHABBOUB</dc:creator>
      <dc:date>2012-05-03T19:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51241#M1785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your whole code should like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

Option Explicit

Private Sub UIButtonControl1_Click()
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Call the Test method
&amp;nbsp;&amp;nbsp;&amp;nbsp; Test()
End Sub

Public Sub Test()
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pGP as Object
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pGP = CreateObject("esriGeoprocessing.GPDispatch.1")

&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error GoTo EH
&amp;nbsp;&amp;nbsp;&amp;nbsp; pGP.AddToolbox ("D:\DRASTIC_MODEL.tbx")
&amp;nbsp;&amp;nbsp;&amp;nbsp; pGP.MyModel
&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox pGP.GetMessages(), vbOkOnly, "Success"
&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub

EH:
&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox pGP.GetMessages(), vbOkOnly, "Error"

End Sub&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let us know what message do you get?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51241#M1785</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2021-12-10T21:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51242#M1786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;error in "Test()" illustrated in image&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 20:16:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51242#M1786</guid>
      <dc:creator>MOHAMMEDHABBOUB</dc:creator>
      <dc:date>2012-05-03T20:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51243#M1787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't have a VBA compiler right now. If you google with 'how to call a VB sub' you'll get plenty of examples. I guess the call to Test sub should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Private Sub UIButtonControl1_Click()
&amp;nbsp;&amp;nbsp;&amp;nbsp; Test
End Sub
&lt;/PRE&gt;&lt;SPAN&gt;Without the braces '(' and ')'.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:58:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51243#M1787</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2021-12-10T21:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51244#M1788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes that's right, now both solutions (method 1 and 2) give the same result&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 20:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51244#M1788</guid>
      <dc:creator>MOHAMMEDHABBOUB</dc:creator>
      <dc:date>2012-05-03T20:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51245#M1789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Let's take the issue off the forum. Email me at &lt;/SPAN&gt;&lt;A href="mailto:&amp;quot;nahmed@esri.com&amp;quot;" rel="nofollow"&gt;nahmed@esri.com&lt;/A&gt;&lt;SPAN&gt; - we'll post the summary once the issue is resolved. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 20:40:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51245#M1789</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2012-05-03T20:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51246#M1790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot, &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 20:53:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51246#M1790</guid>
      <dc:creator>MOHAMMEDHABBOUB</dc:creator>
      <dc:date>2012-05-03T20:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51247#M1791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everybody,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a solution for this problem.. in fact it's another code (see image) and it works&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;reference: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://gis.stackexchange.com/questions/4952/run-model-arcmap-9-3-1" rel="nofollow" target="_blank"&gt;http://gis.stackexchange.com/questions/4952/run-model-arcmap-9-3-1&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2012 16:11:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51247#M1791</guid>
      <dc:creator>MOHAMMEDHABBOUB</dc:creator>
      <dc:date>2012-05-04T16:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to start a model directly from an ArcMap-Toolbar?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51248#M1792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot, Mr. Nobbir Ahmed &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2012 16:12:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-it-possible-to-start-a-model-directly-from-an/m-p/51248#M1792</guid>
      <dc:creator>MOHAMMEDHABBOUB</dc:creator>
      <dc:date>2012-05-04T16:12:46Z</dc:date>
    </item>
  </channel>
</rss>

