Flowsheet BaseAdd Object(String, Int 32, Int 32, 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
The newly created ISimulationObject, or Nothing if the type name is unrecognised.
Assembly: DWSIM.FlowsheetBase (in DWSIM.FlowsheetBase.dll) Version: 10.0.0.0
C#
public ISimulationObject AddObject(
string typename,
int x,
int y,
string tag = "",
string id = "",
bool CreateConnected = false
)VB
Public Function AddObject (
typename As String,
x As Integer,
y As Integer,
Optional tag As String = "",
Optional id As String = "",
Optional CreateConnected As Boolean = false
) As ISimulationObjectParameters
- 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
ISimulationObjectThe newly created ISimulationObject, or Nothing if the type name is unrecognised.