Is it possible to figure out programatically what license FME is using?
i.e. if I have multiple versions of FME on a machine to check using Python if 'c:\\fme2013\\fme.exe' is using a professional or oracle license.
Cheers
-James
Is it possible to figure out programatically what license FME is using?
i.e. if I have multiple versions of FME on a machine to check using Python if 'c:\\fme2013\\fme.exe' is using a professional or oracle license.
Cheers
-James
Have a look at FME_MacroValues and print out all available from here:
http://fmepedia.safe.com/AnswersQuestionDetail?id=906a0000000ck4aAAA
import fmeobjects
lm = fmeobjects.FMELicenseManager()
lic_type = lm.getLicenseType()
the easiest way is probably this, using Python:
lm = fmeobjects.FMELicenseManager() if lm.isReaderLicensed('ORACLE8I'): print "Oracle is licensed" else: print "Oracle is NOT licensed"
The parameter for isReaderLicensed() corresponds to the short name of any FME format. The format short name is listed in the FME reader gallery:
Note that the getLicenseType() method will only tell you the if the license if floating or node locked, etc.
David
lm.isWriterLicensed('ORACLE8I') is the method I'm looking for. The Reader version will always return True, because licenses restrict writers not readers.
Although if you have multiple versions of FME on a single computer like I do, which version is the method going to return? I would say it depends on which fmeobjects my sys.path points too.
@Muratgu - Oracle License is the 2nd most outter ring in this chart: http://www.safe.com/fme/fme-technology/fme-desktop/fme-editions/
glad to hear it worked. Concerning:
The Reader version will always return True, because licenses restrict writers not readers.
This does not match my experiences (the code I posted was tested successfully using FME2013sp1). Care to elaborate?
David
Our office has Professional and Oracle Spatial licenses.
Professional can read any feature type.
Perhaps you've used the Base version which is limited in readers/writers and transformers.
-James