Does anybody know how to implement the Reload function using C# for Connect Edition, just like the context command below
Sa Li said:using C# for Connect Edition
Please do not ignore this forum best practices!
There are 14 different versions of MicroStation CE available, what version do you use?
What API do you use and prefer? "C#" is simply not enough, because your code can be based on (old) Interop or new NET API.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
MicroStation Connect Edition 10.13.00.48 Update 13
.Net Framework 4.6.2
NET Framework version is not what API (assembly) do you use or prefer.
Sa Li said:Does anybody know how to implement the reference attachment reload function?
I don't see that capability in either the C++ MicroStationAPI or the .NET DgnPlatformNet API. There is Attachment::Reattach in the MstnPlatformNet API. That's not quite as simple as reload, and uses an InterOp.
Attachment::Reattach
The C++ functions mdlRefFile_reattach() and mdlRefFile_reload() remain available. They don't appear to have evolved into the object-oriented world.
mdlRefFile_reattach()
mdlRefFile_reload()
Regards, Jon Summers LA Solutions
Hi Sa Li,
I agree with Jon that it seems there is no such functionality available in API. On the other hand, maybe it's there but "hidden" under another term (something like Cache::Refresh or similar? ;-). Any idea or comment from Robert Hook?
In my opinion you can you use these workarounds:
With regards,
Hi all,
I too agree with the above assessments and cannot find a readily accessible .NET Reload equivalent available. Like most API "extension" needs a wrapper call (like below) to native MDL would be necessary if an available key-in is not desired.
[System.Runtime.InteropServices.DllImport("ustation.dll", EntryPoint = "mdlRefFile_reload")] public static extern int AttachmentReload(IntPtr modelRef, int updateDisplay, int forceReload);
HTH,Bob