I creates an addin which runs in XP.In XP I simply load the .Net dll only once.The next time I launched MicroStation the dll gets loadung automatically.
I created a form based on BMW and put some commands on it.If I call - ActiveDesignFile.Close() the addin gets unloaded- OpenDesignFile(...) the addin gets loaded again
Now I moved to Windows7 and the AddIn doesn't get autoloaded anymore.Are there anybody who has a hint to solve this issue?
code:
[Bentley.MicroStation.AddIn(MdlTaskID ="MyName"]internal sealed class Connector : Bentley.MicroStation.AddIn, _ApplicationEvents{ ...
Hi Jon,
thanks for your hints, if I use these methods it works on Windows7. Curiously these methods are not applied on the XP machine and it, but it works ...
Thanks the issue is solved ...
Thomas
twegener said:The next time I launched MicroStation the DLL gets loaded automatically
A pure MDL application is loaded in the following circumstances …
or
In all cases except 1, the application must be written to behave correctly when loaded as either an MS_DGNAPPS or an MS_INITAPPS.
Is a .NET AddIn expected to behave differently?
Regards, Jon Summers LA Solutions
The file that you found is created on the fly to load some legacy processing for applications. I would suggest looking at configuration differences or were there any other changes to the system besides Windows 7? Are the events getting fired off?
HTH,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
oh, I looked at the wrong location, in Windows7 the .ma file is saved in:
C:\Users\User\AppData\Local\Temp\Bentley\MicroStation\8.11\o_Dof88niaENmS1PChQ4Mg\AddInLoader1.0\MyAddIn.ma
But still the dll gets not loaded automatically :-(
I copied the dll to '...\Bentley\MicroStation\mdlapps' and load the dll via the menu,
Utilities -> MDL Applications
in the form I use the "Browse ..." button to load the dll.
It appears in the "Loaded Applications" list (the "Key-ins" button is disabled)
That is the same in XP and Windows7.
In XP it creates automatically a ".ma" file:
"C:\Dokumente und Einstellungen\user\Lokale Einstellungen\Temp\Bentley\MicroStation\8.11\XxVInaNgz5Rpcrf3CtvOww\AddInLoader1.0\PS.Pinpoint.PlugIn.MicrostatV8i.ma"
I can check the ".ma" file in the overridden int AddIn.Run(string[] commandLine) ... method.
The Run method is called in Windows7 too and I can see the ".ma" in the commandLine parameter.
In XP I find the ".ma" on the disc too, but in Windows7 the related directory is not populated with the ".ma" file.
Thanks
How do you load your application?