GetAllowedRelations

Has anyone used the SketchRelationManager.GetAllowedRelations(object Entities) function sucessfully in the c# language?

Here's how I am attempting to do it after getting the active sketch object:

//create sketch relation manager

_SketchRelationManager = _Sketch.RelationManager as SketchRelationManager

//declare an array of objects that is equal to the length of # of selected objects

_Objects = new object[_SelectManager.GetSelectedObjectCount2(-1)]

//populate that array with each selected object

for (int i = 1; i <= _Objects.Length; i++)

{

_Objects[i - 1] = _SelectManager.GetSelectedObject6(i, -1)

as object;

}

object[] _AllowedRelations = null;

//cast the allowed objects into an array of objects

_AllowedRelations = (object[])_SketchRelationManager.GetAllowedRelations(_Objects);

Everything works fine but the last line which always returns a null value.  According to the API help the parameter for the GetAllowedRelations function is of type object; however, the remarks say it should be an array of objects?

SolidworksApi macros