LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

7.1 �Caption� Property Node Bug?

I�ve discovered what may be a bug in the �Caption� properties in LabVIEW 7.1. If it�s not a bug, it�s changed behavior from all previous versions back to 5.1.

It�s an easy one to reproduce. Drop any control or indicator on the panel, create a property node for it and set it to write to or read any of the �Caption� properties. If you are reading a property, you also need to create an indicator for the property. Create an indicator for the error out from the property node.

When you run the VI, you get error number 1320 which has a definition of �LabVIEW: In edit mode, LabVIEW cannot return a property for a control part that you have not yet created.� The error is not generated if you manually turn on the Caption either by right cli
cking and selecting Caption from the Visible menu or turn it on from the properties dialog. In all versions prior to 7.1, no error is generated. It seems in 7.1, since the caption has not yet been created, you cannot programmatically operate on it. In 7.0 and earlier, it must create the Caption for you and then operate on it.

I haven�t found a way around this without first manually turning on the Caption. Writing to the �Caption.Visible� property generates the error, which is what you would think to do first.

I�ve only tested this on WinXP.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 1 of 6
(3,808 Views)
Same problem on Win2K and MacOSX.
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 2 of 6
(3,808 Views)
An ancillary observation:

Provided you have

Show tip strips over terminals
and
Use control caption for subVI tip strips

both enabled

AND

You configure the control as part of the VI icon conncetor,

You will see what appears to be the caption displayed when you float over the sub-VI in a block diagram.

The error is still returned.

So...
It looks like the caption really is there, but LV think it isn't!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 6
(3,808 Views)
...and then when you think about this in the context of BJD's observation re:the for loop issue....

It appears the editing history of LV objects are playing a role in these issues.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 6
(3,808 Views)
Update:

Jean-Pierre Drolet suggested I try the VI method "Export VI Strings" which has an input "Create Captions". It does programatically create the captions, but it also turns all the Labels on the panel off and all the Captions on.

Plus the VI has to be in 'Edit Mode' so the method must be called from a different VI.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 5 of 6
(3,808 Views)

This is broken again in 2015, except the workaround of manually enabling the visibility of the caption at design time does not fix it.  The caption is visible, but the error message persists.

0 Kudos
Message 6 of 6
(2,352 Views)