09-26-2018 04:43 PM
Hello,
is it possible to programatically arrange front panel controls in the same manner as these tool bar actions do?
09-26-2018 05:09 PM
It is. But it would take a fair amount of programming. You can search to see if anyone has created any toolkits to do this already, but I don't know if I've ever seen one.
What you would do is get references to the controls you want to move, then use property nodes for Position to move to new positions. The tricky part is the amount of math you'll need to do in order to get their current sizes (width and height), and current position (top and left) and determine the spacing.
I'm curious as to where you go the image from that you posted. The Distribute button seems to incorrectly have the same description as the resize button. Even the description for the Align button doesn't seem accurate.
09-26-2018 05:41 PM
I'm fairly sure that is straight from the getting started guide
09-26-2018 09:06 PM
09-27-2018 02:31 AM
@ravyh wrote:
Hello,
is it possible to programatically arrange front panel controls in the same manner as these tool bar actions do?
ZE_ Align it may help you, Find & install the attached .zip file here with.
Press Ctrl+Space & Ctrl+a, it'd get align automatically based on your Front panel connector pane terminals (Controls & Indicators).
09-27-2018 04:35 AM
@RavensFan wrote:
It is. But it would take a fair amount of programming. You can search to see if anyone has created any toolkits to do this already, but I don't know if I've ever seen one.
https://github.com/Carya-Automatisering/Dynamic-Scaling
Not so much mend for alignment, but very convenient (in my biased opinion) for front panel scaling in general. Key feature is the dynamic pane creation. E.g. Panes do not need to be predefined...
It would depend on the use case if it's a fit.
Alignment is something I'm considering to add, as I need this myself.
09-27-2018 07:02 AM - edited 09-27-2018 07:03 AM
Thanks everyone for their reactions.
RavensFan wrote:
I'm curious as to where you go the image from that you posted. The Distribute button seems to incorrectly have the same description as the resize button. Even the description for the Align button doesn't seem accurate.
taken from here: http://www.ni.com/white-paper/7566/en/
@paul_cardinale
@SABARI_SARAVANAN_M
Thanks for your ideas, though my intention is to arrange controls in run-time which i haven't mentioned - sorry for that.
wiebe@CARYA wrote:
https://github.com/Carya-Automatisering/Dynamic-Scaling
This looks like a nice project, not exactly what im looking for (probably at this stage of development - i see its a fairly fresh work). Could you provide some kind of description of usage or any other kind of documentation? I think i was unable to grasp the philosophy of the toolkit.
I myself have a pack of VIs which handle positioning of FP controls (as a sideproduct of a project) and am thinking of compiling them into a library or a toolkit.
Any mentions of other existing projects dealing with the topic are very welcome.
09-27-2018 07:16 AM
@ravyh wrote:
wiebe@CARYA wrote:
https://github.com/Carya-Automatisering/Dynamic-Scaling
This looks like a nice project, not exactly what im looking for (probably at this stage of development - i see its a fairly fresh work). Could you provide some kind of description of usage or any other kind of documentation? I think i was unable to grasp the philosophy of the toolkit.
Documentation? Yes, in time.
It's a spin off of a project, but for that project it's fully functional.
I posted this library after doing a presentation on GDevCon. Those videos will go online soon. Will try to remember posting it here, but on the repo for sure.
The philosophy is quite simple:
LabVIEW scaling is a problem. There's one option, fit to pane, and everything else you're on your own. The library allows you to specify the scaling of objects in a pane. It provides a way to show\hide objects and\or panes, and rescaling panes. That's basically it. I'd try a few examples, although they where steps in the presentation, not mend to demonstrate specific features.
09-27-2018 06:56 PM
VI scripting is pretty powerful. This is a side project I'm working on and the same principles would easily apply to front panel moves. That being said and like @RavensFan mentioned it involves a decent amount of math and programming.
11-18-2018 10:12 PM