Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Getting the name of the image type.
jrMugz
Greetings,
I am using the following code to get the Asset Type for an asset; but it only returns a number. Is there anything I can add to the code below to get the actual metadata value displayed on the Properties page, from this number?
------
Const c_METADATA_IMAGETYPE = "{4510D310-E6BB-11D2-BF95-00A024DB7160}"
Dim objMetaData
objMetaData = myAsset.MetaDataItem(c_METADATA_IMAGETYPE)
Dim GetImageType = objMetaData.GetValue
------
Thank you,
Jim
Find more posts tagged with
Comments
Migrateduser
Jim-
What you need to do is get the definition object for the metadata.
The use the GetChoices() method to get the values. For string lists, this is just a list of strings. But it sounds like you are using a value list. This is a mapping of an integer value to a string display value. This is more tricky.
In this case, the values are stored in pairs (alternating slots) in the returned "choices" array. I think the first (even) value is the integer value and the second (odd) value is the string.
For example, you might get this back from .GetChoices()
value [0]: 1
value [1]: string X
value [2]: 2
value [3]: string Y
value [4]: 3
value [5]: string Z
I can't remember if the value or display comes first - or if the array is 0 or 1 based, but you get the idea.
Matt