GXDN: Gurux Developer Network
AssignMedia Method (media)
NamespacesGurux.ClientGXClientAssignMedia(Object)
Assigns new media, after media settings are changed.
Parameters
media (Object)
New media component.
Remarks
The media must be created before calling this method. See methods EnumMedias and SelectMedia. Active media is implemented with GetCurrentMedia method. AssignMedia closes the active media and selects a new one. The protocol settings do not change, when AssignMedia is called. After AssignMedia is called, the media must be opened with MediaOpen method. The new media is selected with the SelectMedia method.
Examples
CopyVBScript
'Select network Media
GXClient1.SelectMedia("Net")
Set GXNet1 = GXClient1.GetCurrentMedia
'Change host name and port number
GXNet1.HostName = "localhost"
GXNet1.HostPort = 1234
'Assign new media settings.
GXClient1.AssignMedia GXNet1
'Show Media properties
GXClient1.MediaProperties
'Open Media
GXClient1.MediaOpen
See Also

Assembly: Gurux.Client (Module: Gurux.Client) Version: 5.0.0.1