IEstimate.SetMacroButton Method

Adds / Defines a macro button and places it in the Automation menu.
Sub SetMacroButton( _ 
ByVal ButtonNumber As Integer, _ 
ByVal ButtonVisible As Integer, _ 
ByVal ButtonName As String, _ 
ByVal ButtonToolTip As String, _ 
ByVal FullPathToPNGImage As String, _ 
ByVal Size As Integer
)
This language is not supported or no code example is available.
void SetMacroButton( 
int ButtonNumber
int ButtonVisible
string ButtonName
string ButtonToolTip
string FullPathToPNGImage
int Size 
)
This language is not supported or no code example is available.

Parameters

ButtonNumber
int

Valid values are 1 - 19.

ButtonVisible
int

Set to 1 to display the button, any other value to hide it.

ButtonName
string

The text which appear below the button.

ButtonToolTip
string

The tooltip text associated with the button.

FullPathToPNGImage
string

The full path to a .PNG image. A default image is used when left blank. The path may use various placeholders or even refer to an embedded file, see Remarks for more details.

Size
int

  • 0 -  Large button with text
  • 1 - Small button without text
  • 2 - Small button with text

Remarks
 

Buttons are dynamically displayed according to the active estimate. When focus is given to another estimate, macro buttons may change. This function is typically called by the Events macro in the Open_Estimate event.

The FullPathToPNGImage may contain various placeholders or even refer to an embedded file. Recognized placeholders:

  • ..\ refers to the installation folder, e.g.  ..\Samples\Stuff_4_Macros\User_macro_32.png
  • <INTERNAL> followed by a file name means that the file is embedded in the estimate.
  • <USER_NAME> is replaced with the current user name
  • <PROFILE_PATH> is replaced with the current user profile folder
  • <TEMP_PATH> is replaced with the current temp folder
  • <DESKTOP_PATH> is replaced with the current desktop folder
  • <MY_DOCUMENTS_PATH> is replaced with the current My Document folder
  • <INSTALL_PATH> is replaced with the QDV installation folder 
Version
 
Available since QDV 7.13.0001.

.NET Framework

Supported in: 4.8, 4.7, 4.6, 4.5.2

In this article

Definition