My workaround will be to write the unreferenced features out to a TX file and launch Notepad with the file using SystemCaller. Just looking to see if there is something different...
Thanks,
Larry
My workaround will be to write the unreferenced features out to a TX file and launch Notepad with the file using SystemCaller. Just looking to see if there is something different...
Thanks,
Larry
I don't think this is possible. However, I usually insert a Terminator into the workspace to catch any anomalies in the data. An example would be the UNFILTERED or NOT_MERGED ports, if that would indicate a problem with the data.
You can customize the error message from the Terminator that appears in the log.
David
Larry
It's possible to create an FME dialog box based on a temporary file defining FME GUI Directives, using a PythonCaller.
-----
# Example: Show a message dialog box import fmeobjects def processFeature(feature): msg = str(feature.getAttribute('message')) directives = c'GUI TITLE Message', 'GUI MESSAGE %s' % msg] try: # create a temporary file defining GUI directives. filename = './fmeguidirectives.tmp' file = open(filename, 'w') for d in directives: file.write(d + '\\n') file.close() # create and show FME parameter prompt dialog box. dlg = fmeobjects.FMEDialog() if dlg.parameterPrompt(filename): # Do something when OK button was clicked. pass else: # Do something when Cancel button was clicked. pass except: # if an error occurred, log the message. logger = fmeobjects.FMELogFile() logger.logMessageString(msg, fmeobjects.FME_WARN) -----
FME GUI Directives http://fmepedia.safe.com/articles/FAQ/FME-GUI-Directives#heading_toc_j_13
If the message can be a unicode instance, see this Q&A: PythonCaller: Use logMessageString Problems with Encoding https://safe.secure.force.com/AnswersQuestionDetail?id=906a0000000coj6AAA
Takashi
-----
import winsound
# Play a Windows sound before showing the dialog box.
winsound.PlaySound('SystemAsterisk', winsound.SND_ASYNC)
-----
See more information about the winsound module:
35.4. winsound — Sound-playing interface for Windows
http://www.python.org/doc//current/library/winsound.html
David
Hello,
Is it possible to create a Dialog Box with the log information ?
Also, I tried to filter the log information (in Tools > FME Options > Runtime) but it didn't do anything. It didn't filter anything in the Workspace, nor in the log textfile. Do you know why ?
Thanks!