LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any GUID generating VI available?

Does anyone have a LV VI that generates a new GUID at runtime? I can not find one in LV or on the Internet.

 

GUID generation at Run Tim has many uses.

 

I would appreciate any info.

0 Kudos
Message 1 of 11
(8,622 Views)

Here is a recent thread where someone was doing just that.

 

In this thread, they were complaining that the randomly generated numbers were duplicating.  Yet I never saw that behavior, and they even had problems explaining it.

 

But the concept of building the string from the random numbers is there.

0 Kudos
Message 2 of 11
(8,610 Views)

There's also a VI in <LabVIEW>\resource\somewhere that generates a GUID using the normal Windows rules. I dont have a copy of LV on Windows to find it right now, but try searching the resource folder for VIs with GUID in their name and see what you can find (unless someone get give you a more exact location).

 

Shaun

0 Kudos
Message 3 of 11
(8,580 Views)

Using .NET

 

Message 4 of 11
(8,388 Views)

I cannot find this constructor when I select constructor. Is there a way to search for it, and other, useful constructors?

0 Kudos
Message 5 of 11
(8,354 Views)

It is in "mscorlib" under system

 

Message 6 of 11
(8,348 Views)

It's in the mscorelib assembly. To find where a particular constructor is lurking, a good place to start is to search MSDN. Here is the page for System.Guid:

http://msdn.microsoft.com/en-us/library/system.guid.aspx

 

On the this page is normally a line like "Assembly:  mscorlib (in mscorlib.dll)" - This tells you where to find the constructor.

 

Alternatively, if you dont want to use the .net stuff, you could always use the VI that LabVIEW uses to for generating it's own GUIDs (installer creation, etc): <LabVIEW>\resource\Framework\Providers\API\mxLvGenerateGuid.vi

 

 

 

Message 7 of 11
(8,342 Views)

Thanks. A useful utility.

0 Kudos
Message 8 of 11
(8,337 Views)

Here is a Windows only way to create a GUID. This calls the COCreateGuid function in the OLE32.dll library using a call library function node and gives you the enjoyment of seeing the source code.

Anthony F.
Staff Software Engineer
National Instruments
Message 9 of 11
(8,331 Views)

This is an old thread, but if anyone else comes across this:

  • If using LabVIEW 2020 or later, the best way to generate a GUID is to use the native Create NI GUID.vi which is found in the String >> Additional String Functions palette.

Petru_Tarabuta_0-1725093233334.png

  • If using LabVIEW 8.0 to LabVIEW 2019, the best way is to download the Create NI GUID.vi that is found at: GUID Generation for LabVIEW Versions Older than 2020 . This is the same VI as the one that exists natively since LabVIEW 2020, but "Saved for previous..." to LabVIEW 8.0.
  • If using a LabVIEW version older than 8.0 on Windows, it's probably best to use the .NET Framework System.Guid object, as document in the following article: How to Generate a MessageID/GUID/UUID With LabVIEW?  and as seen in the screenshot below.

Petru_Tarabuta_2-1725093549150.png

 

 

Message 10 of 11
(638 Views)