Hauke,
My apologies if I misunderstand your question. Unlike IA's plugins the bridge cannot help you to discover their names when your plugin is called. That is, IA's plugins let you open a pulldown and, automagically, you can see all the variables that have been defined in the MSIcode. The bridge plugins don't have access to that. Instead, you'd need to create a variable first, let's call it XYZ, and then when your plugin runs in the IDE, you'd open a form and enter the variable name in a text box. You could populate the textbox or an editable pulldown with a list of hard-coded names so your IDE user (you?) could select one from a list. Whichever approach you use you'd still need to create a variable using the
Set Variable statement but your plugin can't discover the names. So, if we have a statement like earlier:
DoSomethingHere (installation) return result in XYZYou'd have to enter
XYZ in a textbox or have a default name "known" in advance and add a
Set Variable XYZ somewhere prior to the plugin's call. Coming back to what I think you're asking, how do you pass a result back to
XYZ?
When your plugin is called during runtime, the bridge passes a comma-separated list of variable name and values. It looks something like this:
ABC,-2,FRED,Hello,XYZ,,DATE,"22nd August", and so on. Split the list by comma to get the name-value pairs. If any variable (look at
DATE) contains spaces, you should/must put the values in double quotes. The name/value pairs look a bit like CSV lines you're probably more familiar with Excel-like files. Your plugin must handle missing variable names. For example, let's say you define variable
XYZ in the plugin but don't create it. The name won't appear in the list of name/value pairs and you can't simply think to yourself let's add
XYZ and its value at the end of the comma-separated list you return. I seem to recall it use to raise a runtime exception-cum-crash in the IDE. Don't quote me on that!
Finally, if you want to replace the value of
DATE with something else make sure you guarantee the integrity of the concatenated string you return. It's not just double-quotes you have to worry about. Enter commas anywhere in the value and you are asking for major league trouble.I know this from experience. It hurts; and the bridge doesn't like it either as it has to martial the names and values to and from IA. Whatever value your plugin returns just avoid commas and double quotes in the value as if they contained bubonic plague.
In short, your plugin can process the list to get a value and do something with it. It can also substitute the existing value with a new value if you need to pass something back. Your plugin can read or write the value for a variable but you need to handle the list with care. Like I say, bridge plugins cannot discover the variable names defined in the IDE.
I'm not sure if that helps or not.