EaBIM一直以来积极响应国家“十二五”推进建筑业信息化的号召,对建筑领域的信息技术开展深入技术交流和探讨!致力于打造“BIM-建筑师-生态技术”三位一体综合资源交流共享平台,希望为BIM与可持续设计理念及技术的普及做出微小的贡献!!!

EaBIM

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 731|回复: 1
打印 上一主题 下一主题

Revit中类似Autocad的Xdata空间

[复制链接]

1514

主题

7465

帖子

1万

积分

admin

Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10

积分
12396

社区QQ达人

跳转到指定楼层
楼主
发表于 2014-1-9 13:22:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
在Revit2011和之前的版本中,可以通过Shared Parameter来保存客户额外的数据。请看Revit的帮助。SDK中的CreateShared例子演示了其用法。
但是他有一个限制,就是只能想一个类别的对象添加数据,比如像墙添加一个共享参数,那么所有的墙都会有你添加的共享参数。不管你是否需要。
到了REvit2012, 有一个非常强劲的功能就是Extensible Storage功能。使用这个API可以只对你需要的对象添加数据。比如只对模型中的几个墙添加数据。具体请参考Revit帮助文档。 SDK中ExtensibleStorageManager例子演示了用法。
The Revit API now allows you to create your own class-like Schema data structures and attach instances of them to any Element in a Revit model. This functionality can be used to replace the technique of storing data in hidden shared parameters. Schema-based data is saved with the Revit model and allows for higher-level, metadata-enhanced, object-oriented data structures. Schema data can be configured to be readable and/or writable to all users, just a specific application vendor, or just a specific application from a vendor.
The extensible storage classes are all found in Autodesk.Revit.DB.ExtensibleStorage
Autodesk.Revit.DB.ExtensibleStorage.SchemaBuilder -- Used to create Schemas definitionsAutodesk.Revit.DB.ExtensibleStorage.Schema --Contains a unique schema identifier, read/write permissions, and a collection of data Field objects.Autodesk.Revit.DB.ExtensibleStorage.Field  -- Contains data name, type, and unit information and is used as the key to access corresponding data in an ElementAutodesk.Revit.DB.ExtensibleStorage.FieldBuilder -- A helper class used with SchemaBuilder used when creating a new field.Autodesk.Revit.DB.ExtensibleStorage.Entity -- An object containing data corresponding to a Schema that can then be inserted into an Element.The following data types are currently supported:
intshortdoublefloatboolstringGuidElementIdAutodesk.Revit.DB.XYZAutodesk.Revit.DB.UVAutodesk.Revit.DB.ExtensibleStorage.Entity (An instance of another Schema, also known as a SubSchema)Array (as a System.Collections.Generic.IList<T>)Map (as a System.Collections.Generic.IDictionary<TKey, TValue> – all types are supported for keys except double, float, XYZ, and UV

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 转播转播 分享分享 分享淘帖 支持支持 反对反对
工作时间:工作日的9:00-12:00/13:30-18:00,节假日不在线,请勿留言
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|EaBIM网 ( 苏ICP备2020058923号-1  苏公网安备32011502011255号

GMT+8, 2024-9-29 12:25

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表