Detect all compartments names from the code records. Only for model instantiation. Not exported.
getCompartments(records)
records
code records
a list of compartments