|
solidworks preview in visual studio 2005
is it possible to show the preview of a solidworks file in visual studio 2005 form?
sldworks:getpreviewbitmap does not work outside solidworks application
any other way to display?
mathew varghese
flowserve
nope. the only way is to create a dll class library structured as a sw addin and add a public function that accepts your required parameters (model path, configuration name etc...) and then get the preview bitmap, save it to a file and return the saved path back to the calling object. make the class com visible, then from your app get the addin class object (getobject()), call the public function, and read in the bitmap from the saved location.
of course if you want to get even more complex you can just use windows low level system hooks to hook into the sw running instance, get a handle to the window class and call a win32 function to get that handles viewable area as an image stream.
both of these methods are fairly advanced so unless you understand what i have just said i wouldn't attempt it!
could always use the edrawings api to open the sw file assuming your clients are selecting some kind of file...
quick |
|