# Print outside of the script console

**URL:** <https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [December 14, 2023, 4:50pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149 "2023-12-14T16:50:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Basel\_Hassan](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Basel\_Hassan](https://forum.inductiveautomation.com/u/Basel_Hassan)\
**Post date:** [December 14, 2023, 4:50pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/1 "2023-12-14T16:50:13Z")

</div>

Hello, I started working with ignition about a month and a half ago.

I'm trying to find out how a existing script is working. I'm working with a project where I don't want to make any changes as saving anything in the script directly affects the production environment.

I was wondering what the best practice would be here. Should I create a duplicate of the perspective component in designer, and then use system.util.getLogger()? Is there other ways of finding out data? The script I'm dealing with is tied to a chart's data property and uses property binding and a transform. I can't copy and paste this script into the script console as it is using values from the arguments passed into the transform function, and I don't know what those values look like, hence why I want to print.

---

<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:** [December 14, 2023, 4:53pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/2 "2023-12-14T16:53:00Z")

</div>

Sounds like you need to stand up a development environment (isolated) and dump the gateway backup into it. You are otherwise playing with fire.

(You can run a dev environment two hours at a time, indefinitely, without a license. There's no excuse for experimenting in production.)

Do make sure the isolated dev environment cannot physically reach the production database and devices.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [December 14, 2023, 4:57pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/3 "2023-12-14T16:57:06Z")

</div>

> [@Basel\_Hassan](#):
>
> I don't know what those values look like

Check what properties the bindings point to, and then go see what they look like.  
If they don't have a value because you're in the designer, check their bindings to see where they get their data. Follow that trail until you have enough information to mock up data.

But as Phil said: Run a test/dev environment.

---

<div class="post-metadata">

**Author:** ![Basel\_Hassan](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Basel\_Hassan](https://forum.inductiveautomation.com/u/Basel_Hassan)\
**Post date:** [December 14, 2023, 5:08pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/4 "2023-12-14T17:08:15Z")

</div>

This is what I'm worried about: if I dump the gateway backup and export the project from designer into another instance, I won't have access to the data for the script anyway. No mock data has been created for this at all, so I still won't have access to any data to investigate how a script works. This specific script references arguments passed into the transform function and runs system.db.runNamedQuery.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [December 14, 2023, 5:10pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/5 "2023-12-14T17:10:29Z")

</div>

A proper dev environment has access to replicated databases

---

<div class="post-metadata">

**Author:** ![Basel\_Hassan](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Basel\_Hassan](https://forum.inductiveautomation.com/u/Basel_Hassan)\
**Post date:** [December 14, 2023, 5:11pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/6 "2023-12-14T17:11:10Z")

</div>

I will try this until the script console works, I see now that the value property in the transform binding is referencing this 'data' prop that has an array. I do want to try creating a proper dev environment.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [December 14, 2023, 5:12pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/7 "2023-12-14T17:12:03Z")

</div>

> [@Basel\_Hassan](#):
>
> This specific script references arguments passed into the transform function and runs system.db.runNamedQuery.

Then follow the bindings until you get something that you can feed into a script console replication of the transform script

---

<div class="post-metadata">

**Author:** ![Basel\_Hassan](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Basel\_Hassan](https://forum.inductiveautomation.com/u/Basel_Hassan)\
**Post date:** [December 14, 2023, 5:15pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/8 "2023-12-14T17:15:40Z")

</div>

I'm not sure how to start that process. It is something I will look into, thanks for pointing that out.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [December 14, 2023, 5:22pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/9 "2023-12-14T17:22:08Z")

</div>

> [@Best Practive Integrator Dev Environment](https://forum.inductiveautomation.com/t/best-practive-integrator-dev-environment/27470):
>
> I lead a group of engineers in a medium size integration company, working on multiple different ignition projects at once, for different customers, in different environments, on different versions. Currently for local development we have been spinning up a windows VM for each different gateway our end projects have, and developing off of those. Utilizing locally created memory tag versions of UDTs, and a central SQL Server instance. As you can imagine that starts to really add up, when you have…

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [December 14, 2023, 5:22pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/10 "2023-12-14T17:22:33Z")

</div>

> [@Ignition Production Environment](https://forum.inductiveautomation.com/t/ignition-production-environment/83126):
>
> Hello everyone, I have been working with Ignition (perspective) for a while and it now time to move my projects to a production environment. This will be the first time I am interacting with this environment and would greatly appreciate guidance of steps for moving a design to production. The process of pushing an Ignition project to production Detailed guidance would be greatly appreciated as this is my first time trying it out.

---

<div class="post-metadata">

**Author:** ![Basel\_Hassan](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Basel\_Hassan](https://forum.inductiveautomation.com/u/Basel_Hassan)\
**Post date:** [December 15, 2023, 3:08pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/11 "2023-12-15T15:08:15Z")

</div>

So I'm waiting for approval to duplicate our databases.

In the meantime, is it realistic to create a backup gateway, upload it to ignition maker edition, automatically have all the same opc ua and plc connections, and connect it to the current database, but only have read access for the database, that way I can't mess anything up? I won't have a full dev environment, but I think it might be a good crutch for now.

Sorry to reply on a thread with a solution, but I wanted to reference this context. Should I create a new thread next time?

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [December 15, 2023, 3:13pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/12 "2023-12-15T15:13:46Z")

</div>

I suggest you read carefully the EULA of ignition maker.

> "Ignition Maker Edition is a free-license edition that can be strictly used for **non-commercial** and personal educational use."

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [December 15, 2023, 3:16pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/13 "2023-12-15T15:16:39Z")

</div>

> [@Basel\_Hassan](#):
>
> upload it to ignition maker edition

In addition to it being for non-commercial use, it also has limitations as to what it can do, it is not an acceptable replacement for a full blown gateway.

If the cost is a concern, install an unlicensed gateway and just use the trial mode for testing purposes, it's completely free.

---

<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:** [December 15, 2023, 3:33pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/14 "2023-12-15T15:33:49Z")

</div>

> [@Basel\_Hassan](#):
>
> automatically have all the same opc ua and plc connections, and connect it to the current database, but only have read access for the database, that way I can't mess anything up?

Nope, not with any edition of Ignition. You need proper isolation, full stop.

And really, just use trial mode of the standard edition for testing and development. I have dozens of VMs that I spin up on demand, matching various client systems. All unlicensed. The two-hour trial can be reset as often as needed, and doesn't kick you out of the designer or anything drastic like that.

---

<div class="post-metadata">

**Author:** ![Basel\_Hassan](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Basel\_Hassan](https://forum.inductiveautomation.com/u/Basel_Hassan)\
**Post date:** [December 15, 2023, 3:45pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/15 "2023-12-15T15:45:33Z")

</div>

Ok, thanks for the clarifcation there everyone on maker edition. Barring that, does the rest of the idea work?

---

<div class="post-metadata">

**Author:** ![Basel\_Hassan](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Basel\_Hassan](https://forum.inductiveautomation.com/u/Basel_Hassan)\
**Post date:** [December 15, 2023, 3:48pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/16 "2023-12-15T15:48:40Z")

</div>

When you create those extra environments, do you create a replicate database for each, or just connect them with current databases with read access only? this is my main question

---

<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:** [December 15, 2023, 4:14pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/17 "2023-12-15T16:14:29Z")

</div>

> [@Basel\_Hassan](#):
>
> do you create a replicate database for each

Yes, when the functionality I'm working on needs the DB. Otherwise I leave the connection broken. Same with device connections. (I have a hardware lab with a variety of PLC hardware, and I can emulate large numbers of Logix and Modbus-based PLCs with my third-party modules.)

I insist that my dev environments be able to take a gateway backup from a client system and it "just work" in my isolated environment. That way, anything I export from dev/test to deliver to production doesn't require any further preparation.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 15, 2023, 4:18pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/18 "2023-12-15T16:18:43Z")

</div>

> [@pturmel](#):
>
> I have a hardware lab with a variety of PLC hardware

Let's have a photo, Phil, and try and show some of the candles for your late-night coding.

---

<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:** [December 15, 2023, 4:20pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/19 "2023-12-15T16:20:21Z")

</div>

It's a mess. I have plans to get it all wall-mounted in the near future, in my copious free time. I'll post a photo then. (:

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 15, 2023, 4:21pm UTC](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149/20 "2023-12-15T16:21:17Z")

</div>

> [@pturmel](#):
>
> It's a mess.

Exactly! We want to know that you're just like the rest of us!

[Next page](https://forum.inductiveautomation.com/t/print-outside-of-the-script-console/83149.md?page=2)
