Diagram.add_shape function

Hello, I use Python 3.9.13 and use the next code in Python: Connect Shapes in Visio via Python | products.aspose.com. I see the error:
“shapeIdRec = diagram.add_shape(4.25, 5.5, 2, 1, “Rectangle”, 0)
TypeError: [‘function takes at most 3 arguments (6 given)’, ‘function takes at most 4 arguments (6 given)’, “can’t build ‘Double’ from ‘int’”]” This program worked one month ago, now here is a mistake. Could you help me please where is the problem?
Pr1.png (56.2 KB)
Pr2.png (21.2 KB)

@e0377590
Thanks for the screenshots.
Could you please try this sample code, it should work fine:

shapeIdRec = diagram.add_shape(4.25, 5.5, 2.0, 1.0, “Rectangle”, 0)

Thanks.

Thanks. Now it works, however the error is in another line:
diagram.pages[0].connect_shapes_via_connector(shapeId2, 2.0, shapeId1, 3.0, shapeIdCo)
TypeError: [“can’t build Shape value from ‘int’”, “can’t build ConnectionPointPlace value from ‘float’”, “can’t build String from ‘float’”]
If I use
diagram.pages[0].connect_shapes_via_connector(shapeId2, 2, shapeId1, 3, shapeIdCo)
I see the error:
TypeError: [“can’t build Shape value from ‘int’”, “can’t build ConnectionPointPlace value from ‘int’”, “can’t build String from ‘int’”]

@e0377590
Please try this sample code:
diagram.pages[0].connect_shapes_via_connector(shapeIdRec,ConnectionPointPlace.CENTER,shapeIdStar,ConnectionPointPlace.CENTER,shapeIdCo)
Thanks.