Pascal script - CreateHeapVariant for RECORD

Hi guys!

I’m trying to create a heap variable for a TRect type, what is a record.

How can I assign the value for this variable?

This is a example how I’m doing to create a string variable:

          Param := CreateHeapVariant(fExec.FindType2(btString));
          PPSVariantAString(Param).Data := AnsiString('test value');

I need this to call the “fExec.RunProc” in my internal script solution (a report generator).

Thanks, and congratulations on your product!

Solved with:

var
myRecordValue: TMyRecord;

Param := createHeapVariant(fExec.FindType2(btRecord));
move(myRecordValue, PPSVariantRecord(Param).data, sizeof(TMyRecord));