07-21-2020 01:33 PM - edited 07-21-2020 10:07 PM
Hoping that someone can tell me why the Pane Origin when converted to Panel Coords shows a negative vertical component for my DQMH front panels? I've been trying to create a UI with multiple splitters and all of my panes are giving me negative vertical components when I use the CvtPaneToPanelCoords invoke method. I've attact a .zip file of a Pane Origin/Coord test DQMH module (in LV 2019 and DQMH 5.0). I also created a simply VI called Non DQMH VI Panel Coord Test...this VI gives me the expected results.
I must be missing something trivial.
07-22-2020 08:49 AM
Too add to my post from yesterday...I've looked into this some more and I'm still stumped.
I found this post last night -> Christina_R post about Screen Position from 2012 which provided some clarity on the Pane vs. Panel vs. Screen coords and how they relate but I'm still seeing a discrepancy in the DQMH front panel. I modified the BD slightly so that the Pane isn't set to 0,0 (top left corner of the panel) so that I can scroll it on purpose to see the values, and I also added an indicator for the Screen Coords (not going to re-post the VI).
I've tried running it with and without the Menus and Toolbars options (in VI Properties) and both show a negative value for the Panel Vertical component, however, the Menu and Toolbar heights are included in the Vertical value when they're included (but they're still negative). It's almost like there is a fixed offset in the Vertical component. I do not experience this issue on a Non DQMH front panel VI. Is there a setting that I'm not aware of that's built into the module? Or is there a scripting function that's playing with the Panel coords? The weird thing is that the Screen Coords seem to be correct or aren't out to lunch at least.
Edit Time - No Menu or Toolbar in VI Properties
Run-Time - No Menu or Toolbar in VI Properties
Run-Time - with Menu and Toolbar in VI Properties
I'd like to be able to use Panel Coords to place certain controls and indicators and also to help with some custom scaling, but I can't do that with the current situation.
07-23-2020 03:06 PM
Brown,
I am not in a place where I can run the code now, I will look into it later.
In the meantime, what happens if you do run the code that you have currently disabled that sets the Pane origin to 0,0?
07-23-2020 03:57 PM
Hi Fab,
I get the expected results for the top left corner of the panel with respect to the "Origin" of the pane, but it's still saying that the Panel Coords are (0, -184). I'm only using one pane here for simplicity but in my other UI with 3 or 4 panes (also a DQMH module Front Panel) all of my vertical coords are negative.
Origin enabled
Results
I don't see this behavior if I just create a VI on it's own (i.e. not a DQMH main.vi front panel). I don't know if there's actually a correlation or if I just have a setting wrong.
Just for kicks, I threw a splitter bar on that FP and opened up the Pane Relief toolkit to check the splitter position. It is correct if you subtract the vertical components of the Panes in terms of Panel Coords so there seems to be an offset for some reason (see image). I just tried doing this in another DQMH main.vi front panel and the Panel coords for the "origin" of the Panes are much larger (on the order of -1500 to 1800) so the offset is a mystery to me.
Two Panes
Sorry for all of the images. I can upload another .zip file with the actual VIs if that will help.
07-28-2020 03:29 PM
Hi Brown,
We reached out to NI and we have no idea how the DQMH Main.vi got into that state. We have filed DQMH-694 and we will make sure that the next version of DQMH will have its Main.vi with their pane at 0,0.
The workaround is to create a new VI and copy/paste the contents into it. That doesn’t work well if there are multiple panes.
We will let you know when we release the new version of DQMH and whether we could find a fix for the existing code.
Thanks for reaching out and for your trust in DQMH.
Best regards,
Fab
07-29-2020 06:53 AM