I’d like to do something where every project knows its own name, but with transformations in place. I have found system.project.getProjectName() but a) it is a function not a property and b) it is not exactly what I need because I need a subset of the project name.
Is there a way to add a custom Vision project property, or something like it? I can’t use startup client events because they dont run in the designer, which means everything would always be broken in the designer. Nothing in the project properties menu for 8.1.41 looks like it solves what I need.
I just need a place to put a custom string that this project permanently knows so that I can reference it in implicit tag pathing. All the solutions I have so far involve tags which means that it is not project-scoped. I’ve considered something like a custom property in the navigation bar but I don’t think that is the right way to do it.
One problem with this (which makes sense) is that I can not get Gateway tags to reference it. Do you ever engage with that kind of issue? I am thinking I can put a startup script that forces a synchronization, but I don’t love the solution.
A script library with declared global dictionaries for each project at the top of it?
Or dataset tags in a root folder of the default tag provider.
Those are the paths I would take if I needed to reference it from the gateway scope.
You could then even have the client tags as expression tags and pull the variables from the script project or the default tag provider based off of project name.
Gateway tags do not ever live in a project, and cannot access anything other than the gateway scripting project. So how would you expect something like that to work, anyways?
Use Vision Client Tags in Vision, and Session Properties in Perspective. Full stop.
I don’t expect it to work, thats why I am looking for alternative solutions. The problem that I have is that my tags are all gateway scoped but need implicit steering that is a function of the project name, which is of course project scoped. I need the project and the gateway to get along in this regard, so I am looking for the best way to get them to do that. As much work is done as possible in the gateway instead of the client, but they still need to talk to each other.
I need the client indirect tags to be aware of their own project name (e.g. project_id = system.project.getProjectName().split(“_”)[0].lower(), or something) so that they can set the path for the gateway tags that they need access to. [PROVIDER]{project_id}/… is the pattern that I use. I need a place to put {project_id} that the project is aware of, so that it can reference the gateway tag paths.
My current solution (which is not a true solution) is to have a tag inside [PROVIDER]{project_id}/active_project with the value of {project_id}. You might be able to see the problem with this solution, and it is what I am trying to resolve.