2012版Workset的新功能

 

关于之前提到 REVIT 2012 版本
可以针对工作集找出相关资料
但我试过使用 "RevitLookup" 并未发现相关的资料
不知道这版本是否仍未对此部份加入引用呢?
另外HELP中,虽然可以查到 "Workset Class" 类别资料
但是否有案例可以参考呢?

 

答:

Revit2012版的REvitlookup工具没有使用的workset这个属性。在2012版提供了丰富的workset 操作API。在SDK中还没有示例代码,这个用法比较直接,应该容易理解。下面是帮助的引用。

Several new classes were added to provide access to worksharing information in the document:

  • Workset - Represents a workset in the document. Worksets are a way to divide a set of elements in the Revit document into subsets for worksharing.
  • WorksetId - Identifies a workset within a single document.
  • WorksetKind - An enumerated type that indicates one of the standard kinds of workset (as available in the UI).
  • WorksetTable - A table containing references to all the worksets contained in a document.
  • WorksetVisibility - An enumerated type that indicates the visibility settings of a workset in a particular view.
  • WorksetDefaultVisibilitySettings - An object that manages default visibility of worksets in a document.
  • FilteredWorksetCollector - This class is used to search, filter and iterate through a set of worksets. Developers can assign a condition to filter the worksets that are returned. If no condition is applied, it attempts to access all the worksets in the document.
  • FilteredWorksetIdIterator - An iterator to a set of workset ids filtered by the settings of a FilteredWorksetCollector.
  • FilteredWorksetIterator - An iterator to a set of worksets filtered by the settings of a FilteredWorksetCollector.
  • WorksetFilter - A base class for a type of filter that accepts or rejects worksets based upon criteria.
  • WorksetKindFilter - A filter used to match worksets of the given WorksetKind.
  • ElementWorksetFilter - A filter used to match elements which reside in a given workset (use this filter with FilteredElementCollector).
  • WorksharingUtils – access to information about a work-shared document.
  • WorksharingTooltipInfo – basic read-only information about a work-shared document, such as owner, creator, etc.

Some related additions were made to existing classes:

  • Document.GetWorksetTable() - Gets the WorksetTable of this document. There is one WorksetTable for each document.
  • Document.GetWorksetId(ElementId id) - Gets the id of the Workset which owns the element.
  • Element.WorksetId - Gets the id of the workset which owns the element.
  • View.GetWorksetVisibility(WorksetId worksetId) - Returns the visibility settings of a workset for this particular view.
  • View.SetWorksetVisibility(WorksetId worksetId, WorksetVisibility visible) - Sets visibility for a workset in this view. This setting overrules implicit visibility of the workset for this particular view.
  • View.IsWorksetVisible(WorksetId worksetId) - Indicates whether the workset is visible in this view.

In addition, there is API support for the new 2012 worksharing visualization functionality:

  • View.SetWorksharingDisplayMode and View.GetWorksharingDisplayMode allow the API to control which worksharing display mode is enabled in the view.
  • WorksharingDisplaySettings allows getting and setting the specific graphic overrides that will be applied in the various worksharing display modes.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值