AnsweredAssumed Answered

GetPreviewBitmap AxHost Class not licensed

Question asked by Troy Szatkowski on Apr 6, 2018
Latest reply on Apr 10, 2018 by Artem Taturevych

2015 SOLIDWORKS API Help - Get Preview Bitmap of Drawing Sheet Example (VB.NET)

My DocumentMgr key works for the Doc Manager, but the AxHost I am unsure of.


I am receiving an error with the AxHost in Class to get the picture.

Error: Class is not licensed for use (Exception from HRESULT: 0x80040112)

Where exactly is this license supposed to come from?



Class PictureDispConverter

     Inherits System.Windows.Forms.AxHost


     Public Sub New()




     End Sub

     Public Shared Function Convert(ByVal objIDispImage As Object) As System.Drawing.Image


          Dim objPicture As System.Drawing.Image


          CType(System.Windows.Forms.AxHost.GetPictureFromIPicture(objIDispImage), System.Drawing.Image)


          Return objPicture


     End Function