Create Coordinate System

I wanted to create a coordinate system based on the point of origin and the Top plane, but without selecting anything.

I don't know how to create without having to select the plan before.

If I create based on the selection I lose the previous selection, and so I already have.

Need help

Ex:

value = instance.CreateCoordinateSystem(Origin, "", "", "Plane Top")

SolidworksApi/macros