How to create a global Map variable externaly, by using dopusrt, and set values to it

I have been looking how to do it for hours, and can't figure it out...

I have a small console program, which processes information. It is quite complicated, so it's way easier for me to do it in c#, and basically, it's already done. It would be way too hard for me and a waste of time to redo it in vbscript inside dopus.

Anyway, I want to create custom columns using this information. I have managed to actually do it, by using ini files, but it takes way too long on the folders with hundreds or thousands of subfolders/files.

What I would like to do, is use my console application to add a global Map variable into dopus. I'm guessing, by using the global variable and reading the info from it, would make my custom columns script way way faster. Further more - the info does not change often, so reading it from files over and over again would be wasteful...

Basically, I would update the information in the global Map variable once every week or two (when update is needed) by using my console app. In the meantime the custom column script would be able to use the global variable - no need to read the files, etc.

So how do I do all externally, by using dopusrt.exe:

  1. How do I create the global and persistent Map variable?
  2. How do set/add values to it?
  3. How do I delete or clear (when updating) that global Map variable ?

Thanks in advance.

You could write a script which adds a command for updating the map. DOpusRT.exe could then be used to run the command, passing it details (or a filename with the details, if it's more than one line), and the command could update the map.

If the information is quick to calculate then you could also have a script column which calls your C# program for each file and reads the information it returns, while still keeping most of your code where it is.

@Leo thanks for the answer.

I found this topic, which actually shows how to do that, I think. Now just need to get into javascript a little bit. because vbscript is driving me up the wall... :smile: