"Modern Family" star Sofia Vergara stayed clear of the gym until she turned 40-years-old. The Columbian-born actress, known for her toned and curvy physique, recently dished to Shape magazine about her favorite workout machine, her love of cake and her body going "soft" after she reached a certain age.

"Everyone knows that I've never been into working out. I was always happy with what I have ... I mean, like any woman I'd complain that my thighs were too big or whatever, but I felt comfortable with my curves. Then I hit 40 and started seeing a softness everywhere on my body," Vergara, now 42, told Shape.

Since turning the big 4-0, Vergara said she now has a strict fitness regimen that includes her favorite machine, the Megaformer. She told Shape that the gym machine provides a strong resistance workout but is also easy on her knees.

Because Vergara isn't necessarily a fan of working out, she said that she gets a lot of inspiration from her "Modern Family" co-star, Julie Bowen.

"It has really helped to work with Julie Bowen, who is so disciplined. If we have to be on the set early, she wakes up even earlier to run. Me? I'll find any excuse to skip exercise. I'll say 'Sunday? No, it's the Lord's day. I can't work out.' I'll do anything - anything! - not to do it. But being around Julie and seeing how motivated she is ... I started to think more about it," she told the magazine.

Typically, Vergara sticks to a fairly healthy diet - she said living in Los Angeles made her get used to ordering sushi and salad - but every once in a while she indulges in some cake.

"I really need to have sweets," she said. "So I try to have them in moderation. When I do indulge, I exercise a bit harder the next day. My workout motto is really simple: No pain, no cake!"