Skip to main content
Question

Startup script that reads features in file

  • January 9, 2019
  • 1 reply
  • 10 views

Forum|alt.badge.img

Hello,

I am trying to develop a startup python script, that will look at an incoming file and list the feature types that are within that file. Then compare against another list of mandatory feature types. Essentially I would like to make sure that required feature types exist in the file. I am fairly new to Python, and still learning, but any guidance would be helpful.

import fmeobjects

import fme

class FMEFeature(object):

value = fme.macroValues['SourceDataset_AUTOCAD_OD']

fme.getFeatureType(value)

#unsure what to do next

Thank you!

1 reply

itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • January 9, 2019

Hi @david_prosack88,

You could use the Schema (Any Format) reader to read the feature type from both files and compare, no python needed.

Hope this helps,

Itay


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings