hi:
How to draw one arrowhead line in presentation?
I tried python to call CreateShape(‘line’),but got error like below:
:2997857: Uncaught TypeError: Cannot read property ‘Db’ of null
Segmentation fault (core dumped)
And also I tried playground.
Is there sample code somewhere?
thanks
Hello @kun.gao
Can you share more context to your goal? For instance, you can add a line like this:
const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
slide.RemoveAllObjects();
const fill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
const shape = Api.CreateShape("leftArrow", 914400, 91440, fill);
shape.SetPosition(608400, 1267200);
slide.AddObject(shape);
In this sample shape of leftArrow type gets added. More types you can find here: ShapeType | ONLYOFFICE
You can check out this sample on the playground:
Thanks for your replay. but leftarrow is not arrowhead line connector.
I haven’t found the sample code like that.
Can you share a sample of what you are referring to as “arrowhead line connector”?