请问老师:能否提供未公开的API清理dgn文件中残余的ColorBook?谢谢。
残余ColorBook产生的一些问题,在以前英文的帖子中已有描述:
1. Invasion of unwanted colors
https://communities.bentley.com/products/programming/microstation_programming/i/microstation-programming---ideas/invasion-of-unwanted-colors
After using any of colorbook colors it is not possible to get rid of this color afterwards. For example if color white is used from colorbook then all elements which previously used RGB white are changed to colorbook. Even if element is deleted the color remains in file forever and even infects other files if they are merged. Either the compress option should allow to get rid of unused colors/reset colorbooks to RGB or the programming API should be updated so we can access these colors. This issue is critical because it limits usage of RGB and colorbook colors.
Details: There is a additional issue to TR 307809 that if colorbook colors are once used then every matched RGB color is replaced by it. It is unwanted as we want to use only RGB and not colorbook values. Even if element which used the colorbook is deleted the original RGB values are no longer available. It is becoming more and more critical as lot of files are now invaded with such colors without option to remove them. Capability restrictions doesn't allow to avoid this either as colorbooks are invaded also from DWG sources.
Change request: Additionally to compress option which would remove only unused colors there is also need to reset back colorbooks to RGB values for existing elements so this is different issue as requested in TR307809
Reference:TR 307809,Defect Number 143129
TR # 13427
2. Remove unused color books/RGB
https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/94592/v8i-remove-unused-color-books-rgb/301325#301325
管工:您好!
ColorBook(不是ColorTable)一般仅用于专业的印刷行业,在我们工程行业几乎没有见到过谁用过的。我查了内部TFS系统,该Defect虽然已经被Approved,但并未得到解决。
推测还是这个ColorBook用得人太少导致的。您现在单位要启用这个ColorBook功能吗?
嗯。主要是便于给不同的设备配色,以便于后期渲染.
有没有相关的api可以清理dgn文件中未使用到的colorbook的?
我通过添加ColorBook前后DictModel里边的元素对比发现多了66类型的元素,通过代码删除这个元素缺失达到删除了ColorBool的目的,但是不清楚是否会影响到其他数据。