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

New command not selectable

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
jmdeneyer
422 Views, 4 Replies

New command not selectable

Hello,

 

I use VS 2010 C# express with AcadNetAddinWizard and AcadMap 2012.

 

Il wrote a dll with 2 Commands what are working perfectly.

[CommandMethod ("croix")]
public static void Croix ()
{
...
}

[CommandMethod ("ArcLines")]
public static void ArcLines ()
{
...
}

After a while, I need a new thing. I write then a new command (ArcCenterLines).

[CommandMethod ("ArcCenterLines")]
public static void ArcCenterLines ()
{
...
}

There is no error on degugging compilation and a new DLL is created (date is at compilation time).

Acad is opening. On command line I write "NETLOAD" and select the new DLL in BIN/DEBUG.

 

The new command (ArcCenterLines) is not in the list and an error message appear if I write "ArcCenterLines" in command line.

Not understanding why is the new command not accessible, I modified the command "ArcLines" (just adding a WriteMessage) to see whats appening.

Recompiling, no error, new DLL at new time.

reopening of Acad, write netload and load the new DLL.

Nothing change. The message is not appearing when I choose "ArcLines" command.

I tried to delete BIN/DEBUG and compiling. A new DLL is well created, but still no "ArcCenterLines" command and no WriteMessage in "ArcLines".

 

What's appening ?

I don't understand why DLL seems to stay the same.

Is there a cache to clean (where ?) or something else to do ?

 

Thanks for your advices.

 

 

4 REPLIES 4
Message 2 of 5

Definitely you netloaded the previous version of dll-file. So you have to understand where previous dll-file version and delete it.

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

Is your new command in the same class as the previous commands? If not are you using commandclass attributes? If you are then you need to make sure that all classes that contain a command uses the commandclass attribute. It's a all or none situation.

You can also check the registry to see if your old dll is being auto loaded. You might have registered it sometime in the past. See this link. http://through-the-interface.typepad.com/through_the_interface/2006/09/automatic_loadi.html
Message 4 of 5
Keith.Brown
in reply to: jmdeneyer

Oops just reread about you modifying the original command so probably not a commandclass issue. So check the registry to see if auto loaded.
Message 5 of 5
jmdeneyer
in reply to: Keith.Brown

Thanks Keith.Brown,

 

I had a copy of the DLL in a "autoload" directory (where I putted my frequently used dlls). I forgot that "detail" ...
Because of that, Acad was not loading the "debug dll" but the dll in the "autoload directory".

Juste deleting that version was solving my problem,

 

Thanks again

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost