Table of Contents

Method ExportGraph

Namespace
OpenCAD2D.Remote
Assembly
OpenCAD2D.Remote.dll

ExportGraph(string, double)

Gets the graph of the drawing as one JSON document, as the app writes it (schema opencad2d.graph, version 1): a node for each entity of ExportJson(string) and the edges that touch, contain, dimension and annotate.

public string ExportGraph(string layout, double tolerance)

Parameters

layout string

The layout to take (Model for model space), or null for model space and every layout.

tolerance double

How near two ends must be to touch, in millimetres; above nought.

Returns

string

The JSON text.

Exceptions

CadRemoteException

Thrown when the drawing is closed, has no layout of that name, or the tolerance is not above nought.

ExportGraph(string, double, int)

Gets the graph of the drawing as ExportGraph(string, double) does, cut at a number of edges: the first maxEdges edges of the whole graph in its order (kind, source, target), with truncated true and edgesFound in the text where there were more.

public string ExportGraph(string layout, double tolerance, int maxEdges)

Parameters

layout string

The layout to take (Model for model space), or null for model space and every layout.

tolerance double

How near two ends must be to touch, in millimetres; above nought.

maxEdges int

The most edges to keep; above nought.

Returns

string

The JSON text.

Exceptions

CadRemoteException

Thrown when the drawing is closed, has no layout of that name, or the tolerance or the cap is not above nought.