Thanks.
Took a few hours to get from that to something that actually worked
- First got it to work in GUI
- Don't forget to make points that are on the mirror line symetric!
Then some code
app = adsk.core.Application.get()
ui = app.userInterface
product = app.activeProduct
rootComp = product.rootComponent
sketch = rootComp.sketches.add(rootComp.xYConstructionPlane,)
#draw line
p1 = adsk.core.Point3D.create(1,1,0)
p2 = adsk.core.Point3D.create(2,2,0)
line1 = sketch.sketchCurves.sketchLines.addByTwoPoints(p1, p2)
#create a mirror (constructin) line
x1 = adsk.core.Point3D.create(0,0,0)
x2 = adsk.core.Point3D.create(0,2,0)
lineX = sketch.sketchCurves.sketchLines.addByTwoPoints(x1, x2)
lineX.isConstruction = True
#mirrorline(s) - Draw on top of lines, mirror will move them
m1 = adsk.core.Point3D.create(1,1,0)
m2 = adsk.core.Point3D.create(2,2,0)
mirror1 = sketch.sketchCurves.sketchLines.addByTwoPoints(m1, m2)
#Add Symatry (Don't forget to add points on the mirror line )
sketch.geometricConstraints.addSymmetry(line1.startSketchPoint, mirror1.startSketchPoint, lineX)
sketch.geometricConstraints.addSymmetry(line1.endSketchPoint, mirror1.endSketchPoint, lineX)