Getting started using the control
In order to use the Campaign Manager control, it must first be instantiated. The easiest and suggested way of accomplishing this task is to insert the control (DVBCtrlCampaignMgr) onto an ActiveX compliant container, for example, a Visual Basic form, or, a Visual C++ dialog resource. The control can also be instantiated through raw COM API functions, but only advanced users should use this method. To use the Campaign Manager control in a DeltaV Operate picture, you must use a Visual Basic form.
Once the control has been dropped onto a compliant form, the end-user can begin coding against the control's API. Depending on the environment, the actual programming can differ, but for the most part, is fairly consistent.
The following is a high-level overview of the semantics associated with adding a batch to a campaign via the Campaign Manager control.
The use of the Campaign Manager control and the following examples are not intended as a replacement for the Campaign Manager Operator Interface. There are features of the Campaign Manager that are not included in these examples.
Drop the control (DVBCtrlCampaignMgr) onto an ActiveX container form.
Get a reference to the DVBCMClient object from the control.
Call the Connect method on the DVBCMClient object.
Get a new (empty) DVBCMCampaignEdit object from the DVBCMClient object.
Set new campaign's properties, including its base recipe (use its DVBCMRecipeEdit object).
Add the campaign to the server via the DVBCMClient object's AddCampaign method.
Get any number of new DVBCMBatchEdit objects from the DVBCMCampaignEdit object.
Set the batch properties of the DVBCMBatchEdit objects, including their recipe settings.
Add the batches to the campaign through the DVBCMCampaignEdit object's AddBatch method.
Disconnect from the Campaign Manager Server, using the Disconnect method of DVBCMClient.
The complete Visual Basic code required for the sample applications can be found in their respective folders under: DeltaV\Samples\CampaignManager.