LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can we zoom in/out in LabVIEW?

Solved!
Go to solution

Ok, I attached.

I want change scale of tank by knob(here : SCALE?)

0 Kudos
Message 11 of 20
(1,716 Views)

Hi behzad,

 

use property node of the tank.

"Scale.Range" would be a nice start…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 20
(1,713 Views)

thanks Gerdw, but I talk about scale of object size. change size to smaller or bigger object. like zoom in/out. I thought you talk about this.

0 Kudos
Message 13 of 20
(1,687 Views)

I am not sure if any programming language supports your request. It sounds to me that you are looking for a "analog" zoom function like vector based graphics allow.

Sadly, this is not supported in LV as LV doesn't use vector based graphics.

When implementing a "zoom" (scaling), you have to take care about pixels. So your width and height of the controls/indicators will always be an integer number of pixels (ever seen a half-pixel??) which will lead to overlaps and gaps when scaling elements which are close to each other.

Also fonts are very difficult to resize in a good way keeping the readable on the one hand, but as small as possible on the other (otherwise, text will overlap controls/indicator!).

 

My recommendation is that you implement some intelligence which calculates the total available width and height and resize controls/indicators/fonts in a reasonable way. As Gerd already mentioned: Use splitters to create independent panes for improved resize options.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 14 of 20
(1,673 Views)

Hi behzad,

 

use property nodes. Property "Object bounding box" (or similar, I use a German LV version) is the one you need.

 

I thought you talk about this.

It's quite complicated when you talk about "scale" showing an object with a scale

That's why I prefer clear examples with clear descriptions!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 15 of 20
(1,672 Views)

Thanks a lot GerdW

I'm really sorry because of my bad explanation.

 

 

I couldnt find "Object bounding box" but I found a property "bounds". thats OK but it is not writable. that just show the size of object(here : tank)

 

 

Best Regards

 

0 Kudos
Message 16 of 20
(1,659 Views)

Thank you Norbert.

may you explain more your recommendation?

actully, I designed a dynamic program. I used 10 tank at first. user select the desire number of tanks. then, I invisible unuseable of tanks. but the page objects change to bad form and graceless. result, it is suitable to scale of object. I'm trying for that

 

 

Best Regards

 

 

 

0 Kudos
Message 17 of 20
(1,651 Views)
Solution
Accepted by behzad1

Resizing a tank control takes quite some properties:

  • Housing Size
  • Scale Marker Font Size
  • Caption/Label (whatever you display) Font Size
  • If needed: Scale Style

Please note that this list could be incomplete (depending on how your resize should act like)

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 18 of 20
(1,645 Views)

Thank you Norbert.

may you explain more your recommendation?

actully, I designed a dynamic program. I used 10 tank at first. user select the desire number of tanks. then, I invisible unuseable of tanks. but the page objects change to bad form and graceless. result, it is suitable to scale of object. I'm trying for that

 

 

Best Regards

0 Kudos
Message 19 of 20
(1,636 Views)
Solution
Accepted by behzad1

Well, what should i explain more? Resizing is done "per pane". So regarding specific controls which must/should not resize, you should create multiple panes by placing splitter bars.

Use property nodes to retrieve sizing information (e.g. pane area width), then calculate new dimensions for all resizable objects, use property nodes to set those sizes.

Note: If you implement such a resizing algorithm, you should disable the option "resize with pane" for all objects (which is btw. already the default setting).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 20 of 20
(1,619 Views)