HI, Experts,
I have sub-folder in C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation\mdlapps, and a DLL in this sub-folder.
That means the DLL is
C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation\mdlapps\<subfolder>\<library>.dll
The "C:\…\mdlapps" is in MS_MDL or MS_MDLAPPS variable. The <library>.dll is in MS_DGNAPPS without including the path.
I found that MicroStation can load this DLL file when it starts.
Does this mean that the search path will cover the subfolders? Is there any documentation for this? The observation doesn't seem intuitive to me, so posting this question to confirm.
Thank you!
Sui
Hi Sui,
it seems to me you asked for the same (or at least very similar) thing already and it was answered.
Sui Huang said:The observation doesn't seem intuitive to me, so posting this question to confirm.
I think it's perfectly intuitive, but with so long experience, I am not probably right person to evaluate this :-)
But at least, it's perfectly logic and well documented.
Sui Huang said:Is there any documentation for this?
Yes, in MicroStation V8i, see (and study, because it's crucial knowledge):
Sui Huang said:Does this mean that the search path will cover the subfolders?
No! See how configuration variables are defined and what is their functionality. Typically (maybe all?) variables contains path (folder(s)), define the particular folder, but not subfolders. But of course it depends on variable, its functionality and how its used by MicroStation.
Sui Huang said:That means the DLL is
I see two problems here:
Sui Huang said:I found that MicroStation can load this DLL file when it starts.
It seems the functionality of mentioned variables is still not clear enough (or maybe it's not precise enough formulation?):
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Answer Verified By: Sui Huang
Hi Jan, thank you for your detailed explanation.
If possible I would avoid adding sub-folders in MicroStation system path as you suggested, such that I wouldn't be in an edge situation. However, I am trying to learn an existing system, and trying to get more understanding before making any change. The described observations are from part of the system.
This question is different from my previously asked question, because in this question I am trying to find out whether the search would be performed in sub-folder.
Your answer told me two essential points:
1. sub-folder is typically not covered for search paths
2. .NET DLL's search paths is defined by other variable other than MS_MDL
That means my guess to explain the situation was wrong. May I ask this follow up question: which variable is for the search path of .NET DLL files?
This may help me to explain the observation, but I couldn't find that variable name from the primary search path list.
Sui Huang said:However, I am trying to learn an existing syste
As I recommended, study the chapters about workspace system at first. It's absolute mandatory knowledge for MicroStation-based products administration and also for decision how 3rd party applications should be deployed.
To understand a functionality of configuration variables is parallel task, but can be achieved easier with the knowledge how workspaces are created, structured and processed when MicroStation starts.
Sui Huang said:1. sub-folder is typically not covered for search paths
It's alwyas "per variable" feature. So you have to consult documentation what a particular variable does and how it should be used. Some variables contains numbers, some words, some one folder, some one complete path, some can contain a list of folders.
But until it's stated explicitly, no variable is evaluated recursively.
Sui Huang said:May I ask this follow up question: which variable is for the search path of .NET DLL files?
New question, so you should ask in the new post ... or to search MicroStation help or this forum, because it has been discussed many times ;-) But anyway:
Sui Huang said:but I couldn't find that variable name from the primary search path list.
Both variables are described in Primary Search Path Configuration Variables chapter I mentioned above.
Hi Jan,
Thank you for your follow up.
I did read through the Workspaces documentation to understand how the configuration of workspace work before posting the question...
The description of MS_MDL in documentation is: "Search path(s) for MDL applications or external programs loaded by MDL applications."
It doesn't mention whether it is recursive or not. Normal if it doesn't mention, I would assume it is not... but as an attempt to explain the observation, I posted this question.
For MS_ADDINPATH and MS_ADDIN_DEPENDENCYPATH, I did see them in documentation and see them pointing to the same location in the system I worked on. However the DLL still loaded after I temporarily delete all DLLs from that location. That's why I assumed there was some other variable and post the question ...
Next time I will separate the questions to different posts.
What was going on is still a little bit of a mystery for me, but at least from you I make sure I generally have some right understanding of how MicroStation works. I will try to figure out from the system later.
Sui Huang said:Normal if it doesn't mention, I would assume it is not...
Exactly ;-)
MicroStation documentation (especially V8i, which has long history) is quite engineering, so what is not written, does not exist.
Sui Huang said:However the DLL still loaded after I temporarily delete all DLLs from that location.
I am not sure whether I understand the described situation correctly. Native apps and managed ones behave slightly different:
Sui Huang said:What was going on is still a little bit of a mystery for me
Well, it's not surprise, because MicroStation is like own OS with workflows based on very long history (imagine tens of years existence, support of many different operating systems including binary compatibility, own language and compiler etc.), so even when now MicroStation is "Windows only", concepts and technologies have remain unchanged ;-)