Count stars within subsector

Hi everyone. Is there a way of doing this easily? Thanks in advance.

Comments

  • In the program menu:

    "Filters -> Subsectors -> Hide all Subsectors" to hide all systems within all subsectors
    "Filters -> Subsectors -> Hide unassigned systems" to hide all systems not within subsectors

    Then:

    "Filters -> Subsectors" and select the subsector in question to make only those systems in the subsector visible. In the title bar of the main window, it'll say something like "100 system, 12 visible". That 12 visible is the number of systems in a subsector.

    If you want do do this in a script (since posted this in the scripting group):

    The subsector class has an "inSubsector()" function that you can pass a point into and it will tell if that point is within the subsector. So you'd iterate the subsectors in the map to find the one you are looking for. Then iterate all systems in the map, passing their position into the inSubsector() function to count how many are in it.

Leave a Comment