LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to FP.PanelBounds

Solved!
Go to solution

I am getting some slightly odd behavior when writing to the FP.PanelBounds property of a VI. On most occasions it works, but then for some VIs (with the same code sequence) it gives the following error:

 

Spoiler
Decos[] - Bounds - Error1.JPG

 

The code in question that I am using in several VIs is as follows:

 

Spoiler
Decos[] - Bounds - BD.JPG

 

I have a box decoration sent to the back of my FP, which I use to size the FP at run-time.

 

I was wondering if anyone could spot why this may be happening? I can provide VIs that work and one that doesn't, if needed.

 

- James



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 1 of 10
(3,381 Views)

Hi James,

 

ne need to hide those pics in spoilers...

 

When the error occurs after the property node call: what are the input values for the node? Have you checked them?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(3,374 Views)
Solution
Accepted by topic author J.Mamakos

The first thought that came to my head was minimum panel size (VI Properties). You can't shrink beyond that or you will get an error (not sure about the specific code). If that's not it then please post a working/non-working code sample and I'll take a look.

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 3 of 10
(3,372 Views)

The input values just before the property node in this particular VI executes are as follows:

 

Decos[] - Bounds - BD 2.JPG

 

I have a double-monitor setup with a max screen space of 2880x900, so the coords here are valid.



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 4 of 10
(3,370 Views)

@Charles_CLD wrote:

The first thought that came to my head was minimum panel size (VI Properties). You can't shrink beyond that or you will get an error (not sure about the specific code). If that's not it then please post a working/non-working code sample and I'll take a look.


 

It was the minimum panel size, which I'd set before adding the resize-to-decoration functionality. Thank you for that little insight! 🙂



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 5 of 10
(3,366 Views)

Hi James,

 

screen size shouldn't limit the size of front panels. Windows can be (much) larger than screens...

 

Does the example shown in your last message really results in an error?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(3,363 Views)

Going off on a slight tangent...

 

If I have more than one decoration on the FP, how can I know in which order they are in the Decos[ ] array?  The only properties of an element in the array are as follows:

 

Decos[] - Bounds.JPG

 

None of these seem to point to being able to differentiate between the different decorations. A form of trial-and-error can be used in the development to isolate whichever decoration you want to use, but is there a better way than altering the properties of one and watching to see which moves?

 

I'm using LabVIEW 8.5



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 7 of 10
(3,361 Views)

Hi James,

 

I think they are in the order of creation.

 

When searching you will find threads on this topic. There was also noted a scripting property, which gives a unique ID for each element. Maybe that helps...

 

James: it's quite funny for other readers when I give an answer to a deleted question...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(3,358 Views)

Sorry - I thought I'd worked it out! But alas, they're all called 'Decoration' and there's no way to rename them.

 

I'll have another look through the forums for this topic. Thank you for your help. 🙂

 

 

I didn't anticipate anyone replying to that last question so quickly!



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 9 of 10
(3,352 Views)

I usually use a simple modern boolean button, turn off the label, move to back, set it to hidden and grab the size from it. This is much easier to reference explicitly.

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
Message 10 of 10
(3,348 Views)