We have a number of VBA Projects (and at least one compiled add-on for InRoads) that were tested for Ss10 and some even migrated to ORD CONNECT. Recently, our users reported that these were failing to work as before. The tools perform some of their functions, but others fail. To test my theory that a Windows Update may have broken these tools, I took advantage of the fact that my home PC is still running Windows 7 and therefore has not had any recent Windows updates.
At least one of these tools functions perfectly on my HOME PC, which does not seal the deal, but it does not eliminate it as a strong possibility.
Has anyone seen a similar occurrence on their systems and have any suggestions. Unfortunately, the programmer responsible for this tools creation is not available to assist us in fixing this. As for the compiled tool, our eventual migration Open Roads will eliminate its use, but we are far from there yet. But in a similar situation, we do not have a contract vehicle to get the tool fixed if it requires recompiling and/or code modifications.
Many of our tools have error logging built in, this is what it showed yesterday when I ran it. I suspect the later errors are related to one or more earlier errors where an expected object fails to get created. One issue that I notice that instead of the project name, the first error lists APC.ApcHost.6. I do not understand what that is and why. Notice the rest list the project name - LandXML. There does not appear to be any code using that text - APC.ApcHost.6.
09/09/2021 12:49:48 PM crheault SHAOHDPCE10722 [APC.ApcHost.6]clsSOTable - CreateBubbleLabel ERROR -2147467262: Index not found. The specified index or name does not exist in the collection.09/09/2021 12:49:49 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - CreateBubbleLabel ERROR 430: Class does not support Automation or does not support expected interface
(Note that this last line repeats 21 X. See next paragraph to explain where the 21 times probably comes from.)
09/09/2021 12:49:51 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - FormatTable ERROR 91: Object variable or With block variable not set09/09/2021 12:49:51 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - IPrimitiveCommandEvents_Dynamics ERROR 9: Subscript out of range09/09/2021 12:49:51 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - FormatTable ERROR 91: Object variable or With block variable not set09/09/2021 12:49:53 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - IPrimitiveCommandEvents_Dynamics ERROR 9: Subscript out of range09/09/2021 12:49:53 PM crheault SHAOHDPCE10722 [LandXML]clsSOTable - FormatTable ERROR 91: Object variable or With block variable not set
This is supposed to place bubbles callouts on vertices of a shape and then create a table listing them in order with station, offset and coordinates. There were 21 vertices on the shape - the bubbles fail to get created, as does the table. it does create a list of the text for the table which allows it to be saved as a text file.
I wanted to document everything I could. I worked out the syntax to list vb applications and their reference. I may see what else I can report on but I do plan on trying that approach. It's just there are a lot of modules and classes and forms to export.
We operate mostly in ProjectWise, so the actual mvba's get copied to each local PC and run. So the copy is always up to date. However, the references are always static to the individual PC's. What is on the PC is used. However, there may be other support files automatically supplied that are not part of the references, so its possible one or more of those are the cause of the problem.
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration
HI Chuck,
caddcop said:We operate mostly in ProjectWise, so the actual mvba's get copied to each local PC and run.
Even though it's probably not crucial for the discussed issue, it's important information.
caddcop said:However, there may be other support files automatically supplied that are not part of the references, so its possible one or more of those are the cause of the problem.
That's always a possibility ;-) but I don't think so.
In MicroStation VBA, everything except mvba file itself has to be installed (VBA engine) and registered in Windows (referenced dll, ocx... libraries) and cannot be simply copied.
caddcop said:I continue to hope someone has determined a fix that they applied and share that information.
I do not think it's possible without detail analysis of affected PCs.
APCHost message points to MicroStation + VBA installation, not mvba file. Did you try to reinstall (or repair) MicroStation installation? Or to try to use /regserver?
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi caddcop,
As I was working on another issue, I see I accidently provided you an incorrect recommendation to debug using: VBEProjectsList (lists all modules in a project) that should have been VBEProjectReferences (lists all MVBA projects and respective References).HTH,Bob
Jan Šlegr said:Much bigger problem (and often it's what requires 99% of time) is to understand dirty old spaghetti VBA code, written by non-programmers, to ensure new code will offer the same functionality
Because of MicroStation's history, a worst-case situation exists. Imagine when some code exists as user command macros (UCMs) and some as BASIC or VBA, and the macro calls the UCM using a key-in command. UCMs are write-only code, don't work in CONNECT and reverse-engineering is difficult or impossible.
Jan Šlegr said:To ensure new code will offer the same functionality .... and the code itself is often the only source of information, because no formal documentation exists
A common problem is that, as in caddcop's case, the code has evolved over decades, the original developer has left the organization and nobody thought to document the functionality of the app. while he was still around.
Regards, Jon Summers LA Solutions