Causes the questionnaire fire the button click of a button from outside teh actual button event

Primary usage is to

  • Simulate a user clicking a button
  • Use a button as a reusable script block of code from multiple other places

Parameters

name (string) - The name of the button to fire the script on

AllowCadThread (optional true/false) - default false indicates the button script called will occur on the current thread. If the button script to be called is a CAD script (which normally starts on a specific background thread) then set this parameter to TRUE to allow the correct background thread to be used.

Return Value

none

Remarks

This routine will pass all the same objects into the next routine EXCEPT the "Value" placeholder object which is always local to the routine calling. If the Value is required in the routine to be passed back then use a Session variable to store a value to be retrieved later.

Examples

C.ButtonClick("Button1")   ' fires the buttons event script code.