
Originally Posted by
guino
If you haven't done that yet, you should be able to export the class into a .tlb file using "regasm /codebase /tlb P2140API.dll" then load it up to use it with the extension plugin sources.. or you could simply edit their demo in C# and have it send commands to RR regularly to set variables with the desired values -- just suggestions of course.
ok, i've got the P2140API.dll exported to P2140API.tlb...
I've looked through the example plugin, and it looks like for all my labels, I would use this code:
Code:
'*****************************************************************
'* This Function will be called with a requested label code and
'* format specified at the skin file. Simply return any text to
'* be displayed for the specified format.
'*****************************************************************
Public Function ReturnLabel(ByRef LBL As String, ByRef FMT As String) As String
Select Case LCase(LBL)
Case "mylabel"
'This example returns a "hello" text to show it works
ReturnLabel = "Hello from Extension!"
'Specify whatever and whichever labels you wish to create
'You can add as many as you'd like, and you can process complex labels as long
'as you parse them yourself (i.e. "mycomplexlabel;parameter")
'Case "mycommand2"
'Insert Command code here
End Select
End Function
So first I have to reference the codes from the API, then send those codes as a label to RR with returnlabel right? How do I reference the API in the code?
so if I want to turn Batt_V (from P2140API) into psuBATT_V (in RR) the code might look something like this:
Code:
Public Function ReturnLabel(ByRef LBL As String, ByRef FMT As String) As String
Select Case LCase(LBL)
Case "psuBATT_V"
ReturnLabel = $Batt_V
End Select
End Function
As long as I create the $Batt_V variable from the Batt_V command right?
Or, am I way off base?
Bookmarks