Notifications
Clear all
[Closed] GetValue(…) and arrays?
Nov 07, 2012 1:37 pm
I managed to retrieve data from my custom scripted objects with GetValue like
float mval;
pb2->GetValue(pD.ID,GetCOREInterface()->GetTime(),mval,FOREVER);
But what I should do if I wanna retrieve an array?
I’ve tried
float listValues[100];
pb2->GetValue(pD.ID,GetCOREInterface()->GetTime(),*listValues,FOREVER);
and
float listValues[100];
for(int k=0;k<100;k++)
pb2->GetValue(pD.ID,GetCOREInterface()->GetTime(),listValues[k],FOREVER);
But I had no luck with both tries. Any ideas? Thanks in advance.
4 Replies
2 Replies
you can’t. use tab index to get a value of the TAB.
virtual BOOL GetValue(ParamID id, TimeValue t, float& v, Interval &ivalid, int [b]tabIndex[/b]=0)=0;
Nov 07, 2012 1:37 pm
An array is just a pointer, so you should just have to pass the address of an array that has the same size as the one you want to retrieve.
1 Reply
Yes, that was my intention but I didn’t find the way to retrive a pointer.
Thank you anyway.