EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-08 05:34 PM
Is it possible to reference the GeoSCADA .NET Client API (ClearScada.Client.dll) from Excel VBA?
Various Microsoft articles claim you can make .NET dlls visible to COM using Regasm.exe, but I was looking for official confirmation before I tear my hair out trying to figure out if I've registered it wrong or ClearScada.Client.dll is just not built in a way that it will ever work.
If anyone's done it, your steps to registering the DLL so it is properly useable in VBA would be a godsend.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-16 06:40 PM
The COM .References mimics the old ViewX Display References feature (as seen in ClearSCADA 2013 and earlier) in that it is only equivilent to GetReferencesFrom, the To feature only came along with the new ViewX UI in ClearSCADA 2014.
You do have SaveConfigFile and LoadConfigFile on ScxV6Object, I can't ever remember using them but they cannot be treated like an SDE file, but if you only export/import using COM it might be "good enough"
Not heard of RegASM.exe, might give it a go later and see. The .NET API is vastly superior to DBClient, just a shame Excel doesn't support .NET scripting (yet?)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-10 05:41 AM
I don't believe so, not directly anyway. VBA is old COM based environment, so you can use the old COM Server Automation API (that the .NET API replaced). Add a reference to DBClient.dll.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-12 05:31 PM
Cheers Adam - the trouble is the specific functions I'm after are IObjectConfiguration.GetReferencesFrom, IObjectConfiguration.GetReferencesTo and old mate IObjectHierarchy.ExportConfiguration and as far as I can tell, the only place those are programmatically available is via the .NET API. Can't find them (or equivalents) in DBClient.dll other than ScxV6Object.References.
RegASM.exe seems to be a tool that is used to put in an interstitial layer that makes non-explicitly-COM DLLs accessible through COM... but using it on ClearScada.Client.dll results in being able to add a reference to the DLL in Excel VBA but the object browser showing no exposed classes or functions. I was hoping that that was me doing it wrong rather than it just not being possible...
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-16 06:40 PM
The COM .References mimics the old ViewX Display References feature (as seen in ClearSCADA 2013 and earlier) in that it is only equivilent to GetReferencesFrom, the To feature only came along with the new ViewX UI in ClearSCADA 2014.
You do have SaveConfigFile and LoadConfigFile on ScxV6Object, I can't ever remember using them but they cannot be treated like an SDE file, but if you only export/import using COM it might be "good enough"
Not heard of RegASM.exe, might give it a go later and see. The .NET API is vastly superior to DBClient, just a shame Excel doesn't support .NET scripting (yet?)
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.