Hello,
In my external application I call vba load to load in a vba project from a temporary location, this location is not in the searchpaths or any other config variable. In pre-Connect versions this is not an issue, but with Connect Update 14 this is just reporting as Project not found. You can manually load that project without any issues.
Hi Viktor,
please, follow the best practices, and use recommended subject format (which is [<product> <version> <language>] <topic>), which ensures it will be clear what version and API do you use. As you can see, the most of this forum members use this practice and it simplify the forum navigation substantially.
Viktor_Kulik said:In my external application I call vba load to load in a vba project from a temporary location
Why do you not share used key-in? It's hard to guess what can be wrong when it's not clear what worked in V8i and does not work now.
Viktor_Kulik said:but with Connect Update 14 this is just reporting as Project not found.
Both (old) vba load and (new) macro vba load key-ins work fine, even when mvba file is in "some general" folder.
vba load
macro vba load
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
What version (e.g. v10.x.y.z) of MicroStation are you using?
Viktor_Kulik said:In my external application I call vba load to load
What do you mean by 'external application'? A Windows executable?
How do you call MicroStation VBA?
Regards, Jon Summers LA Solutions
Hi Jan, and thanks for replying. I do appreciate you attempting to make some sort of structure for the forum/discussion, but I can assure you that having rigid guidelines for subjects will not provide much benefit to a searching/indexing that isn't that good to begin with. I've spent plenty of time on forums for various platforms and although this one is most enforced, its also one that's most lacking in results. The point of the forum is to provide answers, and the next guy will ask the question in the most natural way, not by following a protocol.
Anyway, I don't mean to come off as rude or unthankful, I just don't like enforcement for the sake of enforcements.
Back to my question, I did share the key in, its simply that, vba load c:\wc\something.mvba. There's not much to it, c:\wc can be in any location on my computer, but not within the workspace.
And yes, I understand that the key-ins may work the same, but maybe there are enforcements in the way that it allows the projects to be loaded. For example, maybe I need to relax some config variable now? I have both, v8i SS10 and Update 14 Connect installed, one works fine, the project loads and executes and the other does not.
Viktor_Kulik said:vba load c:\wc\something.mvba
If you add that path to the VBA project configuration variable (MS_VBASEARCHDIRECTORIES) in CONNECT, does it load successfully? I'm not suggesting that as a permanent solution, but to verify that the project will load under normal circumstances.
MS_VBASEARCHDIRECTORIES
Jon, as mentioned its Update 14, do you need any more specific info? The external app uses the COM api, GetObject, to connect to Microstation. But, I tested this without the external app, just by pasting the "vba load c:\wc\batch plot\plot.mvba" and it also did not work.
I did find the issue just now though, it does appear that in v8i, the quotes around paths that have spaces were not required, it just loaded, but in Connect it attempts to load the project up to the space in path. Adding quotes did fix it. Which is probably a good practice to begin with, but it is different behavior nevertheless.
It does load if it is found, that was the same train of thought i was following and realized that the issue is with the space in the path.
Viktor_Kulik said: that was the same train of thought i was following and realized that the issue is with the space in the path
Does it load succesfully if you write something like vba load "X:\path with space\project.mvba"?
vba load "X:\path with space\project.mvba"
yep, having quotes does fix it. Its interesting to me that in v8i its able to load without quotes.
Hi Viktor_Kulik,
Can you provide the exact error number and message (or screen capture showing full details)?
Although I am not checking in MicroStation V8i (only CONNECT), I can execute a key-in to a load VBA macro not defined with MS_VBASEARCHDIRECTORIES and it loads/unloads just fine in the Microsoft VBA Editor. NOTE: Doing so will not show as loaded in the MicroStation VBA Project Manager, but loads and shows fine in the Microsoft VBA Editor Project Manager.e.g. vba load "d:\Temp2\Find Me\Find Me.mvba"
FWIW. Unless otherwise specified in application/API documentation - Quotes should always be used when providing folder and/or file names containing spaces.
HTH,Bob