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

two drawings open, netloaded assy only works in one...

7 REPLIES 7
Reply
Message 1 of 8
JamesMaeding
487 Views, 7 Replies

two drawings open, netloaded assy only works in one...

I open a blank 2012 session with drawing1.dwg, then I open a new dwg "drawing2.dwg.

So one session, two blank drawings.

I netload an assy into drawing2, and can run a lispfunction from it.

I netload the the assy into drawing 1, and cannot run the lispfunction.

 

it says "error: no function definition:..."

 

How should the checking process normally be done, to see if a .net dll is loaded?

I normally do this with lisp:

(if (not mylispfunctionname)

  (progn

    (COMMAND "NETLOAD" DLLNAME)

    (vl-arx-import 'AcXt-GetColorNoBylayer) ;since I compile to separate namespace vlx's

  )

)

 

The separate namespace thing is secondary, and I am just talking about loading dll's by hand, and running functions from them on command line.

Once I get that ironed out, I can tackle how to detect from inside a vlx.

 

I saw Kean's post on making a dll to detect what dll's are loaded, but its not even working for me once I have that info.

thx


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

7 REPLIES 7
Message 2 of 8

The only way - to load dll before the opening of the drawings (for example, demandload from registry). Otherwise, the function with the attribute "lispfunction" only works in drawing, which was current in moment of NETLOAD.

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

wow, so its just lispfunctions that behave that way.

that is so unexpected, as .net commands are available to all dwgs once the dll is loaded.

 

Its also unexpected that drawings opened after the dll is loaded DO have the lispfunctions available.

If that is possible, why so hard (or why is it not automatic) to load into drawings already open?

 

Note that the pratical implications of this are not too bad, you just tell the user to reopen the drawing, you do not have to close the session and reopen it.

thanks a bunch for your help Alexander, it would take me much more time to see these patterns without your posts!

 


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 4 of 8

I've posted that behavior to ADN DevHelp Online some years ago. With AutoCAD 2013 I've not found that bug.

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

good tip.

I just searched devhelp site for keyword lispfunction and did not see your post.

I wonder how many other good articles are missing....


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 6 of 8

Smiley Happy You do not understand me correctly. I'm not a member of Developer Technical Services (DevTech) team, who are employees of Autodesk.
I am an ordinary member of the ADN (not employee of Autodesk), and as a member of the ADN I can ask questions and report bugs in the API directly to DevTech
team.


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

I must have implied that, but was actually just thinking you were an ADN member like me, and one of your help requests got turned into an article.

 

Let's say I did not want to have to use reals for any 1st element items in my lists.

The only alternative is serializing/deserializing the list right?

 

I wish I understood the reason the lists are viewed as entity info by default, even though there is no reason to assume that.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 8 of 8


@jmaeding wrote:
[...]The only alternative is serializing/deserializing the list right?[...]

I'm not sure this is the only alternative. But it have the right to exist.

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

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