Hi David,
Now I've seen this question asked before and the issue is with self contained custom panels the <constraint/> tags actually get read in after the <param/> tags. So the solution to this is to use script to set these parameters constraints on load to the OID or just change the constraint on the individual instance of drawing that parameter in the interface to the ID Reference.
I've attached a zip with an example panel where...
- I made the Vid1 param update via script using the ID reference of the already existing <constraint> tag in the meta
- I made a drawn in instance of the Vid2 param reference the already existing <constraint> tag in the meta
- I made the Vid3 param take a completely new constraint generated by script
- I made a drawn in instance of the Vid4 param reference a newly generated constaint ID made by script
- Last I made the Vid6 param take the constraint of the Vid5 param with script
One thing to be aware of is that in the case of Vid2 and Vid4 they only have the ID constraint on those drawn in instances.
In my example look for the code in the API. I've set it to immediate="true" so that it runs the code in the API before the UI components get rendered.
I've also taken the liberty to attach two other example panels in the zip. I believe these are Richard is referring to.
Hope this helps and makes sense!
------------------------------
Antony Giraldo
DashBoard Custom Panel Developer
Ross Video Creative Services | Rocket Surgery Triggering and Control
------------------------------
Original Message:
Sent: 04-17-2025 05:27
From: Richard Crutwell
Subject: Dashboard - Parameter References
I've not seen these global constraints used before, I think they may be an older implementation and there is a newer method, likely using structs.
Do you have the examples dump of Dashboard panels? - it's a zip archive Tech Support can provide that has examples of how we use all the features including the params and constraints. I think it'd be best to review these and see if you can achieve what you are looking for from a combination of these examples. Dashboard has been built up over years, so some features like this global constraints have become deprecated, it may be the case here or there is just a simpler method for achieving the same thing.
------------------------------
Richard Crutwell
Ross Video UK
------------------------------
Original Message:
Sent: 04-16-2025 14:35
From: David Levy
Subject: Dashboard - Parameter References
Thanks Richard!
Can this also be done with Global Constraints? Are those also scriptable?
here's an example from the docs, can I script this type of constraint?
<constraint constrainttype="INT_CHOICE" id="VideoFormat"> <constraint key="0">480i-59.94</constraint> <constraint key="1">576i-50</constraint> <constraint key="2">1080i-29.97</constraint> <constraint key="3">1080i-25</constraint> <constraint key="4">720p-59.94</constraint> <constraint key="5">720p-50</constraint> <constraint key="6">1080p-59.94</constraint> <constraint key="7">1080p-50</constraint></constraint><param constrainttype="ID_REFERENCE" constraint="VideoFormat" name="Vid1"oid="0x501" type="INT16_PARAM"/><param constrainttype="ID_REFERENCE" constraint="VideoFormat" name="Vid2"oid="0x502" type="INT16_PARAM"/><param constrainttype="ID_REFERENCE" constraint="VideoFormat" name="Vid3"oid="0x503" type="INT16_PARAM"/>
------------------------------
David Levy
Lead Real Time Graphics Developer
ESPN
Charlotte United States
Original Message:
Sent: 04-16-2025 06:55
From: Richard Crutwell
Subject: Dashboard - Parameter References
Hi David,
I hope this example can help. It shows a struct table, I've added a "pens" subparam to a struct that references values in the struct_array. If this subparam is added/deleted from it will update the choices on the struct.
------------------------------
Richard Crutwell
Ross Video UK