Table of Contents

Class CadMake

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

The edits a program outside the command line makes that no command makes in one call: the Properties palette's rows set on objects, the words of a text changed, the cells of a table filled, a layout's sheet, a layer renamed or deleted, a viewport's scale and frozen layers. Each is one undo step of the document, made by the code the presenter runs, so a drawing worked on in this process (Run(CadDocument, string, CadMakeArgs)) and the app's (the Remote channel's make request, which calls this) do the same.

public static class CadMake
Inheritance
CadMake
Inherited Members

Remarks

whatarguments, and what comes back
set_rowshandles, rows (pairs of a row's label and the text typed into it); the handles.
edit_texthandle of a TEXT or an MTEXT and any of contents, height, rotation (degrees), style, justify (as MiddleCenter); the handle.
table_cellshandle of a table, cells (rows of texts from the top left cell; an empty text leaves its cell); the handle.
page_setuplayout, paper (a sheet of Standard as ISO A3, or 420x297 in millimetres), landscape; the layout's name.
rename_layoutname of a layout, new_name, as LAYOUT Rename does; not Model, not a name the drawing has; the new name.
delete_layoutname of a layout, as LAYOUT Delete does, with what is drawn in it; not Model and not the layout shown; where it was the last sheet a new Layout1 takes its place; the name.
rename_layername, new_name; the new name.
delete_layername, and move_to to take the objects on it to another layer first; the name.
viewport_viewhandle of a viewport, scale (the n of 1:n; 0.5 is 2:1) and center ([x, y] of model space); the handle.
viewport_freezehandle of a viewport, layers, frozen; the handle.
handleslayout (Model where left out); the handles of every object of the layout in the order it draws them, those of kinds a query cannot carry (a viewport) among them.
set_transparencyhandles, percent (0 solid to 90, or -1 for ByLayer); the handles.
set_attributehandle of a block reference, tag, value; the handle.
insert_blockname of a block, at ([x, y]), scale (above 0; 1 where left out), rotation (degrees, counter-clockwise; 0 where left out) and rows (pairs of an attribute's tag and its words; an attribute left out or given no words keeps its default): an INSERT in the working space as the command makes it, with no prompt and no dialog; the handle of the INSERT.
current_layername; the name.
add_mleader_stylename (a name no multileader style has), from (the style whose settings it takes; the presenter's metric Standard where left out) and any of text_style, text_height (above 0), arrow (an arrowhead of Names), arrow_size, landing_gap, landing_length (0 or more), landing (whether a landing is made), scale (above 0) or annotative (true; not with scale); all lengths in millimetres; the name. One undo step.
set_mleader_stylename of a multileader style and the settings add_mleader_style takes (not from); only those given are changed, and the multileaders drawn in the style follow; the name. One undo step.
add_table_stylename (a name no table style has), from (the style whose settings it takes; AutoCAD's Standard where left out) and any of text_style (for the title, the header and the data), title_height, header_height, data_height (above 0), horizontal_margin, vertical_margin (0 or more) and description; all lengths in millimetres; the name. One undo step.
set_table_stylename of a table style and the settings add_table_style takes (not from); only those given are changed, and the tables written in the style are drawn again; the name. One undo step.
current_stylekind (mleader or table) and name; the name.

Methods

Paper(string)

Finds a sheet by its name (ISO A3, letters of either case, spaces optional) or makes one from a size in millimetres (420x297, each side 50 to 20 000), with margins of 5.

Run(CadDocument, string, CadMakeArgs)

Makes one of the edits listed in the remarks.