The profilemethod returns a set of profile definition values, one for each profile assigned to the object:

<result> = <object>.profiles( [<expand>] )


<object>

A value of type Object or an expression that evaluates to a value of that type.

<expand>

(Optional) A value of type boolean or an expression evaluating to a value of that type: whether or not to expand the "basic profile" and always return the actual profile assigned to this object.

<result>set with elements of type ProfileDefinition: the profiles assigned to <object>.

 

When a profile is marked as "hidden", this profile will not be shown in the property window, and any attributes it defines are instead placed under the virtual "basic profile". By default, the profiles method will return "basic profile" when an assigned profile is found to be "hidden" (aggregating multiple hidden profiles into one instance of "basic profile"). When it is necessary to know the original, defining profile definitions, use profiles(true).

It is possible to infer which profiles are assigned by using the attrs method to retrieve the attributes of an object, and then using the profile method on each attribute to get its defining profile. However, because a profile does not have to define any attributes, this list might not be complete. The profiles method will return all assigned profiles, whether they define attributes or not.