Python-scripted Dimensions

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
outpaters
Posts: 1
Joined: Wed Jan 19, 2011 1:09 am

Python-scripted Dimensions

Post by outpaters »

How can I add dimensions to my Part objects in a Python script?

I've tried:
import Draft
Draft.makeDimension(FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(100, 0, 0))
but it returns
Exception: 'module' object has no attribute 'getDocument'
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Python-scripted Dimensions

Post by wmayer »

You code snippet works for me. Whjich version of FreeCAD are you using? Maybe check if you can install a later version.
Post Reply