---
title: "How to nest a macro within Graphviz"
canonical: "https://support.appfire.com/space/SUPPORT/89137392/How%20to%20nest%20a%20macro%20within%20Graphviz"
format: markdown
---
Description This article illustrates how you can nest a macro that generates a  dot  code within Graphviz macro (in this case, the Graph macro), to create a diagram.  Steps Create a new page. Enter  {graph   and select the flowchart macro. Alternatively, from the toolbar at the top, click  Insert more content >  Other macros  >  Graph macro.        3. Nest the macro body or the sample Source code within the Graph macro as shown below:   4. Enable  Render wiki markup macros in body. 5. Click  Save  to publish the page. For Diagraphs and Space graphs, you will have to nest macros that generate  diagraph  commands. Source {beanshell}
out.println("A -- D");
out.println("B -- C");
out.println("C -- A");
out.println("D -- C");
out.println("C -- E");
out.println("B -- E");
{beanshell}  Diagram