refafront.blogg.se

Most useful freecad macros
Most useful freecad macros












most useful freecad macros
  1. #Most useful freecad macros how to#
  2. #Most useful freecad macros manual#
  3. #Most useful freecad macros software#

#Most useful freecad macros how to#

On the Polish subforum, there's an ongoing discussion about how to automate the process of changing colors of multiple faces and macros could be the first step.

#Most useful freecad macros manual#

Some of them are not so important for macros (like manual view manipulations) but others, like setting face colors could be handy. The question is if it would be hard to do so. So basically, the operations that are not recorded by macros at the moment could be made recordable. You could program an entire WB so you could do everything you have in mind, simply you have to learn the "API calls" and study some code.Įventually in my signature there is a scripting guide in English I have wrote, it is under revision, but some people have found it useful. When you wnat to do things, in FC there are a complete API, sadly documentation is not at his best, but is improving. When you "push a button" on a toolbar or chose an item in a menu, you are simply invoking "My_Command" (reusing the example above). To use the class you have not need to know what is doing, only the "address" of the "button to push". You will find a "Python command definition", you will see that it define:Ĭode: Select all FreeCADGui.addCommand("My_Command", My_Command_Class())Īnd following this example what you see in the Python console is simply the "issuing" of "My_Command" not all the operation done by My_Command_Class. The common mistake is that a Macro has to record everything, but what you see is not properly a "Macro" (it not record as example mouse movements), it a recording of issued commands, some "actions" that you perform with the mouse are not recorded probably because they are not "exposed" as commands, to catch what a command "is" in extremely approximation: I'd like to know how it looks like in as already told you why.

#Most useful freecad macros software#

On a daily basis I work in Abaqus FEA software in which recorded macros include literally every single operation done in GUI and thus it's possible to script everything there and even create simple widgets for automated work. I'd like to know how it looks like in FreeCAD. On the other hand, the command to start recording is also saved so each time you run a macro, it starts from a window with recording options which is unnecessary.įor what reason are some commands not recorded ? Is it intentional or simply these commands do not support the scripting interface for now, like it seems to be the case with assigning colors to individual faces ?

most useful freecad macros

This applies to manual view manipulations, selections and assigning colors to faces, among the others. But after turning this option off, there are still several operations that aren't recorded. I've noticed that with the default setting of Edit -> Preferences -> General -> Macro -> Gui commands -> Record as comment - checked, many useful GUI operations are commented out in macros. After a few tests, I wonder what the limitations of FreeCAD scripting/macros are in terms of which GUI operations can and which cannot be handled. I started from macros since they are usually the easiest way to learn how to script things in a particular software. Recently, I became interested in the topic of FreeCAD scripting and macros.














Most useful freecad macros