Download src/Mod/TechDraw/TDTest/TechDrawTestUtilities.py from AbdulElahGwaith/FreeCAD: direct link, hf CLI and curl.
- Browser
- Download file 512 Bytes
-
https://huggingface.co/AbdulElahGwaith/FreeCAD/resolve/main/src/Mod/TechDraw/TDTest/TechDrawTestUtilities.py
- Command line
-
hf download hf://AbdulElahGwaith/FreeCAD/src/Mod/TechDraw/TDTest/TechDrawTestUtilities.py
-
curl -L -o TechDrawTestUtilities.py https://huggingface.co/AbdulElahGwaith/FreeCAD/resolve/main/src/Mod/TechDraw/TDTest/TechDrawTestUtilities.py
512 Bytes
| import FreeCAD | |
| import os | |
| def createPageWithSVGTemplate(doc=None): | |
| """Returns a page with an SVGTemplate added on the ActiveDocument""" | |
| path = os.path.dirname(os.path.abspath(__file__)) | |
| templateFileSpec = path + "/TestTemplate.svg" | |
| if not doc: | |
| doc = FreeCAD.ActiveDocument | |
| page = doc.addObject("TechDraw::DrawPage", "Page") | |
| doc.addObject("TechDraw::DrawSVGTemplate", "Template") | |
| doc.Template.Template = templateFileSpec | |
| doc.Page.Template = doc.Template | |
| return page | |