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

EaBIM

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 9671|回复: 183
打印 上一主题 下一主题

Vault中的文件版本和关联

[复制链接]

1514

主题

7465

帖子

1万

积分

admin

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

积分
12404

社区QQ达人

跳转到指定楼层
楼主
发表于 2014-1-14 10:35:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

Doug的博客中又出了一篇新文章,该文章的目的是解释Vault中的几个让人困惑的概念:文件的版本和文件的关联。简单地说,就是用GetLatestFileAssociationsByMasterIds来返回最新的文件结构树,用GetFileAssociationsByIds返回指定版本的文件结构树。

下面是原文:

File Associations - Part 1


Welcome to part 1 in my 2 part series on file associations.  This post will focus only on the associations seen in the base version of Vault.  The next post will go over Vault Workgroup concepts like revisions and lifecycle states.

Introduction:
For base vault we have 2 concepts that are simple on their own, but start to get complex when you mix them together.  
The first concept is File Versions.  Every time you edit a file, you get a new version. Simple.
The second concept is File Associations.   Files can be linked to each other in a parent/child relationship.  This allows you to create dependency trees.  Again, simple.

Now let's mix the concepts together.  A file association is between one version of a file and another.  This means that the dependency tree might change for each version of a file.


                               
登录/注册后可看大图


Here is where the confusion starts.  You have a big chunk of data and multiple ways of traversing the data.  The good news is that the API has some built in tools to help you.

Example:
Let's go through a simple example.  First we upload 2 new files, A and B.  A is the parent of B.  This is what things look like in Vault:

                               
登录/注册后可看大图


Next we will check out B and check it back in with a new file, C.  B is the parent of C.  Our view now looks like this:

                               
登录/注册后可看大图


If we start at A and want to get the entire dependency tree, base Vault gives you 2 two types of traversals:

  • Snapshot in time:  You want to view the tree exactly as it looked when it was uploaded.  GetFileAssociationsByIds in the Document Service is the function that will give you this view.  If you started with file A and wanted all children, you would get this result:

                                   
    登录/注册后可看大图
  • Get latest:  You want to get the most recent version of all the files involved.  GetLatestFileAssociationsByMasterIds in the Document Service is the function that will give you this view.  If you started with file A and wanted all children, you would get this result:

                                   
    登录/注册后可看大图


That's all you need to know for base Vault.  My next post will go over the Revision and Lifecycle concepts and how they relate to file associations.



File Associations - Part 2


Welcome to part 2 in my 2 part series on File Associations.  In part 1, I went over the concepts in base Vault.  In this part, I will go over concepts added by Vault Workgroup.

New concepts:
Again we have 2 concepts that are simple on their own, but become complex when added to everything else.

First we have Revisions, which is a way to give meaning to a set of versions.  For purposes of this posting, I'll be using alpha characters for revisions and numeric characters for versions.


                               
登录/注册后可看大图


The next concept is Release States, which is a way of saying that a file is completed if it is in a certain lifecycle state.  At the API level, there is a boolean property on LfCycState which tells if the state is a release state or not.  A lifecycle definition usually has only one release state, but it is possible to have 0 or multiple release states. For the purposes of this posting, release states will have a darker color than the other states.

                               
登录/注册后可看大图



One final note:  The Vault clients are set up to update files associations only with the physical file changes.  If it's just a change to the Vault data (for example, changing lifecycle state) then the new file version points to the same files that the old version did.


Example:
Let's go over an example.  Here we have 2 files, a parent and a child.  Both files have gone through revision and lifecycle changes.  The arrows represent direct associations between the file versions.

                               
登录/注册后可看大图



The Vault API provides 5 ways to traverse this data.  In all these cases, we are starting at the Parent and asking for the entire dependency tree.

  • Get Latest - no release bias

                                   
    登录/注册后可看大图

    This is useful for CAD engineers who want the latest version of all the files so that they can work on them.
    At the API level, you call GetLatestFileAssociationsByMasterIds in the Document Service and pass in 'false' for the releasedBiased parameter.
  • Get Latest - release bias

                                   
    登录/注册后可看大图

    This is useful for people outside the CAD department who are not interested in the 'work in progress' data.  They just want to see the latest completed product.
    At the API level, you call GetLatestFileAssociationsByMasterIds in the Document Service and pass in 'true' for the releasedBiased parameter.
  • Snapshot in Time by Version

                                   
    登录/注册后可看大图

    This is useful in cases where you don't care about revisions.  The result is what you would get in base Vault, you only get the direct relationships between file versions.
    At the API level, you call GetFileAssociationsByIds in the Document Service.
  • Snapshot in Time by Revision - no release bias

                                   
    登录/注册后可看大图

    This gives you the latest version within a revision, regardless of the lifecycle state.
    At the API level, you call GetRevisionFileAssociationsByIds in the Document Service and pass in 'false' for the releasedBiased parameter.
  • Snapshot in Time by Revision - release bias

                                   
    登录/注册后可看大图

    This gives you the latest release version within a revision.  If no release version exists, the latest one in the revision is returned.
    At the API level, you call GetRevisionFileAssociationsByIds in the Document Service and pass in 'true' for the releasedBiased parameter.

Putting it All Together:
You should be properly confused by now.  However there are a rule that will simplify things.


Rule:  When dealing with revisions, think in terms of revisions.  Don't think in terms of versions.


Behind the scenes, revisions only care about 2 versions:  the latest version in the revision and the latest release version in the revision.  Many times these 2 are the same thing.  When thinking in terms of revisions, you need to forget about all other versions.  

So let's redo the dependency tree for 4 and 5, this time viewing things in terms of revisions.

There, much better.


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 转播转播 分享分享 分享淘帖 支持支持 反对反对
工作时间:工作日的9:00-12:00/13:30-18:00,节假日不在线,请勿留言

14

主题

2892

帖子

2085

积分

BIM经理

Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

积分
2085
推荐
发表于 2016-3-16 10:38:03 | 只看该作者

♪(^∀^●)ノ不错噢!!

6

主题

701

帖子

1171

积分

BIM项目负责人

Rank: 5Rank: 5Rank: 5Rank: 5Rank: 5

积分
1171
8F
发表于 2014-2-25 11:01:41 | 只看该作者
路过!!!
不发表意见……

2

主题

897

帖子

1365

积分

BIM经理

Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

积分
1365
13F
发表于 2014-2-25 11:11:34 | 只看该作者
路过!!!
不发表意见……
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-23 10:54

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

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