| Custom Agent Designer |
|
|
|
I have recently applied a new Adroit update (or upgraded to a new version) and now my Custom agents don’t work, how can I fix this?
Answer: You need to republish these Custom agents, since the Custom agent has been updated, do the following to do this: 1. Simply launch your Adroit Custom Agent Designer: Click the Start Menu, Programs, Adroit 6.0 folder, the Utilities sub folder and select the Custom Agent Designer. You will be prompted if a newer version of the custom agent (t_custom.dll) is found in the Adroit folder to copy this file to the Custom Agents folder. 2. Stop the Agent Server, Adroit UI and any other Adroit components. 3. Select each custom agent and click the Publish button. 4. This will copy the necessary custom agent files (.CSV, .DLL and .VBS if you are using scripting) into the Adroit installation folder on this computer, typically C;\Adroit. 5. Restart your Agent Server, Adroit UI and any other Adroit components. Note: If there are any remote Adroit installations that connect to this Agent Server, these derived custom agent files must also be MANUALLY copied to their Adroit system directories as well. This will ALSO require you to stop the Adroit components (such as the Adroit UI) running on these computers first. 2. How can I configure Custom agent slots to retain their values after an Agent Server restart? Answer: When designing the Custom agent, you can make certain slots saveable by specifying a unique WGP prefix for them (normally 3-4 characters) in the WGP Prefix field. Then ensure that before the Agent Server is stopped that the WGP file is saved to save the current values of these saveable slots. (This can be done by checking the “Save WGP file on exit” setting in the Advanced Agent Server Configuration dialog (Launch the Adroit configuration Setup utility (psexe.exe) and click the Advanced… button of the Agent Server tab). 3. Why does the Gettag() function fail in my Custom agent? Answer: The custom.Gettag() function fails in a Custom agent if called from anyplace within the OnCompiled() or OnChanged(), on the tag's own slots. The function works fine on other tags, and when used inside the OnBackGround() function. This only presents problems when trying to access "built-in" slots of the agent which exist for all agents, such as the 'agentDescription', the tag name is available using custom.AgentName(). Custom.Getslot() is un-affected in every case. It is possible to do "first-time" initialization of a global variable in OnBackground(), which is called every second, in order to allow code in a "protected" function to get access to such a slot "blocked" from using the Gettag() function. But using a global variable means that the system cannot modify the slot later at runtime or else this "global" copy of the slot contents will be incorrect. PLEASE NOTE: Executing a lot of code in the OnBackground() function is not recommended and will lead to high system CPU load and memory pressure. 4. Why do my custom agents no longer work in Adroit 6? Answer: Adroit 5.0 users upgrading to Adroit 6.0 will need to re-publish any Custom agents they have. This is simply done by copying the Custom agent .CSV and .VBS from the Adroit 5.0 CustomAgent sub-folder to the Adroit 6.0 CustomAgent sub-folder, and thereafter loading and publishing each Custom agent. |





