You can specify the Terse clause so that object IDs are returned instead of type, name, and revision. This is done with the Terse clause.
For example, the following command returns a list of object IDs for objects connected to the specified Part:
expand businessobject Part "35735" A terse;