蒹葭苍苍,白露为霜。
所谓伊人,在水一方。

Inventor API调用缩略图Thumbnail

 方法一:iproperty中获取

Dim invPartDoc As Document = _invApp.ActiveDocument
        Dim ifilename As String = invPartDoc.FullDocumentName
        Dim apprentice As New ApprenticeServerComponent
         Dim doc As ApprenticeServerDocument
        doc = apprentice.Open(ifilename)
        Dim summaryInfo As PropertySet
        summaryInfo = doc.PropertySets.Item(
        Dim thumbProp As Inventor.Property
        thumbProp = summaryInfo.Item("Thumbnail")
        Dim thumbnail As stdole.IPictureDisp
        thumbnail = thumbProp.Value
        Dim img As Image = VB6.IPictureDispToImage(thumbnail)
        PictureBox1.Image = img

方法二:文档成员中获取

  Dim invPartDoc As Document = _invApp.ActiveDocument
        Dim ifilename As String = invPartDoc.FullDocumentName
        Dim apprentice As New ApprenticeServerComponent
        Dim doc As ApprenticeServerDocument
        doc = apprentice.Open(ifilename)
        Dim thumbnail As stdole.IPictureDisp
        thumbnail = doc.Thumbnail
        Dim img As Image = VB6.IPictureDispToImage(thumbnail)
        PictureBox1.Image = img

这两货都能实现对缩略图的调用。可能在某些环境下会有限制,暂未发现其他限制条件。不过,都得使用ApprenticeServer才能获取。

赞(0) 打赏
未经允许不得转载:酷居科技 » Inventor API调用缩略图Thumbnail

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

锦瑟无端五十弦,一弦一柱思华年

酷居科技联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