Spell Check Macro?
Spell Check Macro?
(OP)
I was trying to build a spell checker in CATIA V5. I want the macro to check every word in a drawing file with an Excel sheet which has all the words predefined. How do I start this.
Thanks!
Thanks!





RE: Spell Check Macro?
operations on strings (extracting single word from string, compare two words)
how get all DrawingTexts (If You only consider drawingtexts)
how collaborate with Excel spreadsheet through CatScript / CATVBA
LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013
RE: Spell Check Macro?
It was such a script in another forum which now is not existing anymore....I don't know if someone can post it here....
Anyway, if you have problems developing the code, post your questions here. What lukaszsz said is a good starting point.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: Spell Check Macro?
RE: Spell Check Macro?
CODE --> VBSCRIPT
disassembly text into single word - split string by " " (SPACE)
CODE --> VBSCRIPT
LCase() and UCase() will replace all letters into lower cases / upper cases
two steps almost done, I hope, You'll post Yours version soon, anyway, it seems to be very interesting case, so if I get some free time, I will prepare my own version of SpellChecker for CATIA's drawing texts
IMO the biggest problem is to determine, how script should work, when script will found word from outside the WordList
The best option IMO is to do it in VBA, create table of all words and founded highlit on green, those, which are outside the wordlist on red and let user to do those changes manually by double-click on this word
LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013
RE: Spell Check Macro?
If I remember correctly, that catvba which was on the German forum was using MS Office Word for spelling without other options.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: Spell Check Macro?
Option Explicit
Sub CheckSpekk()
With Application.SpellingOptions
.SuggestMainOnly = True
.IgnoreCaps = True
End With
' Run a spell check.
Cells.CheckSpelling
End Sub
RE: Spell Check Macro?
To compile this Macro You need to add MS Word Library
From menu Tools-References Check Microsoft Word XX Library
Here is the whole macro
http://szczypin.pl/data/uploads/makra/spellchechke...
I'm looking for Your feedback!
LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013
RE: Spell Check Macro?
Works Great!
Thanks for developing.
I am running it on V5R18SP4 64-bit windows 7.
Every other time I run it, I get a "Run-time error '462': The remote server machine does not exist or is unavailable"
If I select End it works fine the next time.
IF I select Debug it goes to the the editior and highlights this line "WordApp.Visible = False"
I have not tried it on later Catai versions.
Thanks,
Rick
RE: Spell Check Macro?
LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013
RE: Spell Check Macro?
I did not get any errors when I compiled it, but it works only with one text. When there are multiple texts, it detects them but doesn't give any spelling suggestions.
RE: Spell Check Macro?
Also I've fixed multilanguage supporting. Previous version was using suggested words not from specified language library, but from same language as system's language
LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013