# Capture diagram and export

**URL:** <https://forum.bpmn.io/t/capture-diagram-and-export/10841>\
**Category:** Developers\
**Created:** [March 28, 2024, 11:35am UTC](https://forum.bpmn.io/t/capture-diagram-and-export/10841 "2024-03-28T11:35:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alessia\_Volpi](https://forum.bpmn.io/user_avatar/forum.bpmn.io/alessia_volpi/32/5289_2.png) [@Alessia\_Volpi](https://forum.bpmn.io/u/Alessia_Volpi)\
**Post date:** [March 28, 2024, 11:35am UTC](https://forum.bpmn.io/t/capture-diagram-and-export/10841/1 "2024-03-28T11:35:48Z")

</div>

Hi, how can i capture the xml diagram that is displayed in that moment?  
I need to build a function to export it. I check BaseViewer and i find the perfect function to do it, “saveXML” but i don’t understand how can i call it from another page. If i generate a new instance of the viewer it says to me that the dependecies are missing and so, i don’t understand how can i capture the actual istance of the viewer and so, of the built diagram.  
Please help

---

<div class="post-metadata">

**Author:** ![nikku](https://forum.bpmn.io/user_avatar/forum.bpmn.io/nikku/32/5130_2.png) [@nikku](https://forum.bpmn.io/u/nikku)\
**Post date:** [April 15, 2024, 4:42pm UTC](https://forum.bpmn.io/t/capture-diagram-and-export/10841/2 "2024-04-15T16:42:29Z")

</div>

Could you rephrase your request, maybe add a screenshot? I don’t understand what you want to accomplish.

---

<div class="post-metadata">

**Author:** ![Alessia\_Volpi](https://forum.bpmn.io/user_avatar/forum.bpmn.io/alessia_volpi/32/5289_2.png) [@Alessia\_Volpi](https://forum.bpmn.io/u/Alessia_Volpi)\
**Post date:** [April 17, 2024, 1:48pm UTC](https://forum.bpmn.io/t/capture-diagram-and-export/10841/3 "2024-04-17T13:48:50Z")

</div>

I solved it thank you very much

---

<div class="post-metadata">

**Author:** ![barmac](https://forum.bpmn.io/user_avatar/forum.bpmn.io/barmac/32/974_2.png) [@barmac](https://forum.bpmn.io/u/barmac)\
**Post date:** [July 9, 2025, 10:10am UTC](https://forum.bpmn.io/t/capture-diagram-and-export/10841/4 "2025-07-09T10:10:54Z")

</div>

Closed on July 9, 2025, 10:10am UTC

Closing old topics.
