PL.Net
These classes enable InterDynamics' Planimate® platform to be integrated in dotNET projects. Code is written in C# and VS2013 projects are provided.
Planimate.Engine Namespace Reference

Classes

class  PLBindFailure
 This exception is thrown if a proc fails to bind during init or use. This would suggest an older version of PL than the enum's here. A newer version of PL is Ok. More...
 
class  PLEngine
 This wraps PLEngineCore into a Windows Form control, adding dll anme property and resize handling. For use with Windows Forms when Planimate is the DLL. More...
 
class  PLEngineCore
 This implements communication with Planimate using callbacks and works both with Planimate being a called DLL or Planimate being the caller to dotNET. More...
 

Enumerations

enum  ePLSysInfo {
  ePLSysInfo.PLSI_CLOCK, ePLSysInfo.PLSI_ADVANCETOTIME, ePLSysInfo.PLSI_CURRENTPENDING, ePLSysInfo.PLSI_ENGINESTATE,
  ePLSysInfo.PLSI_CURRENTFILEVERSION, ePLSysInfo.PLSI_OLDESTFILEVERSION, ePLSysInfo.PLSI_LOADEDFILEVERSION, ePLSysInfo.PLSI_DLLVERSION,
  ePLSysInfo.PLSI_PAUSEAFTERADVANCE
}
 Planimate® system attributes for GetSystemInfo() More...
 
enum  ePLMode {
  ePLMode.MD_OBJECT = 0, ePLMode.MD_FLOWEDIT, ePLMode.MD_PAINT, ePLMode.MD_SIMULATE,
  ePLMode.MD_PAUSED
}
 Major mode for Planimate® engine More...
 
enum  eDOTypes { eDOTypes.PLDO_LABELS, eDOTypes.PLDO_SUBLABELS, eDOTypes.PLDO_ATTRIBUTE, eDOTypes.PLDO_TABLE }
 Planimate® Data Object types More...
 
enum  ePLRESULT {
  ePLRESULT.PLR_NOTFOUND = -1, ePLRESULT.PLR_OK = 0, ePLRESULT.PLR_LOADFAIL, ePLRESULT.PLR_INVALID,
  ePLRESULT.PLR_BADINDEX, ePLRESULT.PLR_BADFORMAT, ePLRESULT.PLR_NOSPACE
}
 Planimate® engine return results, returned by many calls More...
 
enum  eTFUnit {
  eTFUnit.UNIT_TIME, eTFUnit.UNIT_VALUE, eTFUnit.UNIT_MONEY, eTFUnit.UNIT_RATESEC,
  eTFUnit.UNIT_RATEMIN, eTFUnit.UNIT_RATEHOUR, eTFUnit.UNIT_RATEDAY, eTFUnit.UNIT_RATEWEEK,
  eTFUnit.UNIT_RATEMONTH, eTFUnit.UNIT_RATEYEAR, eTFUnit.UNIT_ABSTIME, eTFUnit.UNIT_LABEL,
  eTFUnit.UNIT_MONEY_U, eTFUnit.UNIT_ABSTIME2, eTFUnit.UNIT_VALUESPACED, eTFUnit.UNIT_TIMEOFDAY,
  eTFUnit.UNIT_TIMEAMPM, eTFUnit.UNIT_HEX, eTFUnit.UNIT_TIME2, eTFUnit.UNIT_ABSTIME3,
  eTFUnit.UNIT_MINUTES, eTFUnit.UNIT_HOURS, eTFUnit.UNIT_DAYS, eTFUnit.UNIT_WEEKS,
  eTFUnit.UNIT_VALUE_F1, eTFUnit.UNIT_VALUE_F2, eTFUnit.UNIT_VALUE_CF1, eTFUnit.UNIT_VALUE_CF2,
  eTFUnit.UNIT_DATEONLY, eTFUnit.UNIT_DAYDATE, eTFUnit.UNIT_WEEKDAY1, eTFUnit.UNIT_VALUE_RJZ,
  eTFUnit.UNIT_ABSTIME3U, eTFUnit.UNIT_LONG_EW, eTFUnit.UNIT_LONG_PRECISE, eTFUnit.UNIT_LAT_NS,
  eTFUnit.UNIT_LAT_PRECISE, eTFUnit.UNIT_TIMEOFDAY_2, eTFUnit.UNIT_DATE2, eTFUnit.UNIT_FREETEXT,
  eTFUnit.UNIT_MONEY_R, eTFUnit.UNIT_MONEY_RU, eTFUnit.UNIT_MONEY_E, eTFUnit.UNIT_MONEY_EU,
  eTFUnit.UNIT_TIME3, eTFUnit.UNIT_ABSTIMEMS, eTFUnit.UNIT_DATE2TIME, eTFUnit.UNIT_DAYHHMM,
  eTFUnit.UNIT_DAY2HHMM, eTFUnit.UNIT_PERCENT, eTFUnit.UNIT_PERCENT2, eTFUnit.UNIT_DATE3,
  eTFUnit.UNIT_SCIENTIFIC, eTFUnit.UNIT_ABSTIMEC, eTFUnit.UNIT_PERCENT3, eTFUnit.UNIT_PPM,
  eTFUnit.UNIT_PERCENT_NS, eTFUnit.UNIT_PPM_NS, eTFUnit.UNIT_PERCENT6, eTFUnit.UNIT_VALUESPACED2,
  eTFUnit.UNIT_DATE4, eTFUnit.UNIT_DATE5, eTFUnit.UNIT_HOURMIN, eTFUnit.UNIT_OS_DATETIME,
  eTFUnit.UNIT_OS_DATEONLY, eTFUnit.UNIT_OS_TIME, eTFUnit.UNIT_OS_CURRENCY, eTFUnit.UNIT_OS_VALUE,
  eTFUnit.UNIT_OS_PERCENT, eTFUnit.UNIT_RGB, eTFUnit.UNIT_VALUENODEC, eTFUnit.UNIT_VALUE_F3,
  eTFUnit.UNIT_VALUE_CF3, eTFUnit.UNIT_PERCENT1, eTFUnit.UNIT_DATE3TIME, eTFUnit.UNIT_TIMEDHHMM,
  eTFUnit.UNIT_TIMED0HMM, eTFUnit.UNIT_DAY2HHMMCOLON, eTFUnit.UNIT_MODECOUNT, eTFUnit.UNIT_NULL = 255
}
 Planimate® value formats, eg: for convertStringToPLValue More...
 
