ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to check exist command

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
836 Views, 4 Replies

How to check exist command

now we use objectarx to build applicataion, when we register new command,what happen when command name, we register conflict with orher command in autocad.

 

Tags (1)
4 REPLIES 4
Message 2 of 5
Alexander.Rivilis
in reply to: Anonymous

Try to use acedGetCName function.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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

Message 3 of 5
Anonymous
in reply to: Alexander.Rivilis

can you give me example,I am beginner.thanks.

Message 4 of 5
Alexander.Rivilis
in reply to: Anonymous


@Anonymous wrote:

what happen when command name, we register conflict with orher command in autocad.


Is that a question? If the name of your's command is the same as AutoCAD command, or the same as command registering from other arx/dll and your's arx-file register command after other application with the same name - your's registered command will be called instead of other command. With help of acedGetCname you can test defined command with the same name or no:

  bool IsCommandDefined(ACHAR *name)
  {
    ACHAR *result = NULL;
    bool ret = (acedGetCName(name,&result) == RTNORM);
    delete result;
    return ret;
  }
  
  void TESTCMDNAME(void)
  {
    ACHAR name[512];
    if (acedGetString(FALSE,L"\nType cmd name: ",name) == RTNORM) {
      acutPrintf(L"\nCommand <%s> is%s defined", name, IsCommandDefined(name)? L"" : L" not");
    };
  }

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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

Message 5 of 5
Anonymous
in reply to: Alexander.Rivilis

Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost