FlowsheetBaseAddObjectToSurface Method

Low-level method that instantiates the graphic and simulation objects for a given ObjectType, adds them to the drawing surface and the SimulationObjects dictionary, and returns the new object's ID.

Definition

Namespace: DWSIM.FlowsheetBase
Assembly: DWSIM.FlowsheetBase (in DWSIM.FlowsheetBase.dll) Version: 10.0.0.0
public string AddObjectToSurface(
	ObjectType type,
	int x,
	int y,
	string tag = "",
	string id = "",
	IExternalUnitOperation uoobj = null,
	bool CreateConnected = false
)

Parameters

type  ObjectType
The object type enumeration value.
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.
id  String  (Optional)
An optional explicit unique ID.
uoobj  IExternalUnitOperation  (Optional)
An optional external unit operation instance (used when type is ObjectType.External).
CreateConnected  Boolean  (Optional)
When True, auto-creates and connects stream objects around the new object.

Return Value

String
The unique ID string of the newly created simulation object.

See Also