# Refreshing Project Library Script or creating bindings with gateway script values

**URL:** <https://forum.inductiveautomation.com/t/refreshing-project-library-script-or-creating-bindings-with-gateway-script-values/76487>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 17, 2023, 7:55pm UTC](https://forum.inductiveautomation.com/t/refreshing-project-library-script-or-creating-bindings-with-gateway-script-values/76487 "2023-07-17T19:55:21Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 18, 2023, 1:23pm UTC](https://forum.inductiveautomation.com/t/refreshing-project-library-script-or-creating-bindings-with-gateway-script-values/76487/6 "2023-07-18T13:23:23Z")

</div>

An expression binding can dereference entries in a document tag much faster and more efficiently that jython can. `runScript()` and friends have substantial startup overhead. If `MiRData.robots` is composed of python-standard lists and/or dictionaries, it is directly assignable to a document tag.

You might find this topic useful:

> [@Automation Professionals' Integration Toolkit Module](https://forum.inductiveautomation.com/t/automation-professionals-simulation-aids-v2/74934):
>
> Automation Professionals is pleased to announce the immediately availability of a major upgrade to its free Simulation Aids Integration Toolkit module. The new feature justifying the "major upgrade" language is the implementation of eleven thirty-one new expression functions which use iteration to accomplish complex transforms of datasets and lists, to or from other datasets and lists, applying filtering, ordering, and computed new columns along the way. While there are certain operations that…

Among other things, it's `objectScript()` expression function includes a shortcircuit for referencing project library top-level objects without actually launching a jython interpreter. That is, instead of:

```auto
runScript("MiRData.getrobot",5000,{path.to.index},{path.to.key})

```

You could use:

```auto
objectScript("MiRData.robots")[{path.to.index}][{path.to.key}]

```

But this is probably best:

```auto
{path/to/MiRData/robotsDocumentTag}[{path.to.index}][{path.to.key}]

```

Note the use of an expression binding's `[]` operator for list or map dereferencing.

(You can wrap these expressions with `timeMe()` to compare performance.)

---

_[View the full topic](https://forum.inductiveautomation.com/t/refreshing-project-library-script-or-creating-bindings-with-gateway-script-values/76487)._
