I’m using Python to control Visio via win32com.Client on a Windows 10 Platform. I’ve had a lot of success with this project but am stuck trying to find an answer. I’ve been scouring the Microsoft docs (for VBA of course) but cannot find an answer.
I’m adding connections points to shapes and connecting them with dynamic connectors without issue. All connectors that I drop appear as Right-Angle Connectors and I would like to switch some of them to Straight or Curved Connector styles. I haven’t found anything in the ShapeSheet that look like the right setting. For what it’s worth the code I’m using to drop the connectors is below. Thanks in advance for any assistance provided!
# visSectionConnectionPts = 7
shape = self.v_app.draw_page.Drop(self.v_app.app.ConnectorToolDataObject, 5, 4)
shape.Cells("BeginX").GlueTo(s_shp.shape.CellsSRC(7, s_row, 0))
shape.Cells("EndX").GlueTo(d_shp.shape.CellsSRC(7, d_row, 0))
if arrow:
shape.Cells("EndArrow").FormulaForceU = "13"
if len(text) > 0:
shape.Text = text