ActiveX 4
ActiveX 4
ActiveX
TableName
Syntax: TableName
Description: Returns the name of the Table in the current data selection.
Parameters: None
Returns: The current table name, or “invalid” if the current selection is not valid.
Example: This example opens the mfg_cost.rdb, gets and displays some of the data, then closes the file.
Sub Get_Data()
Dim RDBObj As Object
Dim MyTable As String
RDBObj.SelectData 1, 1, 1, 1, 1, 1
If RDBObj.PositionIsValid = True Then
MyTable = RDBObj.TableName
MsgBox ("Selected Table = " & MyTable)
Else
MsgBox ("Data Selection Invalid")
End If
RDBObj.CloseFile
Set RDBObj = Nothing
End Sub
90 Chapter 5:
TableName
ProModel 91
ActiveX
Appendix:
Table Definitions
Resource Usage Downtimes pmdTblResUsageDT 32 Build > Resources > DTs… > Usage
Resource Work Search pmdTblResWorkSearch 33 Build > Resources > Search… > Work
Resource Park Search pmdTblResParkSearch 34 Build > Resources > Search… > Park
Resource Node Logic pmdTblResNodeLogic 35 Build > Resources > Logic…
Resource Points pmdTblResPoint 36 Build > Resources > Pts…
Shift Assignment Locations pmdTblShiftLocation 38 Build > Shifts > Assign > Locations
Shift Assignment Resources pmdTblShiftResource 39 Build > Shifts > Assign > Resources
Shift Assignment Files pmdTblShiftFile 40 Build > Shifts > Assign > Shift Files
Subroutine Parameters pmdTblSubRtnParam 41 Build > Subroutines > Parameters…
Arrival Cycles Values pmdTblArrivalCycData 42 Build > More Elements > Arrival Cycles > Table…
Table Functions Values pmdTblFunctionData 43 Build > More Elements > Table Functions > Table…
User Distributions Values pmdTblUserDistribData 44 Build > More Elements > User Distributions > Table…
Location Graphics pmdTblLocGraphic 45 Not Visible
Resource Graphics pmdTblResGraphic 46 Not Visible
Entity Graphics pmdTblEntGraphic 47 Not Visible
Background Graphics pmdTblBackGraphic 49 Build > Background Graphics
Model Defaults pmdTblModelDefaults 50 Simulation > Model Parameters
Path Networks Segments pmdTblPathSegment 51 Build > Path Networks > Paths…
Path Networks Interfaces pmdTblPathInterface 52 Build > Path Networks > Interfaces…
Path Networks Mapping pmdTblPathMapping 53 Build > Path Networks > Mapping…
Path Networks Nodes pmdTblPathNode 54 Build > Path Networks > Nodes…
Views pmdTblView 55 View > Views > Define
Scenario Parameters pmdTblScenParam 56 Simulation > Scenarios > (Add/Edit)
Path Networks Mapping Desti- pmdTblPathMapDest 57 Build > Path Networks > Mapping… > Dest.
nations
Work Search Locations pmdTblWorkSearchLoc 58 Build > Resources > Search… > Work > Location List
Park Search Nodes pmdTblParkNode 59 Build > Resources > Search… > Park > Parking Node
List
Variable Graphics pmdTblVarGraphic 60 Build > Variables
Queue / Conveyor Joints pmdTblQJoint 61 Build > Locations > {Right-click on Queue} > Add Joint
Routing Points 62 Build > Processing > {Right-click on Routing} > Add Joint
ProModel 93
ActiveX
3 S pmdFldXfilesPath Build > More Elements > External Files > File Name…
4 S pmdFldXfilesPrompt Build > More Elements > External Files > Prompt
5 S pmdFldXfilesNotes Build > More Elements > External Files > Notes…
Runtime Table.
Table Name Visual Basic Constant Value
Locations pmrTblLocation 1
Single Capacity Locations pmrTblLocSingle 2
Multi Capacity Locations pmrTblLocMulti 3
Resources pmrTblResource 5
Resource States (by Percentage) pmrTblResState 6
Node Entries pmrTblNodeEntry 7
Failed Arrivals pmrTblFailArrival 8
Entity Activity pmrTblEntAct 9
Entity States (by Percentage) pmrTblEntState 10
Variables pmrTblVariable 12
Logs pmrTblLog 13
Location Costing pmrTblLocCost 14
Resource Costing pmrTblResCost 16
Entity Activity Costing pmrTblEntCost 17
Events
Field Constant When does the event fire? Return Values
0 pmeUndefined
1 pmeQuit Just after "Save Current Model?" dialog True = Cancel
Quit
2 pmeSaveBeforeQuit "Save Current Model?" dialog True = Skip Save
dialog
3 pmeSimComplete Simulation Ends Normally True = Skip Stats
dialog
4 pmeSimUserEnd User Selects "Simulation > End Simulation" True = Skip Col-
lect Stats dialog
5 pmeSimPauseOn User Selects "Simulation > Pause Simulation"
6 pmeSimPauseOff User Selects "Simulation > Resume"
7 pmeSimAbEnd Simulation Crashes
8 pmeSimStart Simulation Start (before translation/simulation)
9 pmeTranStart Translation Start (at start of translation for each scenario)
10 pmeTranEnd Translation End (between translation & simulation)
11 pmeEditModeOn Edit Mode Entered (between simulation end and return to
build environment)
12 pmeModLoaded Model Loaded (after successful load)
15 pmeAnimOn Animation On (when animation turned on)
16 pmeAnimOff Animation Off (when animation turned off)
20 pmeMsgInfo
21 pmeMsgOK "GLB Missing" message box, other message box
22 pmeMsgOkCancel
23 pmeMsgRetryCancel
24 pmeMsgYesNo "Couldn't Get Exclusive…" message box
25 pmeMsgYesNoCancel "Save Current Model?" dialog
26 pmeMsgAbortRetryIgnore
30 pmeMsgPrompt
120
Path Colors
Path Colors
Field Constant Name
0 pmdColorBlack Black
128 pmdColorMaroon Maroon
255 pmdColorRed Red
32768 pmdColorDk_Green Dark Green
32896 pmdColorGold Gold
65280 pmdColorLt_Green Light Green
65535 pmdColorYellow Yellow
8388608 pmdColorDk_Blue Dark Blue
8388736 pmdColorPurple Purple
8421376 pmdColorTeal Teal
8421504 pmdColorDk_Gray Dark Gray
12632256 pmdColorLt_Gray Light Gray
16711680 pmdColorMed_Blue Medium Blue
16711935 pmdColorPink Pink
16776960 pmdColorCyan Cyan (Light Blue)
16777215 pmdColorWhite White
ProModel 121
ActiveX
Menu Ids
This method is defined as: MenuCommand<MenuId>,<Parameter>
For most commands, Parameter has no meaning and a zero should be passed. The following is a list of menu IDs that
have no equivalent method in the CProModel interface.
Index
A D
AddBackgroundBitmap 58 DeleteRecord 64
AnimSpeedChange 41
AppendEntitySpot 59
AppendGraphicIcon 60 E
AppendGraphicIconSize 61
AppendRecord 62
AppendRoutingPoint 63 EndReplication 9
Arrays Table 101 EndSimulation 10
Arrival Cycles Table 102 Entities Table 95
values subtable 103 Entity Graphics Table 112
Arrivals Table 99 Entity Spot Graphics Table 112
Attibutes Table 100 External Files Table 103
B F
C G
GetPositionInfo 80 N
GetRealFieldValue 66
GetRecordCount 67
GetSelectedsFromType 68
GetSimTime 12 New 20
GetStatus 13
GetStatValue 52 O
GetStringFieldValue 69
GetValue 81
GetVersion 14
OpenFile 82
OpenModule 21
I
P
InputTextPrompt 42
InsertRecord 70
Path Networks Table 95
interfaces subtable 96
L mapping destinations subtable 96
mappings subtable 96
nodes subtable 96
Library Graphics Table 108 segments subtable 96
ListSelectPrompt 44 PeriodName 83
LoadDefaults 15 PMEventsHandler 39
LoadModel 16 AnimSpeedChange 41
Location Graphics Table 107 InputTextPrompt 42
Locations Table 93 ListSelectPrompt 44
clock downtimes subtable 94 RunError 46
entry downtimes subtable 94 TranslationError 47
setup downtimes subtable 94 UserZoom 48
usage downtimes subtable 94 Populate 71
PositionIsValid 84
Process Table 104
M ProModel Application Object 8
EndReplication 9
EndSimulation 10
GetEventsObject 11
Macros Table 102
GetSimTime 12
MenuCommand 17
GetStatus 13
MergeModel 18
GetVersion 14
Model Defaults Table 113
LoadDefaults 15
Model Parameters Table 105
LoadModel 16
MsgBox 19
PROMODEL Innovate 127
User Guide
MenuCommand 17 GetAnimationState 50
MergeModel 18 GetStatValue 52
MsgBox 19 SetAnimationSpeed 55
New 20 SetAnimationState 54
OpenModule 21 SetStatValue 56
Quit 22 ProModel.CProModelData 57
RedrawLayout 23 ProModel.CRuntime 49
RedrawTables 24
RunScenarios 25
Save 26 Q
SaveAs 27
SetMacro 28
SetMenus 29 Queue/Conveyor Graphics Table 108
SetMessageMode 30 Queue/Conveyor Joints Table 113
SetPan 31 Quit 22
SetView 32
SetViewRect 33
SetWindowPos 34 R
ShowTranslationDlg 35
Simulate 36
Zoom 37 RDBDataServer Object 77
ProModel Data Object 57 CloseFile 78
AddBackgroundBitmap 58 FieldName 79
AppendEntitySpot 59 Get PositionInfo 80
AppendGraphicIcon 60 GetValue 81
AppendGraphicIconSize 61 OpenFile 82
AppendRecord 62 PeriodName 83
AppendRoutingPoint 63 PositionIsValid 84
DeleteRecord 64 RecordName 85
GetIntFieldValue 65 ReplicationNumber 86
GetRealFieldValue 66 ScenarioName 87
GetRecordCount 67 SelectData 88
GetSelectedsFromType 68 TableName 89
GetStringFieldValue 69 RecordName 85
InsertRecord 70 RedrawLayout 23
Populate 71 RedrawTables 24
SelectMainRecordByIndex 72 Region Graphics Table 112
SelectMainRecordByName 73 ReplicationNumber 86
SetIntFieldValue 74 Resource Graphics Table 108
SetRealFieldValue 75 Resources Table 96
SetStringFieldValue 76 clock downtimes subtable 98
ProModel Runtime Object 49 node logic subtable 99
GetAnimationSpeed 51 park nodes subtable 98
128
Save 26
SaveAs 27 U
ScenarioName 87
Scenarios Table 105
parameters subtable 106 User Distributions Table 103
SelectData 88 distributions values subtable 103
SelectMainRecordByIndex 72 UserZoom 48
SelectMainRecordByName 73
SetAnimationSpeed 55
SetAnimationState 54 V
SetIntFieldValue 74
SetMacro 28
SetMenus 29 Variable Graphics Table 113
SetMessageMode 30 Variables Table 101
SetPan 31 Views Table 113
SetRealFieldValue 75
SetStatValue 56
SetStringFieldValue 76 Z
SetView 32
SetViewRect 33
SetWindowPos 34
Zoom 37
Shift Assigment Table 100
location index subtable 100
resource index subtable 100
shift file index subtable 100
ShowTranslationDlg 35
Simulate 36
Simulation Options Table 106
Status Light Graphics Table 111