VCAddPreset


Version:

9.0.1

Description:

Adds a preset to a presets configuration file.

Declaration:

C/C++

extern "C" void WINAPI VCAddPreset(short* iError, short iConfigFile, char* szPresetName);

Delphi

procedure VCAddPreset(var iError: SmallInt; iConfigFile: SmallInt; szPresetName: PChar); stdcall;

ActiveX/COM

Sub AddPreset(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:

None

iError Code:

0 - Success
1 - szPresetName already exists
2 - Invalid iConfigFile index

Notes:

VCAddPreset adds a new preset to the list of available presets. After adding the new preset, the function VCSetPresetValue can be used to completely define the preset. The properties of a preset correspond to the settings available on the respective settings dialog. The preset can then be used by calling VCSetCurrentPreset to select it as the current preset. If the preset specified by szPresetName already exists, then VCAddPreset has no effect and no new preset is added.

See Also:

VCGetPresetValue, VCGetCurrentPreset, VCEnumPresets, VCDeletePreset, VCCopyPreset