Evaluating a CIMDisplayTable.DisplayExpressionInfo arcade expression?

722
4
Jump to solution
02-16-2021 02:25 PM
GrayBohnen
New Contributor II

Up front: is there any way in the Pro SDK to evaluate an arcade expression, particularly for a layer's display field? I have a CIMDisplayTable and I can read the expression from the DisplayExpressionInfo property, but I cannot find a way to directly evaluate it.

The use case is to display a list of features in a dockpane using their primary display fields. The DisplayField works fine to get any that are not an arcade expression, but I need to cover that use case.

I've seen comments that this was logged as an enhancement some time ago, but I'm wondering if anyone knows a workaround.

Thanks!

1 Solution
4 Replies
yavgisdevelopers
New Contributor

@John_Jones , I am running into this same problem. The links you posted seem to not be working anymore? I also need to be able to evaluate the arcade expression in the DisplayExpressionInfo property of a layer and apply it to the Text property of a CIMTextGraphic and can't find documentation on this anywhere?

0 Kudos
John_Jones
New Contributor III

https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic76622.html

&

https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic76794.html

 

Sorry that these links aren't permanent... 

They are references to the GetDisplayExpressions methods on BasicFeatureLayer and StandaloneTable (to help future users who need to check after the links are broken again.

John_Jones
New Contributor III

An additional note Charlie helpfully pointed out to me that these links were broken due to API changes between 2.x and 3.x...  here are the archived 2.x APIs in case that is of use to you...

https://pro.arcgis.com/en/pro-app/2.9/sdk/api-reference/index.html#topic26368.html

&

https://pro.arcgis.com/en/pro-app/2.9/sdk/api-reference/index.html#topic26588.html

0 Kudos