LOADCTRLS =2 didn't working right

LOADCTRLS =2 didn't working right

Anonymous
Not applicable
829 Views
5 Replies
Message 1 of 6

LOADCTRLS =2 didn't working right

Anonymous
Not applicable

I was confused that I set the value of LOADCTRLS as 2, which means the assembly will run when AutoCAD is open. But the reality is I have to input the command. by the way the version of AutoCAD is 2016. I'm not sure if it's because the setting of LOADCTRLS has changed. Or it's caused by some other things. 

Can anybody tell me how can I figure it out. Thanks anyway!

捕获.PNG 

0 Likes
830 Views
5 Replies
Replies (5)
Message 2 of 6

Alexander.Rivilis
Mentor
Mentor

With LOADCTRLS == 2 your dll-file have to be loaded on AutoCAD startup if DEMANDLOAD is not set to 0.

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

Anonymous
Not applicable

Is DEMANDLOAD a parameter or a setting? How can I set it to 0. Please show me with a code example. Thx.

0 Likes
Message 4 of 6

_gile
Consultant
Consultant

Hi,

 

DEMANDLOAD is a system variable.

You cannot set a system variable by code untill your app is not loaded.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 5 of 6

Anonymous
Not applicable

  Now I know DEMANDLOAD is a system variable. Sorry I didn't make it clear.  I was writing a plug-in with .NET. And as  far as I know, DEMANDLOAD is a variable for ObjectARX programs. I don't know whether it can be used for .NET programs. Further more, the default value of DEMANDLOAD is 3. That means "Demand-loads the source application when you open a drawing that contains custom objects or when you invoke one of the application's commands". And in the circumstance, I still need to input the demand even though LOADCTRLS was set as 2. That is to say DEMANDLOAD is not useful for .NET programs.

  So here comes the problem, based on a .NET programs, and I've set LOADCTRLS as 2,  What else should I do if I want to load a plug-in when I open a drawing that contains custom objects? 

0 Likes
Message 6 of 6

_gile
Consultant
Consultant

chguo123 a écrit :

  So here comes the problem, based on a .NET programs, and I've set LOADCTRLS as 2,  What else should I do if I want to load a plug-in when I open a drawing that contains custom objects


Maybe you should set LOADCTRLS at 1(1 - Load application upon detection of proxy object) or at 3 (2 | 1).



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes