Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got an issue with the parameter value's datatype returned when using composite type parameters. In my case, I create a composite of DEWorkspaceType and DEFeatureClassType:

IGPCompositeDataType gpCompositeDataType = new GPCompositeDataTypeClass();
gpCompositeDataType.AddDataType(new DEWorkspaceTypeClass());
gpCompositeDataType.AddDataType(new DEFeatureClassTypeClass());

No matter what I select in my tool, e.g .gdb, .shp etc, I get "DEWorkspaceType" in the unpacked IGPValue.DataType.

If I switch the sequence of the types, using DEFeatureClassTypeClass as the first datatype in the composite, I get DEFeatureClass as the parameter value type.. no matter what I select in the dialog.

Am I left with parsing/guessing the datatype in the string from IGPValue.GetAsText() ?

(version: 10.0 SP5)

share|improve this question
Seems like a bug. You can always check what type the resulting IGPValue is by querying for implemented interfaces, such as IDEFeatureClass or IDEWorkspace3 . Will that do the trick? – Petr Krebs May 22 '13 at 15:53
DIM SUM as (new DEWorkspaceTypeClass());=(new DEFeatureClassTypeClass()); ?? – lewis May 23 '13 at 15:11
@PetrKrebs, i tried both "if (val is IDEFeatureDatasetType)" and checking the name of the IGPValue.DataType.Name without any luck. – Oyvind Aug 12 '13 at 14:25

Your Answer


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

Browse other questions tagged or ask your own question.