span8
span4
span8
span4
Hi,
I don't think this is possible but would be glad to be proved wrong.Can anyone think of a way to populate a list parameter from the result of an oracle query.I have an oracle schema where users can add tables.At run time I want the user to be able to select two tables from a drop down list and use those.Each time the workspace is run these table names would be different.
I suspect that Tkinter isn't included in the somewhat stripped version of Python that's installed with FME.
You'll probably have to download and install a full Python distribution from e.g.python.organd tell FME to use it.See here for more information:https://knowledge.亚搏在线safe.com/articles/814/choosing-a-different-python-interpreter-installati.html
It's not something that's supported out of the box.
But if you're a bit crafty and know your way around Python,it's possible to use a PythonCaller or a PythonCreator to display a dynamic dialog with lists populated from e.g.Oracle (e.g.using thecx_oraclemodule) and use those values later on in your translation.The difference will be that it won't be based on Published Parameters,but rather on feature attributes that you're manually requesting from the user at runtime.
For the GUI,you can use the built-in modulestkinterorctypes,or you could look into using third-party modules likewxPythonorPyQtfor more advanced capabilities.
Here's a very simple example using a PythonCaller and ctypes that displays a dialog and waits for the user to press a button before either continuing or cancelling the workspace:
import fmeobjectsimport ctypesdef WaitForOk(feature): message = "Hello workspace user.\nDo you want to continue?" res = ctypes.windll.user32.MessageBoxA(0,message,"My dialog title",1) if res == 1: feature.setAttribute("CONTINUE_WORKSPACE",1) else: feature.setAttribute("CONTINUE_WORKSPACE",0)
In this example,I use a Tester after the PythonCaller to check the value of attribute CONTINUE_WORKSPACE before continuing or aborting.
This probably means that Tcl wasn't installed properly.
Can Tkinter be run nativly in the workspace or does it need to be used in a wrapper?Read DWG-Blocks - write DWG-Blocks2 Answers
MySQL date/time field2 Answers
How to connect to SQL Server while setting trustServerCertificate=true1 Answer
get numberrecords and filesize5 Answers
Bug in FMW-to-FME export2 Answers
© 2019 亚搏在线Safe Software Inc |Legal