Tomi Maila Posted November 10, 2007 Report Share Posted November 10, 2007 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 Quote Link to comment
Rolf Kalbermatter Posted July 8, 2008 Report Share Posted July 8, 2008 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.