Xbutton CATIA Macro
Code in this post for XButton CATIA macro will allow you to use side mouse buttons for Hide/show and Open in new window command.
Have you ever thought about how to use those two side buttons on your mouse? For home use, you can always download some software like X-Mouse Button Control and get a lot of options. But sometimes you can’t install this software because of administrator rights or because it’s not safe to download a portable version. So if you are in this situation you are like me. Therefore I tried to find a solution for this problem. Hence I want to write a simple Xbutton CATIA macro application.
Write code for XButton CATIA macro
The code is very simple but I was searching for an idea for a long time. You will need to use a timer so it can register your mouse click.
This is a kind of container for your macros, so you can put any macro inside of that. You must import System.Windows.Forms.MouseButtons for this solution to work.
I wrote hide/show macro for Xbutton1 CATIA macro so here is the code.
Certainly, this is a very simple macro. There are two cases, one of the element is in hide and other if the element is in show mode.
The second macro from the Xbutton CATIA macro application is open in a new window. You can select one or more parts and hit Xbutton2 and it will open one or more parts in a new window.
If you want to use this macro you must be in a product or assembly environment. You can work more on these macros due to make them better. Maybe you will get some better ideas.
The only problem with this solution is when you use side mouse buttons in windows or in google chrome it also makes actions in CATIA. So be careful or hide a lot of elements if those are selected.
You can download it for free and use it. If you have any issues feel free to contact me.