cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VB >> Getting the text of an enum metaattribue

mostafafad
Super Contributor
Hey Mega Friends

I am pulling some data from Mega using a custom console application in Vb.net.
I am trying to get a value of an attribute that is an enumeration, the method I use usually is GetProp, but unfortunately this only gets the internal value of the attribute, is there a way to get the text value of this enum attribute ?


Mostafa
4 Replies

Thanks a lot. It worked 😄

This is the exact sytax as a reference for everyone else

 

Plan is a MegaMapp.MegaObject type object as used in a vb.net solution

Origin is an enum metaattribute of Action Plan metaclass

 

 Plan.GetProp("Origin", "External")

 

Happy HOPEXing

 

Mostafa

I dont recall the syntax 100%, but try something like ("myattribute","External").

You can also search in existing macros to get an example.

Hi hsoegaard,

 

Thank you for your response, where should I add external? can you give an example?

 

Thank you

 

Mostafa

hsoegaard
MEGA Partner
MEGA Partner
You should be able to add "external" and thereby get the external value of an attribute.