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

萧闫子 发表于 2014-1-15 13:27:38

在revit中有类似autocad的 xdata 空间可以增加额外资料的地方吗?

在Revit2011和之前的版本中,可以通过Shared Parameter来保存客户额外的数据。请看Revit的帮助。SDK中的CreateShared例子演示了其用法。但是他有一个限制,就是只能想一个类别的对象添加数据,比如像墙添加一个共享参数,那么所有的墙都会有你添加的共享参数。不管你是否需要。
到了REvit2012, 有一个非常强劲的功能就是Extensible Storage功能。使用这个API可以只对你需要的对象添加数据。比如只对模型中的几个墙添加数据。具体请参考Revit帮助文档。 SDK中ExtensibleStorageManager例子演示了用法。
Extensible StorageThe 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 definitions
[*]Autodesk.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 Element
[*]Autodesk.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:
[*]int
[*]short
[*]double
[*]float
[*]bool
[*]string
[*]Guid
[*]ElementId
[*]Autodesk.Revit.DB.XYZ
[*]Autodesk.Revit.DB.UV
[*]Autodesk.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
作者:叶雄进文章来源:http://blog.csdn.net/joexiongjin/article/category/782739

静儿 发表于 2014-2-20 14:10:29

顶!!!!!!!!!!
页: [1]
查看完整版本: 在revit中有类似autocad的 xdata 空间可以增加额外资料的地方吗?