Revit 文件缩略图

 

你好,请教一个问题,通过API,我能不能取到族文件的缩略图,谢谢,如果能取,该怎么取?
这个问题请看Jeremy Tammik 和Guy Robbison的博文。下面是引用Jeremy的博文
The topic of getting your Revit thumbnails was already been discussed by Guy Robinson in Bolt out of the Red, but for completeness sake I will partially reiterate it here as well, since the query keep reappearing.

The Revit API does not provide any built-in support for this, but you can make use of generic Windows API functionality instead. Revit project files use Windows structured storage to manage resources internally. You can use the DocFile Viewer utility dfview.exe to look at the structured storage file contents. Here is an example of a Revit project file with the preview image highlighted:

RVT file structured storage and preview image in dfview.exe

We had a short look at the internal RVT file structure when exploring how to extract the Revit build version from RVT and RFA files.

The thumbnail is a standard PNG file inserted into the Revit structured storage document.

To extract the preview thumbnail image, you can use the Windows IExtractImage interface. Preview.dll is a shell plug-in, i.e. an object that implements this interface. It is used by the Windows Shell Folders to extract preview images for "known" file types. The preview extractor needs to register itself in the registry and implement the two following standard API functions:

  STDMETHOD(GetLocation)(
    LPWSTR pszPathBuffer,
    DWORD cchMax,
    DWORD *pdwPriority,
    const SIZE *prgSize,
    DWORD dwRecClrDepth,
    DWORD *pdwFlags);

  STDMETHOD(Extract)(HBITMAP*);

More details and sample code are available from Guy's post.


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
ifc文件是一种用于建筑信息交换的开放文件格式,而Revit是一款功能强大的建筑设计和信息建模软件。将ifc文件转化为Revit文件可以实现将建筑信息从一个平台转移到另一个平台,便于在Revit平台上进行建筑设计、协作和管理。 ifc文件转化为Revit文件有几种方法。一般来说,可以通过以下步骤来完成转化: 1. 打开Revit软件,在菜单栏选择“导入”选项,找到并选择要转化的ifc文件。 2. 在弹出的对话框中,可以设置导入选项,如图层、单位等,根据需要进行调整,并点击“导入”按钮。 3. Revit软件将根据ifc文件的结构和属性,将其转化为Revit项目中的对象和元素。转化后的文件可以在Revit中进行编辑、设计和分析等操作。 4. 在导入完成后,可以根据需要对Revit文件进行进一步调整。Revit提供了丰富的建筑设计工具和功能,可以利用这些工具进行项目构建、模型检查、可视化等任务。 值得注意的是,ifc文件转化为Revit文件可能会导致一些信息的损失或变形。因此,在进行转化之前,建议进行备份,并在转化后对导入的Revit文件进行验证,确保数据的准确性和完整性。 总结起来,将ifc文件转化为Revit文件可以实现建筑信息的跨平台转移,方便在Revit平台进行建筑设计和协作。然而,转化过程中需要注意信息损失和验证数据的准确性。这种转化的方法和步骤可以根据软件版本和特定要求进行调整和修改。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值