I created a macro that would create several instances of a ShapeString like this:
Code: Select all
...
for i in range(0,13):
ss=Draft.makeShapeString(String=myList[i],FontFile="D:/Projects/Word Clock/FreeCad/Fonts/DroidSansMono-enMp.ttf",Size=10.0,Tracking=0.0)
ss.setExpression('.Placement.Base.x', u'<<params>>.cell_width')
...
However, I want to move each instance to a different location, based on a value from my Spreadsheet (called "params").
I changed my code like this:
Code: Select all
...
ss.setExpression('.Placement.Base.x', u'<<params>>.cell_width * i')
...
Is there a way to "escape" "i", so that I can combine the loop with a value from the spreadsheet?
Thanks in advance!