LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Drag Drop Data Variant

More frustration with custom UIs...  Alright so I am implementing a drag and drop function in an XControl (asking for trouble I know).  And I wanted to support some custom data type passing and read it the data using the Get Drag Drop Data function.  

 

Problem is you need to know the data type you are reading and I don't know it.  Now normally when you don't know the data type in LabVIEW that's fine, just tell it to convert the data into a variant, and then you'll get your data and you can examine it to figure out what you have.  But this function still doesn't work when you provide a variant to convert to.

 

Attached is an example.  Basically set the boolean to false then drag from one control to the other.  It will pass some data as a variant in the Drag Started, and in the Drop it will try to read that variant, but returns an error.  This is true even if you insert a To Variant.  Then try again with the boolean set to True and it will instead of passing a variant, it will pass a cluster with one element which is a variant, and then it will be able to read that.  Pretty minor but I didn't expect to have this type of issue.

0 Kudos
Message 1 of 4
(2,811 Views)

Could you please upload a 2014 version?

0 Kudos
Message 2 of 4
(2,791 Views)
Message 3 of 4
(2,778 Views)

That is pretty strange. The help says: "Only use this function when it is necessary to access the drag data, not just to examine the data type." I was looking for some other function that you could use to examine the data type, but came out empty handed 😕

0 Kudos
Message 4 of 4
(2,757 Views)