Author Topic: Referenced DLL's and Netload  (Read 3040 times)

0 Members and 1 Guest are viewing this topic.

deckchairboy

  • Guest
Referenced DLL's and Netload
« on: June 19, 2007, 05:32:54 AM »
I have finally managed to crack creating a DLL and running it within Autocad using Netload. (Whoopeeee......)

However I have a some user controls which live in other Dlls and which I use in other projects.  Unsurprisingly AutoCad looks in its own directory for these and unsurprisinger still doesn't find them.  I really dont want, from an organisational point of view, to copy dlls into Autocads directory.

There must be a way of referencing these on a location flexible basis and any pointers would be gratefully received.

I am using VB.net in Visual Studio 2005 and Autocad 2007.

Regards...

MickD

  • King Gator
  • Posts: 3660
  • (x-in)->[process]->(y-out) ... simples!
Re: Referenced DLL's and Netload
« Reply #1 on: June 19, 2007, 05:56:56 AM »
I'm pretty sure that you can place your dll's in the same folder as your dll you load into acad which can be in any place (although over a network can give you other problems to deal with, the other way is to store them in the GAC.

Give that a go anyway, someone will be along shortly with a better detailed answer if that doesn't work for you.

And welcome aboard!
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Referenced DLL's and Netload
« Reply #2 on: June 19, 2007, 06:21:09 AM »
To netload you must have a qualified address, so you must either know the location of the DLL's or use the lisp (findfile "yourfile.dll") to locate it. Findfile only searches the ACAD 'Support File Search Path', so you could add the folder containing your DLL to the Search Path.

You'd need to be a bit more explicit about your requirements to receive a more detailed answer from me. 
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

deckchairboy

  • Guest
Re: Referenced DLL's and Netload
« Reply #3 on: June 19, 2007, 07:41:35 AM »
Thanks Peeps,

Told you they would be dumbass questions - Everything you said is quite correct, and I also found I can easily access the file sytem location of the loaded dll from

Dim WhereIsMyDLL as string = My.Application.Info.DirectoryPath

Wherever the dll is loaded from it tracks itself.

Oh the joy of .NET programming, my problem is that I am stuck in the dark days when everything was a chore.....

DCB



« Last Edit: June 19, 2007, 07:42:41 AM by deckchairboy »

TonyT

  • Guest
Re: Referenced DLL's and Netload
« Reply #4 on: June 19, 2007, 08:15:37 AM »
In most cases you can just place your dependent DLLS in the same place as
the primary DLL, but be forewarned that under certain, somewhat obscure
circumstances, a managed DLL will not function correctly if it is not located in
the same folder where ACAD.EXE is located.

I have finally managed to crack creating a DLL and running it within Autocad using Netload. (Whoopeeee......)

However I have a some user controls which live in other Dlls and which I use in other projects.  Unsurprisingly AutoCad looks in its own directory for these and unsurprisinger still doesn't find them.  I really dont want, from an organisational point of view, to copy dlls into Autocads directory.

There must be a way of referencing these on a location flexible basis and any pointers would be gratefully received.

I am using VB.net in Visual Studio 2005 and Autocad 2007.

Regards...