05-06-2021 06:06 AM
I'd like to move the origin to the top left corner of the front panel programmatically but currently I have no idea how to do it.
Pls note that I'm aware of the scroll to origin at runtime method, but thats not what I'm looking for as it only has an effect during runtime. Once the VI stops the origin returns to its original position, but I'd like it to be permanent like if I resize the window from a program it keeps its size after the program stops, or if I change the position of an FP object it stays there after the code stopped.
The closest thing I have found is to check the ContentRectangle property of the pane. That seems to show how much the origin is off of the top left corner, but this is a read only property, so I cant change it.
Thanks.
05-06-2021 06:24 AM
05-06-2021 06:53 AM - edited 05-06-2021 06:53 AM
Speaking of the QD plugin, here's a snippet of it so you can see how to find the property.
05-06-2021 07:18 AM
By setting the origin property I can indeed move the origin to the top left corner, but that only has an effect during runtime.
Ctrl + space + o : has a permanent effect which is good, but if inside it just sets the origin and if I do it during runtime then it doesnt keep the origin there once the VI stopped.
05-06-2021 09:22 AM
@1984 wrote:
By setting the origin property I can indeed move the origin to the top left corner, but that only has an effect during runtime.
Ctrl + space + o : has a permanent effect which is good, but if inside it just sets the origin and if I do it during runtime then it doesnt keep the origin there once the VI stopped.
Of course! You need to save the VI afterwards to make these changes persistent.
05-06-2021 09:48 AM
Turn the scrollbars off ('always off', right click the scrollbar), then press QD, CTRL+O.
Now the origin will be fixed (unchangeable).
05-06-2021 12:38 PM
Place the attached file under C:\ ... \LabVIEW 20xx\project\ ...
It will then be available under your Tools menu (the next time you start LabVIEW).
When you select menu -> Tools -> ... Reset VI Origin to 0, it will reset the origin of the topmost VI (I use this tool a lot).
Note: That VI is set to "Run when opened" (which is needed for the tool to work properly)
05-07-2021 03:07 AM
@paul_cardinale wrote:When you select menu -> Tools -> ... Reset VI Origin to 0, it will reset the origin of the topmost VI (I use this tool a lot).
Isn't that what QD, CTRL+O does?
05-07-2021 05:01 AM
Hi wiebe,
wiebe@CARYA wrote:
@paul_cardinale wrote:When you select menu -> Tools -> ... Reset VI Origin to 0, it will reset the origin of the topmost VI (I use this tool a lot).
Isn't that what QD, CTRL+O does?
Usually yes, but only for most recent LabVIEW versions…
(Tried to do the same on LV2011? That's why I also stick with the tools menu item…)
05-07-2021 05:30 AM
@GerdW wrote:
Hi wiebe,
wiebe@CARYA wrote:
@paul_cardinale wrote:When you select menu -> Tools -> ... Reset VI Origin to 0, it will reset the origin of the topmost VI (I use this tool a lot).
Isn't that what QD, CTRL+O does?
Usually yes, but only for most recent LabVIEW versions…
(Tried to do the same on LV2011? That's why I also stick with the tools menu item…)
If you go further back, then you won't have panes at all...
If you go even further back, you won't even have property nodes.