I'm using win32com in JupyterLab to draw in MS Visio and am struggling with a VBA to Python translation.
The problem is the property RowType of a shape.
In VBA you read and write it via: shp.RowType(sec_num, row_num)
(shp is a shape instance, sec_num = section number and similar for the row)
In Python the reading works as expected, writing however throws the error message "cannot assign to function call". Which is logical since VBA is ambiguous with setters and getters.
I tried creating an object that references this property. But it obviously doesn't work neither.
(temp = shp.RowType(sec_num, row_num). temp becomes the value.
I think the core problem is located in win32com.
Python is probably powerful enough to let one differentiate between setter and getter, but this is beyond my level.
Any ideas?
The worst option would be to call a VBA routine in a stencil, or even worse the document.
Answered by @Tim Roberts in the comments.
win32com - cannot assign to function call