BennieC 0 Posted July 23, 2022 I am struggling with getting my results into Delphi. I have used direct access to the Python function as shown in the screencopy and in fact receive the correct results in Delphi using Code insight as shown. But I have no success in actually accessing this tuple from Delphi There are three items in the tuple (which is declared as a variant), the first containing a list of arrays, the second an array and the third a list of values. How do I individually access these values in Delphi - some sample code will help as I can't find anything in the demos and my knowledge of variants is quite inadequate. Kind regards Share this post Link to post
TiGü 21 Posted July 26, 2022 Try something like that for I := 0 to myPlateTuple.Length - 1 do begin var Sub := myPlateTuple.GetItem(I); end; see: Share this post Link to post
BennieC 0 Posted July 28, 2022 Thank you very much. The problem is that there are different arrays in the tuple and unless I can separate them I don't know how to convert the variants into Delphi variables. The lengths are not always as short as the sample and can indeed be very long. I was hoping to use something like aTmpvariant1 := myPlatTuple[0] aTmpvariant2 := myPlatTuple[1] etc, and then be able to individually decode these like aDelphiVal1 := aTmpvariant1[0], etc. but that does not work. Share this post Link to post
BennieC 0 Posted July 28, 2022 Apologies I solved the problem - just me being stupid. I misunderstood the GetItem method. All seems to be working now. Share this post Link to post