I am currently designing a motor pop-up and am passing in my motor UDT. I have used a property binding on a label to display the documentation of the tag from metadata using the tagpath, however I would like my label to wrap the text if the description is too long. I’m struggling to find a way to do this if anyone could help please? I am using Ignition 8.3 and Vision.
Note that Swing's embedded "HTML" parser is ancient (processing a very limited subset of HTML3) and generally shouldn't be thought of as a true HTML feature.
But, for the simple case of "allow word breaking in a long string", it's great.
Also, there's no need to close the outer HTML tag, for what it's worth - makes it a little easier to do the concatenation in an expression or whatever.
Sorry I’m pretty new to Ignition - I have a Indirect tag path of {1}.Documentation where {1} is Root Container.MotorUDT::Meta.TagPath. Do I just put it in front of the {1} as that doesn’t seem to work?
Add a custom property to the label and move your indirect binding over there.
Then give the text property of the label an expression binding that's just "<html>" + {path/to/your/custom.property}, using the property selector tool on the right hand side of the expression editor.
Then, if you're still in early days of your project, do some digging on the forum about why you should avoid custom data type parameters in Vision. The short version is that they're a performance pitfall as your system grows, and you should generally prefer to use string parameters and standard indirect tag bindings wherever you can.
Inductive University guides you to UDT parameters (and they're admittedly great for development speed) but they're not a "best practice" for a scalable system over time, and the best time to avoid them is right at the start of project development.
Do not pass UDT types to your popups. Create a custom property on your popup like “rootpath”, type string. Pass the root of the tagpath as the custom property.
Then all your indirects on your popup become something like {1}/startPB. Passing the meta UDT is highly inefficient.
Then on your label for the motor title, create a custom property like “mytitle” and populate it with an expression binding that includes the html qualifier.
Custom properties at both the root level and the component level are highly useful for indirects, custom styles (like colors, animations, titles, etc).
Not just inefficient, but also limits the use-cases of your template. It would be like designing a car that only travels on major highways and just comes to a halt if you try to exit onto an exit ramp. Sort of useful, but very limited use-case!
PS. @robertm you just use tilde ` to stop the text being converted: e.g.
(and then end with another ` - I can’t do that to show you since it will convert it to pre-formatted text)