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 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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.