LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i save cluster to registry

Hello!

 

I need example, how can I save cluster to Registry after read back? Aught possible this.

Before I save this cluster to ini file, but I want save that to reg.

 

Can you help me?

 

THX!

 

 

0 Kudos
Message 1 of 10
(3,933 Views)

You can use the "flatten to string" resp. "unflatten to string" vis to convert your cluster to a string. This string can be written to the registry with the normal registry-operations implemented in LabVIEW. You can read back your string and then convert it to a cluster by providing the desired data type to the "unflatten to string"-vi. In the example, only the conversion is shown, not the registry access! Hope this helps,

 

 

 

Greetings,

 

Christian
Message Edited by cschneider on 09-24-2008 04:29 PM

THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
Message 2 of 10
(3,915 Views)

Yes you help me! Smiley Wink Thanks.

 

But I have one question yet.

 

Can i give Path and file name to registry? e.g C:\LVREG\option.reg or some similar.

 

Greetings, Misi

0 Kudos
Message 3 of 10
(3,880 Views)

If I understand you right, you want to import a .reg file to the registry? Yeah, that's possible...look at the page

http://www.eolsoft.com/freeware/registry_jumper/regedit_switches.htm

 

There, the command line switches of the tool "regedit" are explained. You can call regedit from LabVIEW with the appropriate switches (i. e. your filename). 

 

Greetings,

 

Christian


THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
0 Kudos
Message 4 of 10
(3,873 Views)

No it's not certain.

I would like that, if i save cluster I can give file name( saves.reg ) and path ( c:\LVSaves\ ), where I can find the file easy and open it, as if you make ini file or txt file.

 

I would like if the file escalation has *.reg

 

Misi

 

 

0 Kudos
Message 5 of 10
(3,865 Views)

Hello.

 

I have an other question. How can i save numeric value to registry? Becouse if Numeric value's 1,5673, then in the registry i  can find 2, or i get -601 errors. So how can i save the accurate value?

 

Please help me.

 

Greeting,

 

Misi

0 Kudos
Message 6 of 10
(3,724 Views)

One possibility is the same way as Christian proposed for clusters: flatten the floating point number to a string and store the string in the registry.

For numbers, instead of flattening it might be nicer to format a number into a string (see string/number conversion palette) so the value is human readable.

 

Hope this helps

Daniel

 

0 Kudos
Message 7 of 10
(3,716 Views)

 

I made it with number to decimal string and decimal string to number first, but then if numeric value=the 0,23 then in registry 0 appear.

After i tryed flatten and unfletten but then I didn't read back real data from the registry.

Would you be able to attach a plain example possibly? with one of the methods.

Becouse may be, that I configuration something badly.

 

Misi

0 Kudos
Message 8 of 10
(3,683 Views)

Number to decimal string cuts the digits. Use "Number to fractional string" or to engineering or exponential string, whatever fits your needs best.

 

0 Kudos
Message 9 of 10
(3,680 Views)

Thank you for much!! Smiley Happy

 

works perfectly with number to fractional string.

 

Thanks!

 

Greetings,

 

Misi

0 Kudos
Message 10 of 10
(3,670 Views)