If the whole assembly is designed about the origin, mate is not required.
Fixed is faster and more stable.
It is possible with API, but it is not a trivial task I am afraid, and will be outside of the macro scope as it would be better to do with SOLIDWORKS add-in. The task can be simplified if only simple mates to be applied (i.e. concentric and coincident) and if components will be in the exact position for mating.
HI Chen,
Kindly elaborate your problem.
-Abilash