IGxDialog

2822
2
07-29-2015 10:33 PM
JohnMcGlynn
Occasional Contributor

I have a standalone ArcGIS Application used for moving data around. It was written vb.NET using Windows XP and ArcGIS 10.0 and has recently been translated to C# on a Windows 7 machine using ArcGIS 10.1. (SP1).

Since being translated, the problem I am having is the IGxDialog window takes anything from 5 to 20 minutes to display it's contents and then when the Look in: location in the window is changed, such as choosing a directory, it takes another 10 minutes to refresh the display.

Browse.jpg

The code calling the browse Dialog window is:

            switch (m_iDataTypeCurrent)

            {

                case m_eDataType.FeatureClass:

                    {

                        pGxFilter = new GxFilterFeatureClasses();

                        sTitle = "Select a FeatureClass";

                        break;

                    }

                case m_eDataType.Table:

                    {

                        pGxFilter = new GxFilterTables();

                        sTitle = "Select a Table";

                        break;

                    }

                case m_eDataType.TableOrFeatureClass:

                    {

                        pGxFilter = new GxFilterTablesAndFeatureClasses();

                        sTitle = "Table or Featureclass";

                        break;

                    }

                case m_eDataType.FeatureDataset:

                    {

                        pGxFilter = new GxFilterFeatureDatasets();

                        sTitle = "Select a Feature Dataset";

                        break;

                    }

                case m_eDataType.GeoDatabase:

                    {

                        pGxFilter = new GxFilterGeoDataServersAndWorkspaces();

                        sTitle = "Select a GeoDatabase";

                        break;

                    }

                case m_eDataType.ProjectionFile:

                    {

                        pGxFilter = new GxFilterSpatialReferences();

                        sTitle = "Select a Spatial Ref";

                        break;

                    }

            }

            pGxDialog = new GxDialogClass();

            pGxDialog.AllowMultiSelect = false;

            pGxDialog.Title = sTitle;

            pGxDialog.ButtonCaption = "Load";

           

            if (pGxFilter != null)

            {

                pGxDialog.ObjectFilter = pGxFilter;

            }

          

          bSelectOK = pGxDialog.DoModalOpen(iHandle, out pEnumGxObj);

          if (bSelectOK == false) return;

     pGxObj = pEnumGxObj.Next();

  if ((pGxObj == null))

  {

  return;

  }

  // Get the item details

  sName = pGxObj.FullName;

  sType = pGxObj.Parent.Category.ToUpper();

  sClass = pGxObj.Category.ToUpper ();

   .... etc

All the code for browsing is contained in a separate class:

     namespace NHVR_DataTransfer

     {

          class clsEsriData

           {

The handle for DoModalOpen is taken from the calling form using this.Handle but using zero seems to work just as well.

My ArcMap and ArcCatalog software don't have the same time lag when browsing data.

I tried removing the filter but nothing changed.

The time lag seems to be dependent upon the number of objects (directories, files etc) in the directory being browsed so I set the Options in ArcCatalog to be the minimum possible. No change.

It appears that the problem has something to do with this being a standalone application. It wasn't a problem with 10.0 but maybe it is with 10.1?

Does anyone have an idea of what is causing this?

Thanks

class clsEsriData    {

Tags (1)
0 Kudos
2 Replies
JohnMcGlynn
Occasional Contributor

The problem is caused by FME.

When IGxDialog.DoModalOpen is run, it calls lmutil.exe to obtain an FME license. The problem is that all two of our FME licenses are always in use.

The code doesn't have any FME references or Interoperability extension.

I uninstalled FME and the problem disappeared.

It would be interesting to know why this process happens.

John

0 Kudos
JohnMcGlynn
Occasional Contributor

If FME is installed with the 'Associate file types with FME' option ticked, the problem occurs.

To fix it uninstall FME and reinstall it with the Associate file types option set to 'No'.

John

0 Kudos