invokeLater function problem in script Library

Hi,
Can we use invokeLater function in project.scripts Library?

Because when i was trying to write values to certain tags, But it was not writing.

Thanks

You might need to use a full context write, try including the tag provider in the tag path

1 Like

include the code to be able to meaningfully understand the problem

invokeLater is a UI related function and only exists in the client. You can use it in script libraries but the function will only work if the invocation originates from the client/designer scope.

1 Like

FWIW, I implemented an emulation of invokeLater for gateway scope in my later.py helper script, mentioned here:

and here:

Note that it uses officially unsupported methods to obtain the appropriate context.

The official method of obtaining delays in gateway scope (per IA support) is to use a sleep in an asynchronous thread. That's just ugly. Almost unforgivable. /:

1 Like

If you are trying to use it for gateway, then use invokeAsynchronous

1 Like

Thanks every One for your suggestions :blush:, They were really helpful for resolving my problem that i was facing.