From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to know how to draw arrows & dashed lines in a picture control

I have to draw arrows & dashed lines in a picture control. Just like we can do that in word or paint etc. I need to do the same using the mouse and drag the line/arrow till I realease the mouse. I am able to this for a normal line ( it works perfectly) but when I have to draw an arrow or a line I am stumped.
0 Kudos
Message 1 of 6
(5,480 Views)
Unfortunately, you have to code your own VIs to do these. It's not going to be too complicated if you manage the animation (while dragging the mouse) with a normal line and draw the dashed line/arrow at the end (when releasing the mouse button).
In both cases, you'll know start/end line coordinates, thus having the line equation. For arrows, you need to calculate the angle in order to draw it properly.
A simpler solution may be an activeX control with these features (Paint like) already integrated or to develop one in Visual Basic (at least it will be simpler to manage mouse events and drawing tasks).

Let's hope somebody already did it and wants to share.
0 Kudos
Message 2 of 6
(5,480 Views)
Here is the code for this problem.
Message 3 of 6
(5,480 Views)

Hi 

 arrow.zip file is not opening for me

 my labview version is 8.1

cananypone tell me hoe to open that file

0 Kudos
Message 4 of 6
(3,851 Views)

Hi rasi,

 

those VIs are saved with LabVIEW6.0.2 -you should by able to open them with LV8!

 

Which version do you really use? There was no LV8.1

Best regards,
GerdW


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

Thanks  for your reply 

 I am using labview 2016 version now my is problem is solved

  I  downloaded winrar  now it is opening

  

Thanks 

0 Kudos
Message 6 of 6
(3,832 Views)