Click or drag to resize

IPortsAdd Method

Adds a new port.

Namespace:  EMInvent.InventSim.COMServer
Assembly:  InventSim (in InventSim.exe) Version: 5.1.12.6+develop
Syntax
IPort Add(
	string name,
	ISimObject face,
	PortType type
)

Parameters

name
Type: SystemString
Name of the port.
face
Type: EMInvent.InventSim.COMServerISimObject
Face to which port will be assigned.
type
Type: EMInvent.InventSim.Simulator.PortsPortType
Port type.

Return Value

Type: IPort
Reference to the newly created port.
Remarks
This method can be used to add any type of port except of analytic port. In such a case an exception will be thrown. Please use AddAnalytic(String, ISimObject, AnalyticPortWaveguideType) method to add analytic ports.
See Also