TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Andrea on March 15, 2006, 09:10:30 AM

Title: dim...cmdactive ?
Post by: Andrea on March 15, 2006, 09:10:30 AM
Code: [Select]
(command "_dim")
(while (> (getvar "CMDACTIVE") 0)
(command pause)
)

any idea how ?

 :?
Title: Re: dim...cmdactive ?
Post by: kpblc on March 15, 2006, 09:21:09 AM
I don't understand what's the problem is.
Title: Re: dim...cmdactive ?
Post by: Andrea on March 15, 2006, 09:30:59 AM
I need to detect "dim mode"

Code: [Select]
eg:
(setq cecolor (getvar "cecolor"))
(setvar "cecolor" 1)
(while "DIMMODE" is active)...
(do nothing)
;;otherwise reset color
(setvar "cecolor" cecolor)
)
Title: Re: dim...cmdactive ?
Post by: kpblc on March 15, 2006, 09:43:39 AM
You can see nearly univeral error catcher at http://www.arcada.com.ua/forum/viewtopic.php?t=445 (but the resource is russian).
And at your code try this:
Code: [Select]
(defun ytty ()
  (setq _cecolor_ (getvar "cecolor"))
  (setvar "cecolor" 1)
  (command "_.dim")
  (while (/= (logand (getvar "cmdactive") 31) 0)
    (command pause)
    ) ;_ end of while
  (setvar "cecolor" _cecolor_)
  ) ;_ end of defun
Title: Re: dim...cmdactive ?
Post by: LE on March 15, 2006, 10:18:54 AM
You can see nearly univeral error catcher at http://www.arcada.com.ua/forum/viewtopic.php?t=445 (but the resource is russian).

Just curios, is that a forum like this one?... Do they have ObjectARX in there ?

Thanks.
Luis.
Title: Re: dim...cmdactive ?
Post by: ElpanovEvgeniy on March 15, 2006, 11:32:30 AM
Do they have ObjectARX in there ?
You can see:
http://www.autocad.ru/cgi-bin/f1/board.cgi?p=024
Title: Re: dim...cmdactive ?
Post by: LE on March 15, 2006, 11:43:00 AM
Quote
You can see:
http://www.autocad.ru/cgi-bin/f1/board.cgi?p=024

Спасибо

[ Я буду пробовать изучить ваш язык в будущем ]
Title: Re: dim...cmdactive ?
Post by: Crank on March 15, 2006, 07:06:06 PM
Quote
You can see:
http://www.autocad.ru/cgi-bin/f1/board.cgi?p=024

Спасибо

[ Я буду пробовать изучить ваш язык в будущем ]

http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=ru_en&url=http%3A%2F%2Fwww.autocad.ru%2Fcgi
Title: Re: dim...cmdactive ?
Post by: LE on March 15, 2006, 07:35:14 PM
Thank you so much Sir.
Title: Re: dim...cmdactive ?
Post by: ElpanovEvgeniy on March 16, 2006, 03:54:40 AM
http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=ru_en&url=http%3A%2F%2Fhttp://www.autocad.ru/cgi-bin/f1/board.cgi?p=-1
Title: Re: dim...cmdactive ?
Post by: Alexander Rivilis on March 16, 2006, 06:10:12 AM
Quote
You can see:
http://www.autocad.ru/cgi-bin/f1/board.cgi?p=024

Спасибо

[ Я буду пробовать изучить ваш язык в будущем ]

:-D If you see nickname Александр Ривилис on forum autocad.ru - it is my full name. Well come to this forum!!!
Title: Re: dim...cmdactive ?
Post by: LE on March 16, 2006, 10:07:57 AM
:-D If you see nickname Александр Ривилис on forum autocad.ru - it is my full name. Well come to this forum!!!

Thank you, I saw your name there and went to that forum some time ago, I do not know if I can make it in there, my goal is to learn more on C++/ARX/MFC ... The problem would be the communication barrier....  :-(

At least, I will try just to post once and say HI over there...  :-)

Have fun.
Title: Re: dim...cmdactive ?
Post by: LE on March 16, 2006, 11:56:05 AM
By the way Александр Ривилис

If you have a chance, to review the ARX code posted on the below topic, thanks!

http://www.theswamp.org/index.php?topic=9032.0
Title: Re: dim...cmdactive ?
Post by: ElpanovEvgeniy on March 16, 2006, 12:21:30 PM
On forum autocad.ru my nickname Евгений Елпанов.
This is my full name. Welcome to autocad.ru!
 :-)
Title: Re: dim...cmdactive ?
Post by: Joel Roderick on March 16, 2006, 02:32:48 PM
I had a similar problem and ended up using this as the command name:

_.acad_dim.dimlinear
_.acad_dim.dimaligned

etc...
Title: Re: dim...cmdactive ?
Post by: Andrea on March 16, 2006, 02:44:30 PM
You can see nearly univeral error catcher at http://www.arcada.com.ua/forum/viewtopic.php?t=445 (but the resource is russian).
And at your code try this:
Code: [Select]
(defun ytty ()
  (setq _cecolor_ (getvar "cecolor"))
  (setvar "cecolor" 1)
  (command "_.dim")
  (while (/= (logand (getvar "cmdactive") 31) 0)
    (command pause)
    ) ;_ end of while
  (setvar "cecolor" _cecolor_)
  ) ;_ end of defun

sorry..but this code not workin..

need to set :
Code: [Select]
(setvar "cecolor" "1")
in the first step..

and second...the result you have backslah for text.

 :oops:
Title: Re: dim...cmdactive ?
Post by: Joel Roderick on March 16, 2006, 02:50:26 PM
Luis,
You speak Spanish and Russian?

My wife and I just spent 3 weeks in Russia (adopting 2 children).  My Russian is still pretty weak, but I can at least communicate with my daughter (5).


Quote
You can see:
http://www.autocad.ru/cgi-bin/f1/board.cgi?p=024

Спасибо

[ Я буду пробовать изучить ваш язык в будущем ]
Title: Re: dim...cmdactive ?
Post by: Alexander Rivilis on March 17, 2006, 02:02:56 PM
What about checking value of CMDNAMES system variebles?
Code: [Select]
(if (wcmatch (getvar "CMDNAMES") "DIM*")  (progn
;; do something
))
Title: Re: dim...cmdactive ?
Post by: LE on March 17, 2006, 03:39:06 PM
Luis,
You speak Spanish and Russian?

My wife and I just spent 3 weeks in Russia (adopting 2 children).  My Russian is still pretty weak, but I can at least communicate with my daughter (5).


I wish.... no Joel I don't

. . .

CONGRATULATIONS with your two kids!!!!!  :kewl: