I'm still a FreeCAD beginner, but the functionality that I've seen until now is really exciting !
I am modeling the floor construction for my garage renovation project with the Python scripting. I modeled the floor layers and changed the colors with the script. I managed to indicate the width of the floor with the "makeDimension", but since the floor is quite large, the font size is too small to read. Does any one know how to change the properties of the dimension with the script ?
Thanks.
Changing dimension with scripting
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Changing dimension with scripting
yes, it's easy to do. Let's say your dimension is called "dim001":
Code: Select all
myDim = FreeCAD.ActiveDocument.dim001
myDim.ViewObject.FontSize = 0.50
Re: Changing dimension with scripting
Hi Yorik,
thanks for the reply ! your suggestion worked for me.
Now I use the "makeDimension" function in the script to make an annotation, and then alter the FontSize:
thanks for the reply ! your suggestion worked for me.
Now I use the "makeDimension" function in the script to make an annotation, and then alter the FontSize:
Code: Select all
myDim=makeDimension(Base.Vector(0,0,0),Base.Vector(0,3570,0),Base.Vector(-400,0,0))
myDim.ViewObject.FontSize = 100