RSGInc/SOABM

add automatic dll copier

bettinardi opened this issue · 6 comments

It would be ideal if the vdf dll and bmp could be added to the congfig\visum folder. Then at the beginning of the run a script could copy those files over to the appdata folders for all the users with accounts on the computer: C:\Users\tdb205\AppData\Roaming\PTV Vision\PTV Visum 16\UserVDF-DLLs

That way the setup can ensure that when a new user runs the ABM or an old user moves the ABM to a new computer - everything is current and setup correctly.

Related to this, I would like the prep steps for the SWIM external model broken out from the actual SWIM external model. We have had some improvements in the SWIM external model, and I would like to bring them into the ABM. If the setup steps for the SWIM external model were a prep step, then I could easily add this copy step into the R script, and then update the SWIM external model as a stand alone script as it should be, as it is it's own model with it's own update cycle separate from the ABM.

Use Visum.GetPath(60) to find path to the expected custom dll folder. So:

  • Open Visum
  • Get Path to custom dll, save path as string
  • close Visum
  • Copy custom dll from dependencies (or application) folder to path saved above (Visum.GetPath(60))

@joshchea - this is what Visum does.. if the file is loaded manually it pops up a warning dialog. However, when you load files via COM, these warnings do not pop-up… but they do get logged in the IMessage container in Visum. One possible solution could be to add an extra check in the COM script that calls Visum to check for the existence of the file before the version is loaded… In python you can do this by using: os.path.exists('mydirectory/myfile.dll')

addressed via c4d4e72

The RunModel.bat file copies the VisumVDF_ODOTVDFx64.dll DLL and the VisumVDF_ODOTVDFx64.bmp function image from the source directory to the user defined DLL folder in the AppData/Roaming folder of the current Windows session. This is to ensure that the model uses the most updated VDF for each run.

@bettinardi to test this

The dll / bmp copy has been confirmed - closing