Download EnSight Interface Manual
Transcript
6.1 EnSight Python Code Methods EnSight Python Code Methods ID = ensight.addcallback(object,"methodname",event_type[,timeout|filter]) This method registers the specified method name will be called on the passed object when the specified event_type occurs in EnSight. The function returns an ID number that can be passed to removecallback() to unregister the callback. Currently defined values for event_type: ensight.ENS_EVENT_ALL The method will be called for all EnSight events. The callback function value will reflect the actual event type for which the callback was invoked. ensight.ENS_EVENT_QUIT EnSight is about to exit. ensight.ENS_EVENT_SOLUTION_TIME The current solution time has changed. The new time is passed as the value. ensight.ENS_EVENT_PRERENDER EnSight is about to redraw its current displays. ensight.ENS_EVENT_POSTRENDER EnSight has just redrawn its current displays. ensight.ENS_EVENT_PRECOMMAND EnSight is about to execute the command language string passed as the value. ensight.ENS_EVENT_POSTCOMMAND EnSight has just executed the command language string passed as the value. ensight.ENS_EVENT_TIMEOUT A periodic time has occurred (see below). ensight.ENS_EVENT_PARTSELECT The current part selection has changed to the tuple of part numbers passed as value. ensight.ENS_EVENT_PART A part has either been created or destroyed. A value of 0 is passed on construction and 1 is passed on destruction. A value of 3 is passed when a part is renamed. ensight.ENS_EVENT_CASE A case has either been created, renamed, made current or destroyed. A value of 0 is passed on construction, 1 is passed on destruction, 2 is passed if the current case is made current and 3 is passed if a case is renamed. ensight.ENS_EVENT_QUERY A query in ensight has been created, destroyed or updated. Two values are passed. The first selects the type of the query. If the first value is: ensight.ENS_EVENT_QUERY_PROBE, the second value will be 0 and the current probe information has been updated. If the first value is: ensight.ENS_EVENT_QUERY_DATA the value can be 0 if a query has been created or 1 if it has been destroyed. ensight.ENS_EVENT_VARIABLE A variable has either been created/activated or destroyed/deactivated. A value of 0 is passed on construction and 1 is passed on destruction. EnSight Interface Manual 6-27