enum  ePLThreadState {
  PLT_None, PLT_LoadError, PLT_BindError, PLT_ThreadPending,
  PLT_ThreadStart, PLT_InitDone, PLT_Running, PLT_Terminating,
  PLT_ThreadEnd
}
 Thread proc status for Planimate DLL loader class This is different to the PL Run Engine State NOTE:The PL Engine is only valid when thread is in PLT_Running state NOTE:Obsolete as now InitThread is used and this is managed in PL More...
 
enum  ePLProcs {
  ePL_SetInstance, ePL_Init, ePL_Term, ePL_AppVersion,
  ePL_LoadModel, ePL_Run, ePL_GetSystemInfo, ePL_SetSystemInfo,
  ePL_DataObjectCount, ePL_GetDataObject, ePL_FindDataObjectName, ePL_FindDataObject,
  ePL_DataObjectType, ePL_DataObjectName, ePL_ListFromDataObject, ePL_GetNamedLabelList,
  ePL_LabelCount, ePL_GetLabelName, ePL_GetLabelIndex, ePL_FindLabelName,
  ePL_LookUpLabel, ePL_LookUpLValue, ePL_LookUpDValue, ePL_FindLabelAutoAdd,
  ePL_Rows, ePL_Columns, ePL_ColumnName, ePL_GetColumnFormat,
  ePL_SetColumnFormat, ePL_GetColumnLabels, ePL_FindColumn, ePL_TableResize,
  ePL_GetCell, ePL_SetCell, ePL_GetCellText, ePL_GetColumn,
  ePL_SetColumn, ePL_InsertRow, ePL_DeleteRow, ePL_InsertColumn,
  ePL_DeleteColumn, ePL_BroadcastCount, ePL_GetBroadcast, ePL_GetBroadcastName,
  ePL_SendBroadcast, ePL_SendBroadcastTuple, ePL_RegisterBroadcastCallback, ePL_FormatModeCount,
  ePL_FormatName, ePL_StringToValue, ePL_ValueToString, ePL_GetWindow,
  ePL_Process, ePL_SuspendThread, ePL_ResumeThread, ePL_RegisterPauseCallback,
  ePL_SetCellText, ePL_GetOwnerWindow, ePL_PROCCOUNT
}
 Function enum for PL_GetProc(). We wrap all functions so no need to expose this. More...
 
enum  ePLRunCMD {
  ePLRunCMD.PLRUNCMD_Close = -1, ePLRunCMD.PLRUNCMD_Stop = 0, ePLRunCMD.PLRUNCMD_Run = 1, ePLRunCMD.PLRUNCMD_Pause = 2,
  ePLRunCMD.PLRUNCMD_StartPause = 3
}
 Run commands for use within the PL_Run() call. Not for use when Planimate calls dotNET DLL. More...
 
