Author Topic: Cyrillic commands in autocad  (Read 1305 times)

0 Members and 1 Guest are viewing this topic.

petar_dimov

  • Mosquito
  • Posts: 10
Cyrillic commands in autocad
« on: October 15, 2016, 05:21:10 AM »
Hi autolisp fans,

I thinking about to translate autocad commands. I want to add to command definition of all acad commands their cyrillic value. The easy part is to translate acad.pgp. I load without problem a definition like:
Code: [Select]
(defun C:СЦ () (command "SCALE"))
Quote
Command: СЦ SCALE
Select objects: Specify opposite corner: 1 found
Select objects:
Specify base point:
Specify scale factor or [Copy/Reference]: r

but how can i catch additional keystroke like "р" and translate it to "r"? Is there any possibility to find keyboard press and replace them?

lamarn

  • Swamp Rat
  • Posts: 636
Re: Cyrillic commands in autocad
« Reply #1 on: October 15, 2016, 07:39:09 AM »
What do You mean by 'Cyrillic value' ? .. I have been working with autocad & lisp for quite a while but never before heard anyone bringing This up.. Cheers and welcome To This forum from me.. Hans
Design is something you should do with both hands. My 2d hand , my 3d hand ..

ribarm

  • Gator
  • Posts: 3282
  • Marko Ribar, architect
Re: Cyrillic commands in autocad
« Reply #2 on: October 15, 2016, 08:27:46 AM »
Both written languages and cyrillic and latinic are equally important in writing... Native language for making applications is English, so all commands and functions were introduced using English language base words... There are various versions of AutoCAD software targeting specific groups of users that want to work with different language than English... It is just odd thing to translate written software that was using as references databases created in English along as with AutoLISP programming language and transfer large amount of data into different language just for specific group of users and create therefore inconsistency in programming and working practice... My suggestion : learn to use default programming parameters (pgp) as soon as possible and you'll avoid conflicts while programming and working with already created standards that are based on English language... I am not saying you should avoid customizing (pgp), but I certainly avoid it - there are already operational systems that are standard and if you adapt to them sooner you'll sooner get benefits from using them when and if you come into such situations that you have to work that way...
« Last Edit: October 15, 2016, 09:15:54 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Grrr1337

  • Swamp Rat
  • Posts: 812
Re: Cyrillic commands in autocad
« Reply #3 on: October 15, 2016, 08:57:04 AM »
I'm thinking about something like this:
Code: [Select]
(setq
LstCyr '("А" "Б" "В" "Г" "Д" "Е" "Ж" "З"...)
LstEng '("A" "B" "V" "G" "D" "E" "J" "Z"...)
LstDefuns '("COPY" "MOVE" "ROTATE" ...)
)
(foreach defunsym LstDefuns
(defun (vl-string-translate LstEng LstCyr defunsym) defunsym)
)
Just to throw up an idea.
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg

petar_dimov

  • Mosquito
  • Posts: 10
Re: Cyrillic commands in autocad
« Reply #4 on: October 16, 2016, 03:47:59 AM »
I don't want to replace or modify original pgp file. I am of the same opinion that it is better to comply with the English language standards. All i want is to make a copy of all autocad commands, representing their original english (cyrillic phonetic). Yes "vl-string-translate" can do this, but how can i catch when pressing "R" for example. I read about reactors, but my lisp knowledge is not good enough to do this. I want to hook any key press only on command line, not in dialog forms or something.

Regards!