Table Access

Aug 3, 2012 at 6:46pm

Table Access

Hi there,

I have thoroughly looked at the Max SDK docs and found (almost) everything about table.
So obviously table_get() is the function I want. However I need one more piece of information that table_get() does not provide.

How do I get the range of a table object ?

Thanks.

- Luigi

#63840
Aug 4, 2012 at 3:18pm

AFAIK there’s no way to do this officially. Maybe we can add this to the SDK but I can’t make any promise. In the meantime, you can iterate through the patcher, looking for any table object whose attribute name corresponds to what you’re looking for, and ask for the range attribute. Should be a fun exercise ;-)

#230224
Aug 4, 2012 at 4:09pm

Or an easier way might be to initialize a table object in your C code with the appropriate name and query that object, hence you would spare the need of iterating through the patcher. Since tables with the same name should hold the same information, theoretically it should return the same range as any other table sharing the same name. However, I didn’t test this solution, use it at your own risk.

HTH,
Ádám

#230225
Aug 4, 2012 at 10:09pm

OK, thanks guys…
It would be nice to have it added to the SDK, since when working with tables the range is almost always a much needed parameter.

- Luigi

#230226

You must be logged in to reply to this topic.