enum  ePLPauseReason {
  ePLPauseReason.SIMUL_UserPause = 0, ePLPauseReason.SIMUL_EndTimeReached, ePLPauseReason.SIMUL_NoMoreEvents, ePLPauseReason.SIMUL_SimulateError,
  ePLPauseReason.SIMUL_Finished, ePLPauseReason.SIMUL_AdvanceTimeReached, ePLPauseReason.SIMUL_RunMemoryError, ePLPauseReason.SIMUL_BreakPointStop,
  ePLPauseReason.SIMUL_Undefined
}
 Pause callback enables a user provided function to be called every time Planimate becomes paused. This function is called in PL's thread context so do as little as possible and message to your main thread as required. More...
 

Enumeration Type Documentation

Planimate® Data Object types

Enumerator
PLDO_LABELS 

Label List

PLDO_SUBLABELS 

Sub Label List

PLDO_ATTRIBUTE 

Portal Attribute

PLDO_TABLE 

Table

Major mode for Planimate® engine

Enumerator
MD_OBJECT 

Editing objects or user mode with engine stopped

MD_FLOWEDIT 

Editing flows

MD_PAINT 

Editing paint

MD_SIMULATE 

Simulation running

MD_PAUSED 

Model in run mode, Simulation paused

Pause callback enables a user provided function to be called every time Planimate becomes paused. This function is called in PL's thread context so do as little as possible and message to your main thread as required.

Reasons the run engine becomes paused are listed in the ePLPauseReason enum

Enumerator
SIMUL_UserPause 

User pressed ESC, mouse button, may resume

SIMUL_EndTimeReached 

Nominated end time reached, user may extend

SIMUL_NoMoreEvents 

FEC empty, user may trigger new activity

SIMUL_SimulateError 

Error has occured and was reported, must End()

SIMUL_Finished 

Model has set finished state (eg:Exit), must End()

SIMUL_AdvanceTimeReached 

Advance to time reached and pause after advance set

SIMUL_RunMemoryError 

Out of memory during run

SIMUL_BreakPointStop 

Breakpoint hit in model

SIMUL_Undefined 

Undefined reason.

Function enum for PL_GetProc(). We wrap all functions so no need to expose this.

Planimate® engine return results, returned by many calls

Enumerator
PLR_NOTFOUND 

Not found

PLR_OK 

Return was OK

PLR_LOADFAIL 

Loading model failed

PLR_INVALID 

Bad paramter / mode

PLR_BADINDEX 

Bad row / col index

PLR_BADFORMAT 

Badly formatted number string

PLR_NOSPACE 

No room in buffer

Run commands for use within the PL_Run() call. Not for use when Planimate calls dotNET DLL.

Enumerator
PLRUNCMD_Close 

End simulation and close down (PL_Run() returns)

PLRUNCMD_Stop 

Stop the run engine

PLRUNCMD_Run 

Start engine/run (or continue) the model. Pauses if no events

PLRUNCMD_Pause 

Pause the model

PLRUNCMD_StartPause 

Start engine and pause (no-op if already running)

Planimate® system attributes for GetSystemInfo()

Enumerator
PLSI_CLOCK 

This is the current simulation time as indicated by the system clock

PLSI_ADVANCETOTIME 

Used to initiate or stop a fast advancement. Set the attribute to the time you wish to advance to

PLSI_CURRENTPENDING 

Events pending on FEC

PLSI_ENGINESTATE 

Engine initialisation state

PLSI_CURRENTFILEVERSION 

Model file version number we save

PLSI_OLDESTFILEVERSION 

Oldest model version we accept

PLSI_LOADEDFILEVERSION 

Loaded model version

PLSI_DLLVERSION 

Returns the version of the engine (not the core Planimate® version)

PLSI_PAUSEAFTERADVANCE 

R/W/E: controls if PL pauses after advance-to-time

Thread proc status for Planimate DLL loader class This is different to the PL Run Engine State NOTE:The PL Engine is only valid when thread is in PLT_Running state NOTE:Obsolete as now InitThread is used and this is managed in PL

Planimate® value formats, eg: for convertStringToPLValue

Enumerator
UNIT_TIME 

time W D HH:MM SS

UNIT_VALUE 

Plain value

UNIT_MONEY 

$x.xx

UNIT_RATESEC 

rate/s

UNIT_RATEMIN 

rate/m

UNIT_RATEHOUR 

rate/h

UNIT_RATEDAY 

rate/d

UNIT_RATEWEEK 

rate/w

