VCCopyPreset


Version:

9.0.1

Description:

Copies the current preset in a presets configuration file.

Declaration:

C/C++

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

Delphi

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

ActiveX/COM

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

VCCopyPreset adds a new preset to the list of available presets and copies the current preset to it. After copying the new preset, the function VCSetPresetValue can be used to change 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 VCCopyreset has no effect and no new preset is added.

See Also:

VCGetPresetValue, VCGetCurrentPreset, VCEnumPresets, VCAddPreset, VCDeletePreset