查看: 3109|回复: 5

Revit2010小点心:自定义快捷命令要点

[复制链接]

发表于 2009-11-1 00:12:47 | 显示全部楼层 |阅读模式
大家可能已经发现,在Revit2010快捷命令文件里面有不少命令重复出现在KeyboardShortcuts.txt(该文件和Revit.exe位于同一目录下)文件里面。这些重复出现的命令是因为他们出现在Revit菜单的好几个地方。这样一来,会造成自定义快捷命令的时候非常困难,因为对于有一千多行的文件来说,极容易出现对同一个命令定义了好几种快捷命令。如果没有正确修改快捷键命令文件, 最终有可能出现连自己都搞不清楚起作用的是哪个快捷命令,或者修改了的一个快捷命令不起作用。

如何才能避免这种情况呢?

我发现有个老外专门做了个工具来处理重复的情况,其实我觉得没有那么复杂。
我的方法很简单,只要修改的时候注意:只修改KeyboardShortcuts.txt文件里面第一个出现的那个命令的快捷键就可以了。可以通过文件编辑器的从开始搜索就能实现。这是因为Revit只认第一个,我没有记错的话,AutoCAD也是是一样的。
回复

使用道具 举报

 楼主| 发表于 2009-11-1 00:12:47 | 显示全部楼层

Revit2010小点心:自定义快捷命令要点

如果有兴趣的话也可以研究一下老外的工具,个人觉得还是有点意思。我自己还把这个工具给汉化了一下(用的是中文的KeyboardShortcuts.txt文件),附件中有两个文件,一个原版,一个汉化版。

下面是老外的说明:
Please find attached an Excel spreadsheet I am using for development of RAC 2010 Keyboard Shortcuts. As many have discovered, many commands are repeated over and over as they exist on different ribbon menus. As such, developing a workable list is difficult since duplicate commands can easily get different key assignments as one moves about in a text file with over 1,400 lines.

Within this XLS - the blue area is what one copies to a true TXT file. The green area is where one customizes to their own desires. The orange area contains a list of ribbon entries but without the duplication. To the right of the green area is the out-of-the-box shortcuts.

Again - you only edit in the green, no where else.

For any given row, the XLS will use the OOTB entry until a custom one is created. As custom entries are made, they are checked against the entire list for duplicate keycuts. If a duplicate is found above, it then checks against the ribbon placement. If the ribbon is the same, the new keycut is left as is. If the ribbon is different, the keycut is made red.

In a nutshell (I may have confused you more just then), you start out with OOTB keycuts. You find a command you want to customize and do so. Soon as you do that, all matching commands below get that same customization (superceding their own line OOTB entry). And if you use the duplicate removed column for commands, you never will have to "look" at already adjusted commands.

Another \'perk\' of this is the blue column will start by showing the uppermost OOTB keycut. Even if Autodesk called a lower placed ribbon by a different keycut, it will use the uppermost - thus disabling the practice of 2 different keycuts for the same command.

I have placed a couple sample conditions in the custom column to show this functionality. The big thing here is, green is good, red is bad. Now I will say there are some commands that are duplicated in ribbon form but with different ribbon strings - so in some cases red can be right (same command but different ribbon strings). Sigh...not sure what else I can do about that. When you find red cells, investigate and perhaps override if needed.

Comments are welcome. I have started a new thread for this to 1) restrict topic to the XLS and 2) to keep track when future RAC versions are released.
回复 支持 反对

使用道具 举报

发表于 2009-11-1 00:12:47 | 显示全部楼层

Revit2010小点心:自定义快捷命令要点

恩,不错。下个下来看看
回复 支持 反对

使用道具 举报

发表于 2009-11-1 00:12:47 | 显示全部楼层

Revit2010小点心:自定义快捷命令要点

谢谢分享,学习之中
回复 支持 反对

使用道具 举报

发表于 2010-11-23 08:24:01 | 显示全部楼层
在选项里也可以设置快捷键,只需要按过滤器选择对应制表位修改就行了
回复 支持 反对

使用道具 举报

发表于 2010-11-23 23:13:23 | 显示全部楼层
值得学习啊,可惜英文太烂了……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则