CimPortList.New (method)

Creates a new port
Syntax: Set CimPort = object.New ( PortID, ProtocolID )
Parameters:
PortID As String - Name of the Port.
ProtocolID As String - Name of the Protocol.
Description: CimPortList.New creates a new CimPort object. Use this method to create a new port. You must call CimPortList.Save to save the port to the project.



Examples

Dim project As CimProject
Dim portList As CimPortList
Set project = CreateObject("CimProject")
project.OpenLocalProject "d:\classes\classes.gef"
Set portList = project.Ports
Dim port as CimPort
set port = portList.New("TCPIP1", "S90_TCPIP")
port.Description = "A Series 90 communications port"
port.ScanRate = 1
port.ScanUnit = cimMinute
portList.Save port, FALSE