Getting EnumerationLiteral value in M2Doc

Hi all,
I defined with PVMT an EnumerationDefinition named TIME_UNIT as [DAY, WEEK, MONTH, YEAR] and an EnumerationProperty TimeUnit of type TIME_UNIT in a PropertyGroup.

Then in M2Doc, I am trying to get the value of the EnumerationLiteral with no success.

In the M2Doc interpreter view, the expression ‘’ returns the right value, but it is not working in the docx template, which returns the error " Invalid query statement: Feature value not found in EClass AbstractPropertyValue", while selection.getValue() returns null.

Any hint?

You are probably navigating an EReference which type is AbstractPropertyValue and this EClass doesn’t have a value EAttribute. You need to cast is to the specific type:


This will tell M2Doc and AQL at this point I have a EnumerationPropertyValue and let you access the value EAttribute.

1 Like

Hi Yvan,
thank you for your support! It worked.

1 Like