{"id":8243,"date":"2022-02-14T01:13:36","date_gmt":"2022-02-14T01:13:36","guid":{"rendered":"https:\/\/max-drake.cc\/?p=8243"},"modified":"2022-03-29T19:26:48","modified_gmt":"2022-03-29T19:26:48","slug":"keyboard-shortcut-xml-file-simplifying-merging-resetting-to-original","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=8243","title":{"rendered":"Keyboard Shortcut  XML file simplifying &#038; merging &#038; resetting to original"},"content":{"rendered":"\n<p>I had made some additions to Revit KeyboardShortcuts.xml file and the file is quite big. Only some of the functions have a Keyboard Shortcut . So I wanted to create a   KeyboardShortcuts.xml file that would only have my additions, so that when a person merged them in they were not going to bloat the ones they already have. <\/p>\n\n\n\n<p>To try and minimise conflict I have made all my Keyboard Shortcut   min 3 and up to 5 digits long. I may need to adapt some of the code so that they are as long as they can be so they are easily removed if required. <\/p>\n\n\n\n<p>I was also looking at getting the original Keyboard Shortcut  DEFAULT settings and found a Autodesk Article on how to do this , actually its quite easy. <\/p>\n\n\n\n<p>I tried doing a filter with the Keyboard Shortcut s pop up to only show defined ones , then tried exporting Keyboard Shortcuts but it only exported the whole file, regardless of whether it had Keyboard Shortcuts or not. <\/p>\n\n\n\n <meta http-equiv=\"content-type\" content=\"text\/html; charset=\"> \n      <p>\n\t<div class=\"su-box su-box-style-glass\" id=\"\" style=\"border-color:#0f5897;border-radius:5px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#428bca;color:#FFFFFF;border-top-left-radius:3px;border-top-right-radius:3px\">PowerKey4Revit &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Free 30 day Trial<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:3px;border-bottom-right-radius:3px\">\n\t<div class=\"su-list\" style=\"margin-left:0px\">\n<\/p><ul>\n<li><i class=\"sui sui-star\" style=\"color:#428bca\"><\/i> Speed up the tedious stuff and enjoy designing and documentation more<\/li>\n \t<li><i class=\"sui sui-star\" style=\"color:#428bca\"><\/i> Works in all versions of Revit<\/li>\n<li><i class=\"sui sui-star\" style=\"color:#428bca\"><\/i> Information to PROVE your increased speed<\/li>\n<\/ul>\n<\/div>\n\t\n\t<a href=\"https:\/\/datacapture.tk?utm_source=websiteArticle&#038;utm_medium=web&#038;utm_campaign=PushTrafficToSite20220330&#038;utm_id=PowerKey4Revit\" class=\"su-button su-button-style-glass\" style=\"color:#FFFFFF;background-color:#428bca;border-color:#3570a2;border-radius:6px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:0px 18px;font-size:14px;line-height:28px;border-color:#7baeda;border-radius:6px;text-shadow:none\"> PowerKey4Revit Free 30 day Trial<\/span><\/a>\n<div class=\"su-spacer\" style=\"height:20px\"><\/div> \n\t\n<div class=\"su-spoiler su-spoiler-style-modern-light su-spoiler-icon-plus-circle my-custom-spoiler su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>PowerKey4Revit VIDEO <\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\"><div class=\"su-youtube su-u-responsive-media-yes\"><iframe width=\"600\" height=\"400\" data-src=\"https:\/\/www.youtube.com\/embed\/1eFJAzWhOLU?\" frameborder=\"0\" allowfullscreen allow=\"autoplay; encrypted-media; picture-in-picture\" title=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe><\/div><\/div><\/div>\n\t\t<\/div><\/div>\n\t \n\n\n\n<h3 class=\"wp-block-heading\" id=\"cleaning-a-xml-file-with-excel\">Cleaning a .XML file with Excel <\/h3>\n\n\n\n<p>I initially tried to slim down the .XML file by using Notepad++ and made a reasonable effort with it. I then found that you can open an .XML file in Excel, use filters on it and then save it back as a .XML file. <\/p>\n\n\n\n<p>I found there were a few steps to take but in the end it was the quickest way to do all the work. <\/p>\n\n\n\n<p>I was initially going to try and split the imported cells out using split() but the &#8220;Shortcut=&#8221; spread across multiple columns and so it was hard to clean up. <\/p>\n\n\n\n<p>Mty second attempt was to use find\/replace, but what I really needed was Find &amp; delete all the items not in the Find query. In the end the Filter was the method I used, following the video below and looking for NOT CONTAINS with *Shortcut=*&#8221; as the search. So it found every other row without the &#8220;Shortcut=&#8221;  in the row. <\/p>\n\n\n\n<div class=\"su-youtube su-u-responsive-media-yes\"><iframe width=\"600\" height=\"400\" data-src=\"https:\/\/www.youtube.com\/embed\/wMlTDXPEjag?\" frameborder=\"0\" allowfullscreen allow=\"autoplay; encrypted-media; picture-in-picture\" title=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe><\/div><div class=\"su-spacer\" style=\"height:20px\"><\/div> <\/p>\n\n\n\n<p>Then I could delete all of those rows and only be left with the ones I wanted. I found the video below a really easy method to get rid of all the empty rows:<\/p>\n\n\n\n<div class=\"su-youtube su-u-responsive-media-yes\"><iframe width=\"600\" height=\"400\" data-src=\"https:\/\/www.youtube.com\/embed\/gLO0Xcxklyc?\" frameborder=\"0\" allowfullscreen allow=\"autoplay; encrypted-media; picture-in-picture\" title=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe><\/div><div class=\"su-spacer\" style=\"height:20px\"><\/div> <\/p>\n\n\n\n<p>Then I saved the Excel Sheet to a .xml file format. <\/p>\n\n\n\n<p>I then further filtered out the Shortcut= Column to only shorter 1 or 2 letter keys and then deleted those , then followed the procedure of deleting those empty rows as per the vid above. Some Keyboard Shortcut s had multiple keys and they were shown as ZE#ZA#ZOO1 so these stayed and had to be deleted manually. <\/p>\n\n\n\n<p>After figuring out the process it was easy to clean up the file to the size I need, now I can test those Keyboard Shortcuts in a merge with my Keyboard Shortcut  file and also reset my Keyboard Shortcut  file to the original and test it on that one too.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"resetting-keyboardshortcuts-xml-to-original-file\"> Resetting KeyboardShortcuts.xml to original file <\/h3>\n\n\n\n<p>There is a main article on Keyboard Shortcuts and options <a href=\"https:\/\/help.autodesk.com\/view\/RVT\/2021\/ENU\/?guid=GUID-39D549F2-75EE-4C06-8B6A-3DADE1FBEF59\" class=\"su-button su-button-style-glass\" style=\"color:#FFFFFF;background-color:#e12613;border-color:#b41f10;border-radius:6px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:0px 18px;font-size:14px;line-height:28px;border-color:#ea685a;border-radius:6px;text-shadow:none\"> Keyboard Shortcuts Info<\/span><\/a><div class=\"su-spacer\" style=\"height:20px\"><\/div>\n\n\n\n<p>There is also an article on resetting Keyboard Shortcuts back to default , which is very easy to do  <a href=\"https:\/\/help.autodesk.com\/view\/RVT\/2021\/ENU\/?guid=GUID-27143ABA-B3CC-4328-A481-0A5E330E34EC\" class=\"su-button su-button-style-glass\" style=\"color:#FFFFFF;background-color:#e12613;border-color:#b41f10;border-radius:6px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:0px 18px;font-size:14px;line-height:28px;border-color:#ea685a;border-radius:6px;text-shadow:none\"> Reset Revit Keyboard Shortcuts to Default<\/span><\/a><div class=\"su-spacer\" style=\"height:20px\"><\/div>\n\n\n\n<p>When you import a KeyboardShortcuts.xml file you have the option to either OverWrite or merge. See this article <a href=\"https:\/\/help.autodesk.com\/view\/RVT\/2021\/ENU\/?guid=GUID-2D75BD3D-3C7C-4865-A1F5-1E1E40585C68\" class=\"su-button su-button-style-glass\" style=\"color:#FFFFFF;background-color:#e12613;border-color:#b41f10;border-radius:6px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:0px 18px;font-size:14px;line-height:28px;border-color:#ea685a;border-radius:6px;text-shadow:none\"> Importing Keyboard Shortcuts File<\/span><\/a><div class=\"su-spacer\" style=\"height:20px\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"end-comments\">End Comments <\/h2>\n\n\n\n<p>This was a useful exercise to be able to review my Keyboard Shortcuts and also change them for others to use. The process will come in handy when I adapt some of them later so I&#8217;ll need to go through the whole process again. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had made some additions to Revit KeyboardShortcuts.xml file and the file is quite big. Only some of the functions have a Keyboard Shortcut . So I wanted to create a KeyboardShortcuts.xml file that would only have my additions, so that when a person merged them in they were not going to bloat the ones [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8246,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-8243","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bim"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2022\/02\/2022-02-14-14_12_49-Keyboard-Shortcuts-600x400.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2022\/02\/2022-02-14-14_12_49-Keyboard-Shortcuts-600x600.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/8243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8243"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/8243\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/8246"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}