1

The function IGxObjectProperties.GetProperty() takes in a string, i.e. "ESRI_GxObject_Name".

So far, the ones I know are:

ESRI_GxObject_Name, ESRI_GxObject_FileSize, ESRI_GxObject_FileTime, ESRI_GxObject_FileMode, ESRI_GxObject_Type

What other strings are valid? There doesn't seem to be a complete list anywhere

1
0

Update:

You can get the valid properties like so:

IGxObject gxObj = <something>;
IGxObjectProperties props = gxObj as IGxObjectProperties;
for (int ii = 0; ii < props.PropertyCount; ii++)
{
    string name = "";
    object value = null;
    props.GetPropByIndex(ii, ref name, ref value);
}

Valid strings will change based on what the GxObject represents. I would assume other valid strings that exist by default will follow the same format as the strings your question.

This optional interface is not relied on for any major functionality. However, it does allow access to properties of a GxObject without requiring a separate property or method to be declared to access each separate piece of information. This allows new versions of your GxObject to gain additional functionality without breaking binary compatibility.

     IGxObjectProperties allows access to properties of a GxObject in a
     flexible manner.

For the GetProperty method, you should support a minimum of two properties, name and type, which are accessed via the strings ESRI_GxObject_Name and ESRI_GxObject_Type.

3
  • I'm using a GxObject to represent a feature class in a file geodatabase. Is there a way for me to find out what the valid strings are? – scMarth06 Jan 31 '18 at 16:15
  • I looked at a bit more documentation. It looks like you could use IGxObjectProperties.PropertyCount and IGxObjectProperties.GetProprByIndex to retrieve this information. Documentation – danielm Jan 31 '18 at 16:34
  • @scMarth06 I have updated my answer – danielm Jan 31 '18 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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