Method GetFreeSpace
GetFreeSpace(string, double, double, double, double, IEnumerable<string>, double, double, double, double)
Asks the app for the empty rectangles of a frame: the largest rectangles, not turned, that no line or word of the kinds asked about runs through or comes within the margin of, and that cannot be made larger, the largest first.
public CadRemoteFreeSpace GetFreeSpace(string layout, double minX, double minY, double maxX, double maxY, IEnumerable<string> kinds, double margin, double minWidth, double minHeight, double tolerance)
Parameters
layoutstringThe name of a layout, or null or empty for model space.
minXdoubleThe least X of the frame.
minYdoubleThe least Y of the frame.
maxXdoubleThe greatest X of the frame.
maxYdoubleThe greatest Y of the frame.
kindsIEnumerable<string>The DXF names of the entities that take room; null for every kind.
margindoubleThe clear room left round them, nought or more.
minWidthdoubleThe least width of a rectangle to give; 0 for any.
minHeightdoubleThe least height of a rectangle to give; 0 for any.
tolerancedoubleHow little still counts as touching, in drawing units; 0.001 is the library's.
Returns
- CadRemoteFreeSpace
The rectangles.
Exceptions
- CadRemoteException
Thrown when the drawing is closed, has no layout of that name, or the frame, margin or sizes are not usable.