Take the 2-minute tour ×
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 have installed the agent analyst extension for ArcGis. The refresh.exe, however, does not work. I have made a direct reference to the folder where refresh.exe is.

share|improve this question
2  
"Does not work" does not explain much. Can you elaborate? Does the application crash, does it produce an error message, etc.? –  blah238 Jan 21 '13 at 22:14
    
For the 2nd option, do you post it right in the Refresh folder? I did that and still couldn't get it to go. My directory is C:\Repast 3\Agent Analyst\Refresh and then I pasted in the config file. Thanks... –  user16956 Apr 8 '13 at 18:41
    
The option 2 does not work for me, I copied it and pasted it on the notepad and saved as to Refresh.exe.config and then I pasted it on C:Repast3\AgentAnalysis\refresh THen I tried to open Agent Based Analysis in the ArcToolbox but it did not work. Do I need to do something else in order to get this program run on ArcGIS10.1? –  user18825 Jun 4 '13 at 19:43
    
@user18825, have a look at this question: gis.stackexchange.com/q/57563/753 –  blah238 Jun 4 '13 at 20:58
    
I have a similar problem, but my version of ArcGIS is 10.2.2.3552. I tried Update 2 option (I don't know how could I do update 1) and it doesn't work. In Refresh.exe.config file I tried to type in newVersion: 10.2.0.0, 10.2.2.0 and my 10.2.2.3552. Only when I put 10.2.0.0 there is no error - when I am clicking Refresh.exe file after changing Refresh.exe.config. Nevertheless there is a problem. When I start my ABM model via agent analyst and there is update action in schedule - program make only one tick and doesn't want to move forward. Do you know what I did wrong? Maybe u have some ready upd –  Melkor yesterday

1 Answer 1

Try building the following C# program with Visual Studio; this should be a drop-in replacement. I am not sure what is wrong with the included refresh.exe but it crashes with a generic APPCRASH on my 10.1 installation:

using System;
using ESRI.ArcGIS;
using ESRI.ArcGIS.ArcMapUI;
using ESRI.ArcGIS.Framework;

namespace Refresh
{
    internal class Program
    {
        [STAThread]
        private static void Main(string[] args)
        {
            RuntimeManager.BindLicense(ProductCode.EngineOrDesktop);
            IAppROT appROT = new AppROTClass();
            if (appROT.Count > 0)
            {
                for (int i = 0; i < appROT.Count; i++)
                {
                    if (appROT.Item[i] is IMxApplication)
                    {
                        IMxDocument mxDocument = (IMxDocument)appROT.Item[i].Document;
                        mxDocument.ActiveView.Refresh();
                    }
                }
            }
        }
    }
}

Update: The issue seems to be that at ArcGIS 10.0+, ESRI no longer provides policy files allowing for assembly redirection (so you have to re-compile for each new version). See this ESRI forum thread for more info. A possible alternative solution to recompiling the program would be to create a publisher policy file that redirects the 10.0 assemblies to the 10.1 assemblies.

Update 2: Instead of recompiling, you can create an application configuration file to redirect the 10.0 assembly dependencies to the 10.1 assemblies. Copy/paste the following into a text editor and save it as Refresh.exe.config alongside Refresh.exe. Worked for me anyways:

<configuration>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="ESRI.ArcGIS.ArcMapUI" publicKeyToken="8fc3cc631e44ad86" />
                <bindingRedirect oldVersion="10.0.0.0" newVersion="10.1.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="ESRI.ArcGIS.Carto" publicKeyToken="8fc3cc631e44ad86" />
                <bindingRedirect oldVersion="10.0.0.0" newVersion="10.1.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="ESRI.ArcGIS.Framework" publicKeyToken="8fc3cc631e44ad86" />
                <bindingRedirect oldVersion="10.0.0.0" newVersion="10.1.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="ESRI.ArcGIS.System" publicKeyToken="8fc3cc631e44ad86" />
                <bindingRedirect oldVersion="10.0.0.0" newVersion="10.1.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="ESRI.ArcGIS.Version" publicKeyToken="8fc3cc631e44ad86" />
                <bindingRedirect oldVersion="10.0.0.0" newVersion="10.1.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>
share|improve this answer
    
Thanks a lot - I used option 2 and that worked –  Fskov Jan 22 '13 at 20:25
    
Great! Please accept the answer if it worked for you. –  blah238 Jan 22 '13 at 20:52

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.