Citect Scada 2018 SA Project - ActiveX Properties not set

Hi,

I use GigaSoft ActiveX v9, where I use VBA script to set properties for the active-x.

It do seems that I have some timing issue as sometimes the script is able to set all properties correct and next time is not. This is all random how many times I have to trigger the script to get all properties set correctly. 

Any idea what is going on? 

I've used Gigasoft Axtive-X on other systems and never had these kind of problems before. 

Thanks For any input,

Rune

Parents
  • If you've placed the ActiveX object on a graphics page using the Graphics Builder, then use the On Page Shown event in the page properties to call your code. This event isn't called until all the ActiveX objects on the page have been created (instantiated). If you're creating the object from code, you may need to keep trying to read a property of the object until you get a good value back to know when the object has finished instantiating. I've had this problem with the Process Analyst object, where even after it has finished loading, it still takes some time to communicate with the trend server before it is responsive, and there seems to be no way to be sure it is ready other than to keep trying to read a property, or just pause (Sleep()) for an arbitrary amount of time, which is less reliable.
Reply
  • If you've placed the ActiveX object on a graphics page using the Graphics Builder, then use the On Page Shown event in the page properties to call your code. This event isn't called until all the ActiveX objects on the page have been created (instantiated). If you're creating the object from code, you may need to keep trying to read a property of the object until you get a good value back to know when the object has finished instantiating. I've had this problem with the Process Analyst object, where even after it has finished loading, it still takes some time to communicate with the trend server before it is responsive, and there seems to be no way to be sure it is ready other than to keep trying to read a property, or just pause (Sleep()) for an arbitrary amount of time, which is less reliable.
Children
No Data