When adding a ROUNDED_RECTANGLE on slides, by using pptx, I have below lines and a slide generated.
from pptx import Presentation
from pptx.enum.shapes import MSO_SHAPE
from pptx.util import Inches
prs = Presentation()
title_only_slide_layout = prs.slide_layouts[0]
slide = prs.slides.add_slide(title_only_slide_layout)
shapes = slide.shapes
shape = shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(1), Inches(0.5), Inches(8), Inches(2))
prs.save('c:\\PPT\\round rectangle.pptx')
If it's manual, the rounded angle can be adjusted (where the red arrow pointing).
Is there a way to control it from the script? Thank you.

Shapes like this have one or more .Adjustments properties.
You need to modify .Adjustments(1) which can take values between 0 and 1 as I recall. A value of .5, for example, will move the yellow adjustment diamond .5 of the distance between the corner and the midpoint of the shape.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With