# 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:** 2

<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 17, 2023, 9:23pm UTC](https://forum.inductiveautomation.com/t/refreshing-project-library-script-or-creating-bindings-with-gateway-script-values/76487/2 "2023-07-17T21:23:32Z")

</div>

~~No, the top level of a project library script is executed once and only once (pseudo-auto-imported) upon the first reference to it after a save.~~ However, you can create a top level dictionary that you can write into later. (Or lists, or other python collection objects.)

That said, **why** are you doing this? Please explain your application requirements in more detail.

Edit: Turns out there's a long-standing bug in project library auto-import:

> [@Project Library Script Initialization Races](https://forum.inductiveautomation.com/t/project-library-script-initialization-races/98636):
>
> Are you annoyed by pseudo-random breakage in Ignition project library scripting? Odd top-level constants being garbled, or operations in the top level that have side effects running twice? Or more? Not happening much, but always around project edits, and sometimes even on gateway restart? Yeah, me too. frowning_face Poking around under the hood back in the spring, for a module development task, I ran across some problematic IA bytecode and pinged some people. But it went nowhere, as I co…

---

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