Class CadSpellDictionary
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
The dictionary the MTEXT editor's spell check looks words up in, as AutoCAD 2021's Spell Check panel does: the built-in
English dictionary (OpenCAD2D.CadSpelling) and a custom dictionary, a text file of words one to a line (AutoCAD's
sample.cus form), with the words ignored for the session. Add Word appends to the file; Edit Dictionaries adds
and deletes words in it.
public sealed class CadSpellDictionary
- Inheritance
-
CadSpellDictionary
- Inherited Members
Remarks
A word of one letter, with a digit in it or in capitals is passed over until Settings says otherwise, as in Check Spelling. The file need not exist: it is made when the first word is added.
Constructors
- CadSpellDictionary(string)
Makes the dictionary over a custom dictionary file, read where it exists.
Properties
- BuiltInCount
Gets how many words the built-in English dictionary holds.
- CustomFile
Gets the custom dictionary file; null where the words are kept for the session only.
- CustomWords
Gets the custom words in ordinal order, letters of either case the same.
- Settings
Gets or sets which words are passed over, as Check Spelling Settings gives them; the defaults until set.
Methods
- Add(string)
Adds a word to the custom dictionary, so that it is spelt right from now on, and to the end of its file: Add Word.
- Check(CadMTextEditor)
Finds the words of the editor that are misspelled, in order: runs of letters, digits and inner apostrophes, a symbol or a stack ending a word. The words of the editor as it is now, not as it was when asked before.
- IgnoreAll(string)
Leaves a word as it is wherever it comes, for as long as the dictionary lives: Ignore All.
- IsMisspelled(string)
Gets whether a word is wrong: not passed over by the settings, not ignored, not in the built-in dictionary (with its plain endings) or the custom one.
- Remove(string)
Takes a word out of the custom dictionary and its file, the other lines of the file left as they are: Edit Dictionaries' Delete.
- Suggest(string)
Gets the words nearest a misspelled one, at most five, the best first, in the case the word begins with.