LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

create a constant from a reference

Hi

I create a reference with scripting from a control

Now I want to create a reference constant from the reference and I can not found this invoke node

Help

Jürgen

0 Kudos
Message 1 of 6
(6,045 Views)

Jürgen,

you can create a class specifier constant and then use the "Type" property to assign it to the right class. Use the "Class Name" property of the control to assign the type.

I woudn't use the control refnum to create the constant directly.

http://screencast.com/t/Nsa4PlrZe

GCentral ChampionCLA
0 Kudos
Message 2 of 6
(4,126 Views)

Hi

Thanks for your help

it help's me but it is not the final sulotion

See the picture

I need my version because I put it in a cluster

I hope you can help me a secund time

Jürgen

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

OK, you need a Strict Typed reference...

You need to create a control reference and from its terminal, change it to a constant... then delete the surplus control reference.

create strict typedef from control.png

You'll have to add the created constant to your cluster... but that's not your question.

GCentral ChampionCLA
0 Kudos
Message 4 of 6
(4,126 Views)

Thanks for your help

it's done

Ref.png

0 Kudos
Message 5 of 6
(4,126 Views)

Hello,

I have a similar problem using VI Scripting. I use it to automatically generate templates containing subVIs and Type Def by copying them from a template source (Task(x).vi will be replaced with PXI6232.vi for instance).

It works fine but I still have a problem with Reference Constant linked to Control, which is linked to a TypeDef. When I start my Scripting.vi, the control will be correctly relinked but the RefConstant will be deleted as shown in the Snippet.

How can I relink the RefConstant to its Control and avoiding its suppression?

Thanks,

Laurent

before.pngafter.pngScriptVI.png

0 Kudos
Message 6 of 6
(4,126 Views)