to assign a planet to a faction afaik you need the nexerelin mod then you can setmarketowner to a faction. same as before: list factions...
I know this, but I wanted to make an unpopulated planet populated and then give to a faction and you cant do that in the method you suggest. I already tried this.
I have nexerilin mod.
Here is what I did.
I spawned the planet.
I went to the planet.
The planet options window opened up "survey, mine etc".
I opened the console.
setpopulation 4
setmarketsize 4
addsubmarket open_market
Now would be the "setmarketowner [market name here] [faction name here]" phase.
But you cannot, because it has no "market". A "market" in the game logic is a planet already colonised with a faction. The "open_market" is not considered a market for the "setmarketowner" command.
I was hoping for a way to bypass the colonisation phase because I didn't want to start my own faction at that time. Now I have made one it doesn't matter anymore.
I still want to know if it is possible (and how) for future reference.
Edit
Thanks for trying to help though.