Jump to content

User Defined Tags in Variant Type Library


Tomi Maila

Recommended Posts

Hi All,

I was investigating the LabVIEW 8.5 variant type library. What caught my interest are five last items in the library namely

  • GetUserDefinedTagInfo.vi
  • SetUserDefinedTagInfo.vi
  • GetUserDefinedTagRefnumInfo.vi
  • SetUserDefinedTagRefnumInfo.vi
  • GetRandomNumberForType.vi

I interpret that the four first VIs allows us to specify type properties when using LabVIEW scripting or XNodes with typed items. Could these even allow us to create our own reference types. Perhaps these tags could be properties like appearance and wire appearance. Let's assume we start from some reference type, then define the exact reference type with SetRefnumInfo.vi to be something like UserDefinedRefnumTag. If then go on by using the two SetUserDefined... methods above properly, could we actually have our own type? Could we script our own reference typed controls and indicators for our XNodes? Could we even be able specify the wire appearance? Could we use the GetRandomNumberForType.vi to make the type unique?

Just some questions that popped into my mind... Could someone help me to reverse engineer this issue. I'd really love to have my own reference types for my language extension... :)

p.s. The VariantType.lvlib can be found under LabVIEW 8.5\vi.lib\Utility\VariantDataType

Cheers,

Tomi

Link to comment
  • 7 months later...

QUOTE (Tomi Maila @ Nov 9 2007, 07:58 PM)

Hi All,

I was investigating the LabVIEW 8.5 variant type library. What caught my interest are five last items in the library namely

  • GetUserDefinedTagInfo.vi
  • SetUserDefinedTagInfo.vi
  • GetUserDefinedTagRefnumInfo.vi
  • SetUserDefinedTagRefnumInfo.vi
  • GetRandomNumberForType.vi

I interpret that the four first VIs allows us to specify type properties when using LabVIEW scripting or XNodes with typed items. Could these even allow us to create our own reference types. Perhaps these tags could be properties like appearance and wire appearance. Let's assume we start from some reference type, then define the exact reference type with SetRefnumInfo.vi to be something like UserDefinedRefnumTag. If then go on by using the two SetUserDefined... methods above properly, could we actually have our own type? Could we script our own reference typed controls and indicators for our XNodes? Could we even be able specify the wire appearance? Could we use the GetRandomNumberForType.vi to make the type unique?

Just some questions that popped into my mind... Could someone help me to reverse engineer this issue. I'd really love to have my own reference types for my language extension... :)

p.s. The VariantType.lvlib can be found under LabVIEW 8.5\vi.lib\Utility\VariantDataType

Cheers,

Tomi

User defined tags and user defined refnums are in fact quite like normal LabVIEW refnums. The Tag variant looks like a VISA resource and can have a text label that identifies the instance of the object. The refnum type looks similar to a file refnum. Those refnum types allow creating an object/method/event hierarchy using *.rc files in <LabVIEW>/resources/objmgr. The ultimate implementation of that object hierarchy has to reside in a DLL that exports certain functions that are defined in the according rc file.

I believe they exist since LabVIEW 7.0 and some of the necessary methods for that DLL to interface to LabVIEW exported C functions seem to have been accidentially? documented in the LabVIEW 7.1 and 8.0 extcode.h file.

Still trying to get something working here is a very tiresome exercise with lots of crashing and obviously involves external C programming.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.