LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Draw Line

Is there a way to programmatically draw a line on the front panel of a VI?
0 Kudos
Message 1 of 13
(6,341 Views)
You can draw lines inside a picture control. You can make the background and the border transparent and you would not know the picture is present when you turn off the label.
0 Kudos
Message 2 of 13
(6,327 Views)
Here is a sample in 7.0 format.
0 Kudos
Message 3 of 13
(6,324 Views)
Well there IS another way where you control the properties of a decoration (which can be a line).

Have a look at the attached, it could be modified to control the origin, etc. of the line.
0 Kudos
Message 4 of 13
(6,302 Views)
Yes, this is the kind of thing I was looking for.  But is there a way to create the line (or any control for that matter) programmatically?

Thanks


0 Kudos
Message 5 of 13
(6,296 Views)

Outside of scripting (another topic all together) there is no methods for programatically creating controls as you could in a language such as c++ or c# with a constructor.  All control references are built at design time and are stored in the object[] properity of the owner vi.  This is because Labview is a managed memory language and is based on data flow (so all objects are known).  What exactly are you trying to do, if it is just drawing then I would suggest the embedded transparent picture control (much like having a 2d device context or a canvas to work with)  If you are doing something more static then a combination of visible/not visible objects and pictures might work.

 

Paul 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 13
(6,292 Views)
My customer wants to be able to create (at runtime) a "process map" where they can drag around icons (thermometer, tank, etc) and put lines between them to represent their plant process and have the data values change in the icons, etc.
0 Kudos
Message 7 of 13
(6,290 Views)

Darryl wrote;

"

My customer wants to be able to create (at runtime) a "process map" where they can drag around icons (thermometer, tank, etc) and put lines between them to represent their plant process and have the data values change in the icons, etc.

"

I have done similar stuff in multiple apps using the picture control.

Check out this thread were I have collected posts about the Picture control.

http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true

Warning:

There is NO "out-of-the-box" solution for this. It must all be coded. But, it can be done.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 13
(6,283 Views)
Interesting question. I don't see a way to do that. However, you CAN make an existing decoration visible or invisible, again using a property node.
0 Kudos
Message 9 of 13
(6,276 Views)
This thread might help you too. The premise is slightly different, but many of the suggestions are valid for your application.
Jarrod S.
National Instruments
0 Kudos
Message 10 of 13
(6,264 Views)