Drawing graphs.

Last Change :
02.02.2026, 10:06 Uhr

Drawing graphs.

static int graph::draw(ItemRef frame, char* graph_path)

Replace the contents of a frame with a graph. The graph is defined in a XML file. If the representation contains support points, these must be manually deleted prior to the new creation of the graph. The folllowing working method is suggested :

  1. Select frame
  2. Reverse grouping
  3. Select all frames made available
  4. Remove the frames with the graphs from the selection
  5. Delete frames

A detailed example of a graph.xml can be found here. The screenshot shows the graph generated with this definition.

The function has only been implemented as a test fort now.

Name Type Default Description
Return int   0 or ErrorCode
frame ItemRef - Target frame, in which the graph is to be inserted.
graph_path String or char* - XML file with the description of the graph. ?
#include "internal/types.h"

Create up the a new frame and draw a graph in it. The description of the graph can be found here.

#include "internal/types.h"
int main () { ItemRef frame = item::alloc (); int result;
result = frame::create (   frame,   kRectangle,   100.0, 210.0, 300.0, 400.0,   1); // page if (result) { showmessage ("Create Frame : %s", serror (result)); item::release (frame); return 0; }
result = graph::draw (frame, "$DESKTOP/graph1.xml"); if (result) { showmessage ("Draw Graph: %s", serror (result)); item::release (frame); return 0; }
item::release (frame); return 0; }

Version1.2, February 2005

priint:comet InDesign® Plug-Ins

Matthias [Paul]

Since
Plugin Version 1.1.17
Version
02.02.2026, 10:06 Uhr
Author
Paul Seidel

Alphabetic index HTML hierarchy of classes or Java