LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fp.winbound returns error when just passing Left position?

Solved!
Go to solution

Hi All,

 

I currently trying to change to position of a front panel while the VI is running.

I'm using fp.center to center the FP, it works fine.

I'm using fp.winbounds, only with "1000" in the Left, and 0 for other objects in the cluster.

When executing tthe fp.bound property, the VI shifts on the Right as expected, but and error is raised.

 

Property Node (arg 1) in myvi.vi
Property Name: <b>Front Panel Window:Window Bounds</b>

 

Should I provide all the elements of the cluster?

Is there a way to simply shift the VI position to the right or left, without calculating other positions (top, bottom, etc.)?

Note that in my case, a part of the FP will be out of the screen visible part, voluntarily. I don't know if it can cause this property to raise an error.

 

Thanks,

 

Bim

 

 

0 Kudos
Message 1 of 4
(1,897 Views)
Solution
Accepted by topic author bim4

Hi bim,

 

Should I provide all the elements of the cluster?

Yes, you need to provide all elements with "acceptable" values.

 

Is there a way to simply shift the VI position to the right or left, without calculating other positions (top, bottom, etc.)?

This is just simple math (using ADD and SUB). How much simpler do you need it?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(1,877 Views)

Hi GerdW,

 

You answered my question 🙂

So I have to read the current bounds then applying the shift to left and right positions.

It works fine now.

 

I'd have expected it simpler, i.e by providing 0 would have forced an auto calculation of the new position (it works but returns an error). That's not the way fp.bounds works.

 

Thanks for your support!

 

Bim

0 Kudos
Message 3 of 4
(1,860 Views)

Hi bim,

 

I'd have expected it simpler, i.e by providing 0 would have forced an auto calculation

Does the LabVIEW help mention any of this?

Why did you expect that even when the help doesn't mention a feature like that?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(1,846 Views)