New Features
I have extended ExcalidrawAutomate with functions that allow a script to directly add elements to an active Excalidraw View. This paves the way to feature-rich Excalidraw macros, such as adding activities to a flowchart.
2021-09-03.09-24-32.mp4
These are the new functions:
getElements():ExcalidrawElement[];
getElement(id:string):ExcalidrawElement;
//View Manipulation
targetView: ExcalidrawView;
setView(view:ExcalidrawView|"first"|"active"):ExcalidrawView;
getExcalidrawAPI():any;
getViewSelectedElement():ExcalidrawElement;
connectObjectWithViewSelectedElement(
objectA:string,
connectionA: ConnectionPoint,
connectionB: ConnectionPoint,
formatting?: {
numberOfPoints?: number,
startArrowHead?:string,
endArrowHead?:string,
padding?: number
}):boolean;
addElementsToView(repositionToCursor:boolean, save:boolean):Promise<boolean>;
You can find further details about the API functions here: https://zsviczian.github.io/obsidian-excalidraw-plugin/#api-documentation