Complex sentence: He worked there for 18 years mainly portraying female characters.
Split into simpler sentences: He worked there for 18 years. There he mainly portrayed female characters.