UI Interest Group Documents

Showing results for 
Search instead for 
Did you mean: 

LabVIEW VI Dimensional Model

Rev 3 Update:

  • Replaced "SplitterSmiley Tongueosition" details with "SplitterSmiley Frustratedplitter Position"

I also looked into adding layers to the document that can be used to show or hide groups of dimensions to make it easier to read, but I don't have a license for any of the Adobe applications that would be able to do this.

Rev 2 Update:

  • Added a page for window/panel/pane dimensioning in a multi-pane VI.
  • Added legends.
  • Fixed several errors.
  • Changed visual style to (hopefully) make it more digestible.


I don't often need to think about the dirty details of object dimensioning and positioning on the front panel of a VI, but when I do, the task can really derail my productivity. I decided to put together a set of diagrams that explain all the dimensioning properties of windows, panels, panes, splitters, objects, etc. Note that some of these properties can only be accessed when VI Scripting is enabled. You normally shouldn't need to use all of them, but if you do, it's nice to know what they mean.

I'd love to hear feedback on making this document better. I intend to keep revising it and posting the updates for general public use until something like this makes its way into the LabVIEW Help file.

Member Joel_in_Calif

Nice work, thanks.

Active Participant Thoric Active Participant
Active Participant

Thank you for taking the effort to put this together, I hadn't appreciated just how convoluted all the coordinate planes were. Have you marked on here anywhere the coordinate space (ie, that increasing vertical values run downwards?). I know it can be inferred from the way you've dimensioned everything, but it can't hurt to add a 'compass style' Euclidean origin reference, what do you think?

Great work!

Thoric (CLA, CLED, CTD and LabVIEW Champion)

Active Participant David_Staab
Active Participant

No, I neglected to do that. Given that you can get negative values for the dimensions referenced to PaneSmiley Surprisedrigin, I absolutely should put a coordinate plane in there. I'll add it to the next revision.

Member vinalg

Excellent document! For a long time I come looking for such a document explaining these properties!

Nice work!

Active Participant Pete.Dunc
Active Participant

This looks great - good work!


Peter D

Trusted Enthusiast
Trusted Enthusiast

Very usefull, thanks.

The best way to say thanks is to give kudos!
Member Javed_H

Well Documented. Thanks for taking efforts for preparing this useful document.

Member Qia.sky

Good Work

Virry Test & Control
LabVIEW Certified Developer
Member allah

gook ideas

Member RuchiG

Awesome work!!

Member Yogesh_Redemptor

Very clear dimensions..

Great work

Yogesh Redemptor
Trusted Enthusiast
Trusted Enthusiast

Very nice document!

Kind Regards,
Thierry C - CLA, CTA - Staff R&D Engineer, RF Semiconductor Test - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. Smiley Wink
Member MayanBlood

Good document, thank you!

Member GreaseMonkey


I love this...

You mentioned you don't have a license for the Adobe... I may try to do this in a VI where dimentions can be turned on/off live on the screen while the VI is running... hmm... time for sime test VI's...

Active Participant pallen
Active Participant

This could be very handy!

Patrick Allen: FunctionalityUnlimited.ca
Member AmitKaria2k

Thanks David ! The article is really useful..

Keep it up

Active Participant cirrusio
Active Participant

Thanks, David - this is quite nice and obviously took a lot of effort.  This still makes me want to pull my hair out though.  I have what I believe is a simple problem but can't seem to get it right.  I am designing a UI for a resolution other than that on my development computer.  And to top things off, I have to ship the code without having ever seen it on the screen that it will be running on.  And to make matters worse, the client keeps changing the resolution on me.  What I want to do is 1) ensure that the main UI fits the window and 2) make sure that the controls are properly positioned on the screen when it runs (most of the controls are contained within a tab, so I really only have to position one object in the panel (pane??)). What is killing me on proper positioning is that I don't seem to understand the origin.  Can you explain exactly what this is?  I can't seem to figure out exactly where my origin is - is the center of the screen?  This doesn't seem to be the case.  How exactly do you figure this out?


NI Employee

The origin of a pane is the pane pixel coordinate of the top-left corner.  This can be just about anything.  When you use scrollbars, you are changing this origin.  When you move controls on a pane, you move them with respect to the 0,0 point on the pane.  This point may or may not be visible.  Usually, when I resize panels, I set to origin to 0,0 so that moving and resizing other items is more predictable.  I published some resizing code to handle font size changes from XP to Win7 here.

In general, due to historical reasons, coordinates on a computer screen have the 0,0 as top left, with X increasing to the right, and Y increasing down.  This is definitely inverted from what we all learned in algebra, but made sense in the context of the raster scanned CRT screens of the early computers.  Sort of like using hyperbolic coordinates to separate the equations of motion of Rydberg atom electrons in an electric field .

This account is no longer active. Contact ShadesOfGray for current posts and information.
Member Ravi_Beniwal

1) To ensure that the main UI fits the window, all you have to do is set the VI's "Window Run-Time Position" to Maximized. You can set this in the VI Properties dialog box.

2) The panel is the part of the VI front panel that hosts one or more panes, which in turn host all the controls, indicators, decorations etc. For a VI with no splitters, like all new VIs, there is only one pane. You can add more panes by adding splitters.

Each pane has an origin. If you have the front panel grid turned on, it shows up as the intersection of the cross-hair that is slightly darker than the rest of the grid. When you open a new VI, or create new panes by adding splitters, the origin for the panes is at the top left corner of the panes visible portion. When you move the scrollbars, it essentially moves the origin around. All controls in a pane are positioned relative to the origin of the pane.

Your description suggests that your UI has a single pane VI as the main window. To guarantee the positioning of the tab containing your controls, set the origin of the pane to (0, 0). This will give you a good starting point. Then you can get the size of the pane, and the size of the tab control. From these two, you can calculate the position of the tab that will align it where you want, top-left, top-middle, middle-middle, etc.

Active Participant David_Staab
Active Participant

^^^ What these guys said.

Active Participant cirrusio
Active Participant

Thanks, all.  I think that is the missing piece for me that was not apparent.  I was not getting the relation between the origin and the scroll bars.  I will give this a go.

David, you have put a ton of work into this, so I don't mean to pile on, but maybe you (or someone else?) can put up a practical example that shows this in action?  Maybe I will put something together if I can find the time.

Cheers, Matt

Active Participant dsavir
Active Participant

Wow, thanks for the clarification! this makes things much clearer.

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
Active Participant Neil.Pate Active Participant
Active Participant

Thanks David, nice to see this so thoroughly documented.