UNIT_RATEMONTH 

rate/M

UNIT_RATEYEAR 

rate/y

UNIT_ABSTIME 

calendar HH:MM SS

UNIT_LABEL 

label list

UNIT_MONEY_U 

$x

UNIT_ABSTIME2 

calendar HHMM

UNIT_VALUESPACED 

value with commas

UNIT_TIMEOFDAY 

Time of day HHMM

UNIT_TIMEAMPM 

Time of day 12hr

UNIT_HEX 

hexadecimal

UNIT_TIME2 

Time W D HH:MM:SS

UNIT_ABSTIME3 

calendar HH:MM:SS

UNIT_MINUTES 

Time minutes

UNIT_HOURS 

Time hours

UNIT_DAYS 

Time days

UNIT_WEEKS 

Time weeks

UNIT_VALUE_F1 

fixed xxxx.x

UNIT_VALUE_F2 

fixed xxxx.xx

UNIT_VALUE_CF1 

fixed x,xxx.x

UNIT_VALUE_CF2 

fixed x,xxx.xx

UNIT_DATEONLY 

Date only

UNIT_DAYDATE 

jan 3 feb, 2000

UNIT_WEEKDAY1 

Time W D HH:MM (Week/Day from 1)

UNIT_VALUE_RJZ 

right justified zero filled 00XXX

UNIT_ABSTIME3U 

US date HH:MM:SS

UNIT_LONG_EW 

Longitude DD:MM:SS[E|W]

UNIT_LONG_PRECISE 

Longitude [-]DD:MM:SS.SS

UNIT_LAT_NS 

Latitude DD:MM:SS[N|S]

UNIT_LAT_PRECISE 

Latitude [-]DD:MM:SS.SS

UNIT_TIMEOFDAY_2 

Time of day HH:MM

UNIT_DATE2 

Calendar YYYY-MM-DD

UNIT_FREETEXT 

(free text)

UNIT_MONEY_R 

Rand currency Rx.xx

UNIT_MONEY_RU 

Rand currency no cents Rx

UNIT_MONEY_E 

Euro currency

UNIT_MONEY_EU 

Euro currency no cents

UNIT_TIME3 

Time HH:MM (no seconds)

UNIT_ABSTIMEMS 

Calendar HH:MM:SS.SSS

UNIT_DATE2TIME 

Calendar YYYY-MM-DD HH:MM:SS

UNIT_DAYHHMM 

Time Day HHMM Mon 1234

UNIT_DAY2HHMM 

Time Day HHMM 1d 1234, 7d 2359

UNIT_PERCENT 

As percentage with % symbol

UNIT_PERCENT2 

As percentage with variable fractions

UNIT_DATE3 

calendar YYYYMMDD

UNIT_SCIENTIFIC 

scientific eg: 1.2345e-002

UNIT_ABSTIMEC 

C-style DAY MMM DD HH:MM:SS YYYY

UNIT_PERCENT3 

As percentage x.xxx%

UNIT_PPM 

Parts per million

UNIT_PERCENT_NS 

as percent without symbol

UNIT_PPM_NS 

as ppm without symbol

UNIT_PERCENT6 

As percentage x.xxxxxx%

UNIT_VALUESPACED2 

value spaced without decimal

UNIT_DATE4 

Calendar dd MMM (no year)

UNIT_DATE5 

Calendar dd MMM HHMM (no year)

UNIT_HOURMIN 

Time span xxhr xxmin

UNIT_OS_DATETIME 

Operating System Locality Date Time format

UNIT_OS_DATEONLY 

Operating System Locality Date format

UNIT_OS_TIME 

Operating System Locality Time format

UNIT_OS_CURRENCY 

Operating System Locality Currency format

UNIT_OS_VALUE 

Operating System Locality Value format

UNIT_OS_PERCENT 

Operating System Locality Percentage format

UNIT_RGB 

RGB Colour format

UNIT_VALUENODEC 

Value with no decimal

UNIT_VALUE_F3 

Fixed value xxxx.xxx

UNIT_VALUE_CF3 

Fixed value x,xxx.xxx

UNIT_PERCENT1 

Percentage value x.x%

UNIT_DATE3TIME 

Calendar YYYY-MM-DD HHMMSS

UNIT_TIMEDHHMM 

Time D HH:MM

UNIT_TIMED0HMM 

Time D 0H:MM (hour always 2 digits

UNIT_DAY2HHMMCOLON 

Time D HH:MM 1d 12:34, 7d 23:59 (day from 1d)

UNIT_MODECOUNT 

this counts unit modes

UNIT_NULL 

special case - must be 255 and last