Cycling74 / max-sdk

Software Development Kit for Max by Cycling '74
Other
262 stars 57 forks source link

Cannot get path of patcher #63

Open shakfu opened 11 months ago

shakfu commented 11 months ago

In the Max-api docs. There's a section in "Scripting the Patcher" which gives the following:

Patcher Name and File Path

To obtain the name of the patcher and its file path (if any), obtain attribute values as shown below.

t_symbol *name = object_attr_getsym(patcher, gensym("name"));
t_symbol *path = object_attr_getsym(patcher, gensym("filepath"));

These attributes may return NULL or empty symbols.

I am always getting no value from the "filepath" attribute even though I am able to get a value by sending the [thispatcher] object a path message.

Why give this example if this doesn't work?