SolidWorks is probably the best option for a dwg to sldprt conversion as both of the formats are supported in the program, and .sldprt files are even one of the default file types. If you do not have access to Solidworks, you will have to rely on some 3rd party alternative or a dedicated converter.
Convert AutoCAD drawing to SolidWorks CAD part.
We found 4 software records in the database related to .dwg to .sldprt file format conversion.
Microsoft Windows software - convert dwg to sldprt on Windows
A 2D and 3D CAD construction software
Convert from dwg file format
The tables with software actions are a good pointer for what a certain program does with various file types and often may give users a good hint how to perform certain file conversion, for example the above-mentioned dwg to sldprt. However, it is not perfect and sometimes can show results which are not really usable because of how certain programs work with files and the possible conversion is thus actually not possible at all.
A set of 3D modeling tools
A CAD converter with huge format support
Multiplatform software - convert dwg to sldprt on any platform
3D CAD/CAM tool for product development