Up | ScorpionEx.py | SetValue | GetValue | SetConfigValue | GetConfigValue | GetImageMatr | DecimateMatr | RegisterCallback | RegisterPlugin | RegisterUserManager | PluginChanged | ExecuteCmd | Other

 

  

 
Other
Method Returns Description
SetLiveVideo(index) 0/1 equals live video settings index camera setup page. index=0 equals all
Invalidate(handle) 0/1 handy function to invalidate/update a window
SetSelTool(name) True/False set selected tool for main tool list. Returns False if name don't exists or any configuration dialog is open, else True. To disable selected tool a non existing tool name/blank may be given (though the function result will be False)
GetSelTool() string get selected tool in main tool list. Returns name of selected tool if any, else empty string
ToolStat() None writes profile tool statistics to console
ToolReport() None writes tool definition to console
CreateForm(name) Form creates a form suitable for control containment
CreateDialog(name) Dialog creates a dialog style form suitable for control containment
CreateOKCancelDialog(name) Dialog creates dialog with OK and Cancel button
GetDirList(dir,[recursive=False]) tuple creates a list of all directories in dir. Set optional recursive to True get all directories in directory tree. Directorynames includes full path.
GetFileList(dir,[recursive=False]) tuple creates a list of all filenames in dir. Set optional recursive to True get all files in directory tree. Filenames includes full path.
FindFiles(mask) tuple returns all files mathing DOS mask (ie.<path>*.bmp). Files does not include path as above methods.
GetCurSource() string return current name of executing script (not nested names)
GetCurTool() tool returns current tool if script is executed by a PythonScript tool
SetTraceLog(mode,filename=’’,separator=’;’) int set internal application trace mode to add execution info messages to tracelog. Trace messages from toolbox execution and

mode - integer value of mode bits
  bit 1 - append trace messages to tracefile
  bit 2 - last trace message to singleline tracefile_LAST.<ext>
  bit 4 - send trace messages to console
  bit 8 - send trace messages to DebugView or similar application

filename - name of tracefile, located in "Storage Folder" if path is omitted
separator - tracelog field separator, default ';'

Default tracefile - "Scorpion_Trace_0.log" / "Scorpion_Trace_0_LAST.log"

SetTraceMode returns previous mode.

Trace standard format:
<timestamp>;<threadID>;<memoryused>;<context1>;<context2>;....<contextN>
AddTraceMessage(msg) int add trace message due to tracelog mode. Msg may be single item, list or tuple.

Example - adding messages to tracefile:
  SetTraceLog(1)
  AddTraceMessage('Inspecting item')
  AddTraceMessage((GetStringValue('System.Result'),GetBoolValue('System.Running'))

 

 

Scorpion Vision Version XII : Build 647 - Date: 20170227
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.