AcedCommands does not work well.

AcedCommands does not work well.

Anonymous
Not applicable
653 Views
2 Replies
Message 1 of 3

AcedCommands does not work well.

Anonymous
Not applicable

Hi all,

i am a newer to objectARX, and want to make ucsicon to be unselectable. I had try to find some codes to do this things, but just found a command could accomplish this requirement, and it is UCSICON.

 

so i use the code below,

 

acedCommand(RTSTR, _T("UCSICON"), RTSTR, _T("SELECTABLE") , RTSTR , _T("NO") , RTSTR, _T("") , RTNONE):

 

But it does not work. can you give me some suggestions or materials?

0 Likes
Accepted solutions (1)
654 Views
2 Replies
Replies (2)
Message 2 of 3

Alexander.Rivilis
Mentor
Mentor
Accepted solution

 

static void UnselectIcon(void)
{
  resbuf rb;
  if (acedGetVar(_T("UCSSELECTMODE"), &rb) == RTNORM) {
    if (rb.resval.rint == 1) {
      rb.resval.rint = 0;
      acedSetVar(_T("UCSSELECTMODE"), &rb);
    }
  }
}

 

 

You do not need acedCommand(s). You can use acedSetVar.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks very much. it looks very elegant.

0 Likes