cancel
Showing results for 
Search instead for 
Did you mean: 

Enumeration

avihai_tamari
Explorer
0 Kudos

Hi All,

Is there any way to access the Enumeration of a simple type (create in the local dictionary) at runtime?

something like : MySimpleTypeName.SomeEnumarionName.

Thanks

Avihai.

Accepted Solutions (0)

Answers (2)

Answers (2)

avihai_tamari
Explorer
0 Kudos

Hi,

Is the simple type must be integrated with the context?.

Can I use it without dealing with the context?.

Former Member
0 Kudos

Yes, you need attribute of desired type.

You can create it dynamically via wdContext.addAttribute("<name>", "<type-name>")

Sadly, DataType broker API is not public AFAIR. It allows to create type instances dynamically, but it is still WD internals.

VS

Former Member
0 Kudos

Hi,

The closest equivalent is:


final IWDAttributeInfo attr = <node>.getNodeInfo().getAttribute("<attr-name>");
final ISimpleType type = attr.getSimpleType();
final ISimpleValueServices svSrv = type.getSVServices();
final ISimpleValueSet svSet = svSrv.getValues();

Next you can query ISimpleValueSet for contained keys or key -> text mappings.

Hope this helps,

VS