Your guess is correct, the method shown here assumes you are in the model that contains the ceilings, and as indicated here, coloring of linked elements is not currently possible within the API
There is an alternative approach that i could think of.
-Get Ceiling Boundaries
-Get heights
-Create Filled region in view that colors them based on that.
A nugget here for the filled region creation.
Good Luck!