VCGetCurrentPreset
VCSetCurrentPreset


Version:

9.0.1

Description:

Set the current preset to be used from a presets configuration file.

Declaration:

C/C++

extern "C" int WINAPI VCGetCurrentPreset(short* iError, short iConfigFile, char* szPresetName);
extern "C" void WINAPI VCSetCurrentPreset(short* iError, short iConfigFile, char* szPresetName);

Delphi

function VCGetCurrentPreset(var iError: SmallInt; iConfigFile: SmallInt; szPresetName: PChar): LongInt; stdcall;
procedure VCSetCurrentPreset(var iError: SmallInt; iConfigFile: SmallInt; szPresetName: PChar); stdcall;

ActiveX/COM

Function GetCurrentPreset(ByVal iConfigFile As Integer, ByVal szPresetName As String) As Long
Sub SetCurrentPreset(ByVal iConfigFile As Integer, ByVal szPresetName As String)

Parameters:

iConfigFile - an index to the presets file type:
0 - Print, Presets.vccfg
1 - Plot, Plot.vccfg
2 - PDF Export, PDF.vccfg
3 - Image Export, Graphics.vccfg
4 - XML Export, XML.vccfg
5 - Style Save, StyleOptions.vccfg
szPresetName - the name of the preset

Return Value:

the number of characters in the current preset name

iError Code:

0 - Success
1 - Current preset not found
2 - Invalid iConfigFile index

Notes:

VCSetCurrentPreset sets the current preset to be used from a presets configuration file. To determine the size of the buffer required, call VCGetCurrentPreset with the szPresetName parameter set to NULL. See VCAddPreset for discussion of how presets are used.

See Also:

VCGetPresetValue, VCEnumPresets, VCAddPreset, VCDeletePreset, VCCopyPreset