LESSON

File Association and Deep Links

Description

Learn how to use Operating System file association and deep links to launch Ignition projects.

Video recorded using: Ignition 8.3

Transcript

(open in window)

[00:00] In this lesson, we'll take a look at launching Ignition projects with File Association and Deep Links. Launching projects this way doesn't require you to open the launcher beforehand. Launcher installation is still required, but you no longer need to open one and save an application in order to launch a project. File Association ties in your OS's file extension registration and allows a simple JSON file to contain all the required information needed for launching Ignition projects. You can create this JSON file anywhere, and once it's opened, the OS knows to use the proper launcher. The file extensions registered as associations are ".perspective" for Perspective Workstation, ".vision" for Vision Client Launcher, and ".designer" for the Designer Launcher. I've already created a ".perspective" shortcut that'll show you in a text editor here. You'll see the JSON that makes up the configuration that's passed to the launcher. It'll contain information like the project, the gateway address, the launch mode, and more. These files are nice because they're OS agnostic, easy to create and customize, and they're portable.

[01:08] These can be distributed to any machine, including panel PCs, and the user doesn't need to know about the launcher itself or know how to add a project to the launcher. They can just double click the shortcut, assuming it has the proper file extension. On top of file association support, deep links are also supported. Each launcher has been registered as the target for a particular scheme like "perspective://". With this, projects can be opened with just a URL. You can then use deep links with command line launching. I'll open up a command prompt, and then in Windows, I can just type "start" and provide a deep link URL. I'll need to provide my gateway address or host name and the port, and then the name of the project I want to launch. These commands can then be placed in old style desktop shortcuts or web links to replicate the experience of something like a jnlp shortcut. Deep link syntax also supports passing query args. I can start adding query args by adding a question mark after the project name, and then providing the right key with a value.

[02:05] As an example, deep links use HTTPS by default, but I can provide a query arg to override this. To do this, I'll add "insecure=true", and this will allow me to use HTTP instead. I'm just gonna do this for the sake of demonstration, so I'd recommend using HTTPS on your end to be more secure. I'll go ahead and enter this command to launch my project in Perspective Workstation. In my project, I have some more examples of deep links with various query args. The first one is the command I just used, but I can build upon this command to do even more. For example, I can launch the project on a specific display and a specific page. This command will open the same project on my second display, and on the page called another page, I'll select it, and then I have a button that uses the Pperspective navigate action with that URL to launch the link. If I show you my second display, you'll see the project open up on a different page. Beyond this, you can also pass parameters to the pages you open.

[03:06] This next example will pass the value, a nice parameter, and when the page opens, you'll see my label that detects when a parameter is passed and displays the value. You can also specify launch modes in the links. The next example launches the project, but in kiosk mode. This can be really useful if you're launching the project on something like a panel pc, again, without needing to open the launcher first. So far, the examples have been for Perspective, but deep links will work for any Ignition launcher. This example will use the Vision Client Launcher. If I follow the link, it'll open my main Vision window for this project, but I could point it to a separate Vision project if these resources were separated from each other. This opens up the possibility for easy retargeting between Vision and Perspective projects. Finally, the last example here, will open up the Designer. So again, all launchers are supported for deep links. With file association and deep links, you can easily configure the deployment of your projects across a wide variety of machines that may have different launching requirements.

[04:09] To see more information, check out our page in the user manual, which I'll include a link to in the resources below the video.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.