Flowsheet BaseAdd Object To Surface 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
The unique ID string of the newly created simulation object.
Assembly: DWSIM.FlowsheetBase (in DWSIM.FlowsheetBase.dll) Version: 10.0.0.0
C#
public string AddObjectToSurface(
ObjectType type,
int x,
int y,
string tag = "",
string id = "",
IExternalUnitOperation uoobj = null,
bool CreateConnected = false
)VB
Public Function AddObjectToSurface (
type As ObjectType,
x As Integer,
y As Integer,
Optional tag As String = "",
Optional id As String = "",
Optional uoobj As IExternalUnitOperation = Nothing,
Optional CreateConnected As Boolean = false
) As StringParameters
- 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
StringThe unique ID string of the newly created simulation object.