Table of Contents

Class CadSpellCheck

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

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.

public sealed class CadSpellCheck
Inheritance
CadSpellCheck
Inherited Members

Fields

CurrentSpace

The place that checks the space on screen.

EntireDrawing

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

SelectedObjects

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

Properties

Added

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

CanUndo

Gets whether an answer can be taken back by Undo().

ChangedCount

Gets how many words are changed so far.

Context

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

CustomDictionary

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

IsChecking

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

IsSelecting

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

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

SelectedHandles

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

Settings

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 Start().

Status

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

Suggestions

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

Where

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

Word

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

Methods

AddToDictionary()

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

Change(string)

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

ChangeAll(string)

Changes the word to another here and wherever it comes again, as Change(string).

Ignore()

Leaves the word as it is, this once.

IgnoreAll()

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

LoadDictionary(string)

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

Start()

Starts the check where 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()

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

UseDictionary(string)

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.