The GetCDFString method builds and returns the CDF string defined by this object's properties and collections.
VBScript Syntax
IChannel.GetCDFString
IProject,
[ ISchedule,
[ ILogTarget,
[ fTopLevel ] ] ]
Parameters
IProject
An IProject dispinterface.
ISchedule
An optional ISchedule dispinterface.
ILogTarget
An optional ILogTarget dispinterface.
fTopLevel
An optional integer flag specifying whether to build a <GENERATED-BY> element.
Return Value
The CDF formatted string (VT_BSTR)
Remarks
When this method is invoked, the following occurs:
The IProject parameter is required for all invocations of GetCDFString. This Project object is used to map the strings in the LogoRefs collection to ILogo dispinterfaces found the associated Project object's Logos collection. For each mapped dispinterface, the GetCDFString method is invoked on each and the resulting string is added to the total CDF string.
The ISchedule, ILogTarget and fTopLevel optional arguments can be used to add the SCHEDULE, LOGTARGET and GENERATED-BY elements to the Channel object's CDF string. When passed, the GetCDFString method is invoked on each dispinterface and the resulting string added to the total CDF string. The integer flag, if set to 1, causes the insertion of a GENERATED-BY element. These dispinterfaces do not get propagated to objects in collections.
Example
VBScript and Windows Scripting Host
Set IDispProject = CreateObject("Push.Project")
Set IDispSchedule = CreateObject("Push.Schedule")
Set IDispLogTarget = CreateObject("Push.LogTarget")
Set IDispTopChan = oProject.Channel
Set IDispSubChan = oTopChan.AddSubchannel
Set IDispSubSubChan = oSubChan.AddSubchannel
wscript.echo IDispTopChan.GetCDFString IDispProject, IDispSchedule, IDispLogTarget, 1
would produce the following CDF string: (abbreviated to emphasize the hierarchy)
<CHANNEL>
<SCHEDULE></SCHEDULE>
<LOGTARGET><LOGTARGET>
<GENERATED-BY>
<CHANNEL>
<CHANNEL></CHANNEL>
</CHANNEL>
</CHANNEL>
In this example, only the Project dispinterface is passed:
Set IDispProject = CreateObject("Push.Project")
Set IDispTopChan = oProject.Channel
wscript.echo IDispTopChannel.GetCDFString(IDispProject)
This would produce the following CDF string:
<CHANNEL></CHANNEL>