Skip to main content
Question

Getting generic lists in PythonCaller

  • May 28, 2020
  • 1 reply
  • 11 views

lifalin2016
Supporter
Forum|alt.badge.img+38

Hi.

FME supports lists in both a generic format (e.g. list{}) and as lists with attributes (e.g. list{}.value).

Is it possible in Python to get the latter form from a feature as a dict using just the simple format ?

E.g. from a feature attribute ( list{0}.value, list{1}.value, ... ) into

_myvar = feature.getAttribute("list{}") -- returning {"0":"value0","1":"value1",...} etc.

Just using "list{}" returns None as is.

Cheers

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

david_r
Celebrity
  • 8392 replies
  • May 28, 2020

Unfortunately this is not currently possible, as far as I know there is no dictionary support in the Python API.

It would make for a great idea, however!