Yes and no.
Both play an important role, but i'm going to say get the system with the better graphics
If its a laptop with a decent graphics card, chances are it isn't going to come with a terrible CPU. Modern CPUs are fairly powerful - a current generation core i5 is roughly as powerful as a previous generation one, (i don't really use AMD, but the same is likely true - an AMD box with a discrete graphics option isn't going to suck).
As for the direct effect of the graphics card, it depends - a quick check indicates that solidworks IS GPU accelerated, so getting a decent graphics option is a good idea - its more likely the discrete option will be supported.
Also, don't forget you can't 'just' swap out the graphics in a laptop - you're stuck with it (you can't upgrade the CPU either, but i'm supposing the CPU IS powerful enough).
I'd suspect the best system for this would be a gaming laptop, but your milage (and budget) may vary.