Geoprocessor - IGPParameterEdit3 and IGPFileDomain domain

Discussion created by lukaszb on Jun 8, 2012
Hi everyone!

I am implementing a geoprocessor tool. I want to have a list of files as an input parameter. To do it, I've created a parameter, which is a IGPValueTableType. The ValueTable has one column of DEFileType.
As a result, I have a table, with the file browser above, when I can choose multiple files- and those are added to the table. I need to have the file browser filtered for a specific files types (by extension). To do it, I've created a domain, which is a IGPFileDomain, and I've set the file extension with domain.AddType("myext").

The issue I have is - the domain works perfectly with a simple file browser parameter. It does not work for IGPValueTableType parameter.

The code I've used for it looks like this:

        public ESRI.ArcGIS.esriSystem.IArray ParameterInfo

                // DataType and value.
                IGPValueTableType valueTableType = new GPValueTableTypeClass();
                IGPValueTable valueTable = new GPValueTableClass();
                DEFileType inputFileType = new DEFileTypeClass();
                valueTableType.AddDataType((IGPDataType)inputFileType, "Filename(s)", 75, null);

                // Set the table as an input parameter.
                IGPParameterEdit3 inParameter = new GPParameterClass();
                inParameter.DataType = (IGPDataType)valueTableType;
                inParameter.Value = (IGPValue)valueTable;
                inParameter.ParameterType = esriGPParameterType.esriGPParameterTypeRequired;
                inParameter.Name = "table";
                inParameter.DisplayName = "Choose File";
                IGPFileDomain domain = new GPFileDomainClass();
                inParameter.Domain = (IGPDomain)domain;


                return parameters;

Anyone have an idea how to make it work for the value table?


PS. This is a copy of question asked also on the geoprocessors forum (, as sugested by NobbirAhmed