Let's consider $\mathfrak h$ the Cartan subalgebra of $\mathfrak{sl}_n(\mathbb C)$ consisting of diagonal matrices. This is just to fix ideas, I'm more interested in a method than in this case.
Now the goal is to find the weights of $\mathfrak{sl}_n(\mathbb C) $ as a $\mathfrak h$-module. I found an answer here.
But how to proceed apart from trying to guess maps that make sense ? For example I personally tried summing the diagonal entries at first. And in cases where we have a different subalgebra it may be less clear what to do.
Since it's a generalization of eigenvalues and eigenspaces is there a systematic way to do it with matrices, instead of guessing the weights ?