Run runScript from a expresion tag

Hello.

I am trying to run a script placed on project script library using expressionrunScript()

i create a new expression tag and insert this code into the expresion:

runScript(project.lib.retorna1(),1000)

But the Tag fault with “Evaluation Error”

I do not know what i am doind bad.

The function only returns a 1.0 like this:

def retorna1():
	return(float(1.0))

Can anyone help me?

you need quotes around your script path

runScript("project.lib.retorna1()",1000)

Hello, thanks for the help.

I have no luck with this, maybe the Gateway hates me or do not know :frowning:

[attachment=3]Picture 2016-12-22 09_27_02.png[/attachment]
[attachment=2]Picture 2016-12-22 09_27_10.png[/attachment]
[attachment=1]Picture 2016-12-22 09_30_21.png[/attachment]
[attachment=0]Picture 2016-12-22 09_30_59.png[/attachment]

I really do not know what i am doing incorrectly.

Do you see something??

Hello.

Ok, it works, but you need to write your scripts in global shared library, not on project library.

Someone must edit the documentation and add this little detail…

Talking about tags, in project windows work correctly.

Called project scripts will not work from expression tags because tags are Gateway-scoped, meaning they don’t have access to project-scoped resources.