ElementsAdd Method (IMElements)
ID of new element
type of the element
properties of the element
new element
time interval for changes
Adds new element. If such element exists then replace it with new one.
Syntax

Parameters

_bsNewElementID
ID of new element
_bsElementType
type of the element
_bsElementProps
properties of the element
_ppChildElement
new element
_dblTimeForChange
time interval for changes
Example
Dim myMixer As New MMixerClass()
myMixer.ScenesActiveGet(mySceneID, myIndex, myScene)
Dim pChild As MElement
Dim pRoot As MElement
m_objMixer.ElementsGetByIndex(0, pRoot)
Dim elem As MElement
DirectCast(pRoot, IMElements).ElementsAdd("newElem", "video", "stream_idx=0 h=0.5 w=0.5 show=1", pChild, 2.0)
MMixerClass myMixer = new MMixerClass();
myMixer.ScenesActiveGet(out mySceneID, out myIndex, out myScene);
MElement pChild;
MElement pRoot;
m_objMixer.ElementsGetByIndex(0, out pRoot);
MElement elem;
((IMElements)pRoot).ElementsAdd("newElem", "video", "stream_idx=0 h=0.5 w=0.5 show=1", out pChild, 2.0);
var
myMixer: MMixer;
myScenes: IMScenes;
myScene, myRooter: IMElements;
mySceneID: string;
myIndex: integer;
myElement, myRoot: MElement;
begin
myMixer:= CreateComObject(CLASS_MMixer) as MMixer;
myScenes := myMixer as IMScenes;
myScenes.ScenesActiveGet(mySceneID, myIndex, myScene);
myScene.ElementsGetByIndex(0, myRoot);
myRooter:=myRoot as IMElements;
myRooter.ElementsAdd('newElem', 'video', tream_idx=0 h=0.5 w=0.5 show=1', myElement, 2.0);
end;
See Also

Reference

IMElements Interface
IMElements Members