FreeCAD_macros
FreeCAD_macros copied to clipboard
[TDThread.FCMacro] Feature Request: Read thread information from hole
Currently, your macro always puts M16 on the label for the dimension. However, if the hole was made with the appropriate tool (part design/hole) it can contain the information on the thread:

I'm not familiar enough with FreeCAD macros to know how to access the value, but from the GUI, assuming the hole operation is names Hole, you can access it from <<Hole>>.ThreadSize. You also get a boolean <<Hole>>.Threaded to know if it's threaded and so if the value for ThreadSize is meaningful.
Yes, the macro needs some reworking... But is this not already somehow implemented in TD itself? I just noticed that there are now these extensions: https://wiki.freecadweb.org/TechDraw_Workbench#Extensions