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 9
(7,503 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 9
(7,491 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 9
(7,461 Views)

Using .NET

 

Message 4 of 9
(7,269 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 9
(7,235 Views)

It is in "mscorlib" under system

 

Message 6 of 9
(7,229 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 9
(7,223 Views)

Thanks. A useful utility.

0 Kudos
Message 8 of 9
(7,218 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 9
(7,212 Views)