FlowsheetBaseAddObject(String, Int32, Int32, String, String, Boolean) Method

Creates a simulation object identified by its human-readable type name and places it on the flowsheet surface.

Definition

Namespace: DWSIM.FlowsheetBase
Assembly: DWSIM.FlowsheetBase (in DWSIM.FlowsheetBase.dll) Version: 10.0.0.0
public ISimulationObject AddObject(
	string typename,
	int x,
	int y,
	string tag = "",
	string id = "",
	bool CreateConnected = false
)

Parameters

typename  String
The display name of the object type (e.g. "Pump", "Distillation Column").
x  Int32
The X coordinate on the drawing surface.
y  Int32
The Y coordinate on the drawing surface.
tag  String  (Optional)
An optional user-visible label. Auto-generated when empty.
id  String  (Optional)
An optional unique ID. A new GUID-based ID is assigned when empty.
CreateConnected  Boolean  (Optional)
When True, automatically creates and connects surrounding stream objects.

Return Value

ISimulationObject
The newly created ISimulationObject, or Nothing if the type name is unrecognised.

See Also