Table of Contents

CadSpellCheck

from OpenCAD2D import CadSpellCheck

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

What SPELL gives its Check Spelling dialog: where to check, the word found not in the dictionary with the words nearest it, and AutoCAD's answers to it (Ignore, Ignore All, Change, Change All, Add to Dictionary). The words are those of the built-in English list and of a custom dictionary file; a word of one letter, and those the settings name (with a digit or all in capitals until set otherwise), are passed over. Nothing is written into the drawing while the dialog is open: once it closes, SPELL writes the words changed, each text one edit of its one undo step.

Properties and fields

CurrentSpace

.NET

CurrentSpace: ClassVar[str]

The place that checks the space on screen.

EntireDrawing

.NET

EntireDrawing: ClassVar[str]

The place that checks every space of the drawing: model space and each layout.

SelectedObjects

.NET

SelectedObjects: ClassVar[str]

The place that checks the objects picked with the dialog's Select objects button.

Added

.NET

@property
def Added(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the words added to the dictionary, in the order they were added.

CanUndo

.NET

@property
def CanUndo(self) -> bool

Gets whether an answer can be taken back by CadSpellCheck.Undo.

ChangedCount

.NET

@property
def ChangedCount(self) -> int

Gets how many words are changed so far.

Context

.NET

@property
def Context(self) -> str

Gets the text the word is in, as written; empty when none waits.

CustomDictionary

.NET

@property
def CustomDictionary(self) -> str | None

Gets the custom dictionary file read, whose words count as spelt right and to which Add to Dictionary appends; null for none.

IsChecking

.NET

@property
def IsChecking(self) -> bool

Gets whether a word not in the dictionary waits for an answer.

IsSelecting

.NET

@property
def IsSelecting(self) -> bool
@IsSelecting.setter
def IsSelecting(self, value: bool) -> None

Gets or sets whether the dialog closed to have objects picked, as its Select objects button does: SPELL asks "Select objects:" and shows the dialog again with them.

Places

.NET

Places: ClassVar[System.Collections.Generic.IReadOnlyList[str]]

Gets the places Where to check offers, as AutoCAD 2021 lists them.

SelectedHandles

.NET

@property
def SelectedHandles(self) -> System.Collections.Generic.IReadOnlyList[str]
@SelectedHandles.setter
def SelectedHandles(self, value: System.Collections.Generic.IReadOnlyList[str] | None) -> None

Gets or sets the handles of the objects picked for CadSpellCheck.SelectedObjects.

Settings

.NET

@property
def Settings(self) -> CadSpellSettings
@Settings.setter
def Settings(self, value: CadSpellSettings | None) -> None

Gets or sets the settings: what is included and which words are passed over, as Check Spelling Settings gives them; they count from the next CadSpellCheck.Start.

Status

.NET

@property
def Status(self) -> str

Gets the line the dialog shows under the buttons: which text is checked, or that the check is complete.

Suggestions

.NET

@property
def Suggestions(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the words nearest the word, the best first; none when no word waits or none is near.

Where

.NET

@property
def Where(self) -> str
@Where.setter
def Where(self, value: str | None) -> None

Gets or sets where to check, one of CadSpellCheck.Places: the entire drawing until set.

Word

.NET

@property
def Word(self) -> str

Gets the word not in the dictionary; empty when none waits.

Methods

AddToDictionary

.NET

def AddToDictionary(self) -> None

Adds the word to the custom dictionary, so that it is spelt right from now on, and to its file once SPELL ends.

Change

.NET

def Change(self, replacement: str) -> bool

Changes the word to another, this once: the replacement typed, or the first suggestion where none is typed.

ChangeAll

.NET

def ChangeAll(self, replacement: str) -> bool

Changes the word to another here and wherever it comes again, as CadSpellCheck.Change.

Ignore

.NET

def Ignore(self) -> None

Leaves the word as it is, this once.

IgnoreAll

.NET

def IgnoreAll(self) -> None

Leaves the word as it is here and wherever it comes again.

LoadDictionary

.NET

def LoadDictionary(self, path: str) -> str

Reads a custom dictionary file, its words one to a line, which then count as spelt right.

Start

.NET

def Start(self) -> bool

Starts the check where CadSpellCheck.Where says, from its first text: the first word not in the dictionary waits, or the check is complete. Words already changed keep their changes and are not asked again.

Undo

.NET

def Undo(self) -> bool

Undo of the dialog: the last answer since CadSpellCheck.Start taken back, its word waiting again, the change it made, the word it ignored for all or added to the dictionary forgotten.

UseDictionary

.NET

def UseDictionary(self, path: str) -> None

Takes a custom dictionary file as the one the dialog starts with: read where it exists, else only named, so that Add to Dictionary makes it.