Table of Contents

CadParameters

from OpenCAD2D import CadParameters

class CadParameters(System.Object) ยท CadParameters in the .NET reference

The parameters of a drawing as AutoCAD 2021's Parameters Manager works with them: the names of the dimensional constraints (d1, rad1, ang1) and the user parameters, each with an expression and the value it comes to. A parameter's expression may name others (d1=2*d2, up1=d1*2+3); changing one moves the objects its constraints hold, as AutoCAD 2021 does, and each change is one undo step. The palette and -PARAMETERS both work through these.

Methods

Delete

.NET

@staticmethod
def Delete(document: CadDocument, name: str) -> CadEditResult

Deletes a user parameter that no expression and no constraint uses.

Edit

.NET

@staticmethod
def Edit(document: CadDocument, name: str, expression: str) -> CadEditResult

Gives a parameter a new expression: the objects its constraints hold move to meet the value it comes to.

New

.NET

@staticmethod
def New(document: CadDocument, name: str, expression: str) -> CadEditResult

Makes a user parameter.

Rename

.NET

@staticmethod
def Rename(document: CadDocument, name: str, newName: str) -> CadEditResult

Renames a parameter, in the expressions that name it and the words of its dimensions too.

Rows

.NET

@staticmethod
def Rows(document: CadDocument) -> System.Collections.Generic.IReadOnlyList[CadParameterRow]

The parameters of the working space, in the order the drawing keeps them.