.NET

Reply
*Randy Richardson
Message 1 of 9 (555 Views)

Netload problem

555 Views, 8 Replies
11-17-2006 11:18 PM
It seems that the only time the netload command works is when AutoCAD is
opened by Visual Studio.

Anyone have any idea what I'm doing wrong?

Since the only net DLL's I have are ones that I compiled, it could be some
kind of compilation error too. None of the samples supplied with the SDK
seem to be pre-compiled. I should probably try netloading someone else's
DLL if I knew where to find one.

Thanks,

Randy Richardson
Hattiesburg, MS
*Randy Richardson
Message 2 of 9 (555 Views)

Re: Netload problem

11-18-2006 07:10 AM in reply to: *Randy Richardson
Well I found the problem, but the solution brings up concerns. I'll address
that in another post. Anyway, the problem was that, in my desktop icon that
starts autocad, under properties, the "Start in:" folder was "C:\Program
Files\AutoCAD 2007\UserDataCache\" . I changed it to "C:\Program
Files\AutoCAD 2007\" and now it works just fine. I'd be estatic if it
weren't for the other concerns it brings up.

Randy Richardson
Hattiesburg, MS

"Randy Richardson" wrote in message
news:5400671@discussion.autodesk.com...
It seems that the only time the netload command works is when AutoCAD is
opened by Visual Studio.

Anyone have any idea what I'm doing wrong?

Since the only net DLL's I have are ones that I compiled, it could be some
kind of compilation error too. None of the samples supplied with the SDK
seem to be pre-compiled. I should probably try netloading someone else's
DLL if I knew where to find one.

Thanks,

Randy Richardson
Hattiesburg, MS
*Norman Yuan
Message 3 of 9 (555 Views)

Re: Netload problem

11-18-2006 07:56 AM in reply to: *Randy Richardson
When you say "netload" not working, what does that mean? Do you not see the
open file dialog box, or do you see error message after load the dll?

As for Acad's "Atart in" folder is set to
"C:\...\AcadInstall\UserDataCache\" for the short-cut, as you mentioned in
the other post, although your change seems solved your problem for now, I
doudt it is the real reason. My Acad2006 and Acad2007's (on the same
computer) short-cut have the same settings and "NETLOAD" command works well
for both.

You may want to tell your Acad's version, your VS's version, and what
exactly mean "netload" not working, so that some can help find an anwser.

"Randy Richardson" wrote in message
news:5400671@discussion.autodesk.com...
It seems that the only time the netload command works is when AutoCAD is
opened by Visual Studio.

Anyone have any idea what I'm doing wrong?

Since the only net DLL's I have are ones that I compiled, it could be some
kind of compilation error too. None of the samples supplied with the SDK
seem to be pre-compiled. I should probably try netloading someone else's
DLL if I knew where to find one.

Thanks,

Randy Richardson
Hattiesburg, MS
*Randy Richardson
Message 4 of 9 (555 Views)

Re: Netload problem

11-18-2006 01:03 PM in reply to: *Randy Richardson
I did not see the netload dialog box but I didn't expect to see it because
it was invoked in an AutoLISP program, which specified the DLL to be loaded.
The reason I say it doesn't work is that the when I try to use a custom
AutoCAD command that was defined in the dll I get an "Unknown Command"
error, and when I try to use a custom AutoLISP function that was defined in
the dll I get a "no function definition" error.

I'm using AutoCAD 2007 and Visual Studio 2005.

As I said, running AutoCAD in the AutoCAD root directory solves the problem,
but, I'm wondering, at what cost? And I'd sure be interested to know why it
works fine without doing that for others but not for me.

Randy Richardson
Hattiesburg, MS

"Norman Yuan" wrote in message
news:5400738@discussion.autodesk.com...
When you say "netload" not working, what does that mean? Do you not see the
open file dialog box, or do you see error message after load the dll?

As for Acad's "Atart in" folder is set to
"C:\...\AcadInstall\UserDataCache\" for the short-cut, as you mentioned in
the other post, although your change seems solved your problem for now, I
doudt it is the real reason. My Acad2006 and Acad2007's (on the same
computer) short-cut have the same settings and "NETLOAD" command works well
for both.

You may want to tell your Acad's version, your VS's version, and what
exactly mean "netload" not working, so that some can help find an anwser.

"Randy Richardson" wrote in message
news:5400671@discussion.autodesk.com...
It seems that the only time the netload command works is when AutoCAD is
opened by Visual Studio.

Anyone have any idea what I'm doing wrong?

Since the only net DLL's I have are ones that I compiled, it could be some
kind of compilation error too. None of the samples supplied with the SDK
seem to be pre-compiled. I should probably try netloading someone else's
DLL if I knew where to find one.

Thanks,

Randy Richardson
Hattiesburg, MS
*Norman Yuan
Message 5 of 9 (555 Views)

Re: Netload problem

11-19-2006 07:51 AM in reply to: *Randy Richardson
Check your project's reference to acdbmgd.dll and acmgd.dll, make sure their
"Copy Local" set to False. That is, make VS2005 not copy the two DLLs to the
folder where your dll is in when compiling your project.


"Randy Richardson" wrote in message
news:5400852@discussion.autodesk.com...
I did not see the netload dialog box but I didn't expect to see it because
it was invoked in an AutoLISP program, which specified the DLL to be loaded.
The reason I say it doesn't work is that the when I try to use a custom
AutoCAD command that was defined in the dll I get an "Unknown Command"
error, and when I try to use a custom AutoLISP function that was defined in
the dll I get a "no function definition" error.

I'm using AutoCAD 2007 and Visual Studio 2005.

As I said, running AutoCAD in the AutoCAD root directory solves the problem,
but, I'm wondering, at what cost? And I'd sure be interested to know why it
works fine without doing that for others but not for me.

Randy Richardson
Hattiesburg, MS

"Norman Yuan" wrote in message
news:5400738@discussion.autodesk.com...
When you say "netload" not working, what does that mean? Do you not see the
open file dialog box, or do you see error message after load the dll?

As for Acad's "Atart in" folder is set to
"C:\...\AcadInstall\UserDataCache\" for the short-cut, as you mentioned in
the other post, although your change seems solved your problem for now, I
doudt it is the real reason. My Acad2006 and Acad2007's (on the same
computer) short-cut have the same settings and "NETLOAD" command works well
for both.

You may want to tell your Acad's version, your VS's version, and what
exactly mean "netload" not working, so that some can help find an anwser.

"Randy Richardson" wrote in message
news:5400671@discussion.autodesk.com...
It seems that the only time the netload command works is when AutoCAD is
opened by Visual Studio.

Anyone have any idea what I'm doing wrong?

Since the only net DLL's I have are ones that I compiled, it could be some
kind of compilation error too. None of the samples supplied with the SDK
seem to be pre-compiled. I should probably try netloading someone else's
DLL if I knew where to find one.

Thanks,

Randy Richardson
Hattiesburg, MS
*Paul Richardson
Message 6 of 9 (555 Views)

Re: Netload problem

11-21-2006 09:28 AM in reply to: *Randy Richardson
Setting 'CopyLocal' is only necessary for 'acmgd'. As far as I know
'acdbmgd' is not demand loaded. Works on my end anyway.


"Norman Yuan" wrote in message
news:5401020@discussion.autodesk.com...
Check your project's reference to acdbmgd.dll and acmgd.dll, make sure their
"Copy Local" set to False. That is, make VS2005 not copy the two DLLs to the
folder where your dll is in when compiling your project.


"Randy Richardson" wrote in message
news:5400852@discussion.autodesk.com...
I did not see the netload dialog box but I didn't expect to see it because
it was invoked in an AutoLISP program, which specified the DLL to be loaded.
The reason I say it doesn't work is that the when I try to use a custom
AutoCAD command that was defined in the dll I get an "Unknown Command"
error, and when I try to use a custom AutoLISP function that was defined in
the dll I get a "no function definition" error.

I'm using AutoCAD 2007 and Visual Studio 2005.

As I said, running AutoCAD in the AutoCAD root directory solves the problem,
but, I'm wondering, at what cost? And I'd sure be interested to know why it
works fine without doing that for others but not for me.

Randy Richardson
Hattiesburg, MS

"Norman Yuan" wrote in message
news:5400738@discussion.autodesk.com...
When you say "netload" not working, what does that mean? Do you not see the
open file dialog box, or do you see error message after load the dll?

As for Acad's "Atart in" folder is set to
"C:\...\AcadInstall\UserDataCache\" for the short-cut, as you mentioned in
the other post, although your change seems solved your problem for now, I
doudt it is the real reason. My Acad2006 and Acad2007's (on the same
computer) short-cut have the same settings and "NETLOAD" command works well
for both.

You may want to tell your Acad's version, your VS's version, and what
exactly mean "netload" not working, so that some can help find an anwser.

"Randy Richardson" wrote in message
news:5400671@discussion.autodesk.com...
It seems that the only time the netload command works is when AutoCAD is
opened by Visual Studio.

Anyone have any idea what I'm doing wrong?

Since the only net DLL's I have are ones that I compiled, it could be some
kind of compilation error too. None of the samples supplied with the SDK
seem to be pre-compiled. I should probably try netloading someone else's
DLL if I knew where to find one.

Thanks,

Randy Richardson
Hattiesburg, MS
*Randy Richardson
Message 7 of 9 (555 Views)

Re: Netload problem

11-21-2006 10:23 PM in reply to: *Randy Richardson
In order to test your advice, I changed the "Start In:" folder back to the
UserDataCache folder.

I changed the Copy Local property to false for acdbmgd.dll and acmgd.dll as
per Norman's advice. I built the project. I opened AutoCAD to test it, and
it didn't work. I closed AutoCAD, and set the Copy Local property back to
true for acdbmgd.dll as per Paul's advice. I built the project. I opened
AutoCAD to test it, and it didn't work. I closed AutoCAD, and set the
"Start In:" back to the AutoCAD root folder. I opened AutoCAD to test it,
and this time it worked.

So it looks like the Copy Local property has nothing to do with this
problem. It looks like I'm stuck with changing the "Start In:" folder for
AutoCAD.

Thanks for your efforts.

Randy Richardson
Hattiesburg, MS


"Paul Richardson" wrote in message
news:5402961@discussion.autodesk.com...
Setting 'CopyLocal' is only necessary for 'acmgd'. As far as I know
'acdbmgd' is not demand loaded. Works on my end anyway.


"Norman Yuan" wrote in message
news:5401020@discussion.autodesk.com...
Check your project's reference to acdbmgd.dll and acmgd.dll, make sure their
"Copy Local" set to False. That is, make VS2005 not copy the two DLLs to the
folder where your dll is in when compiling your project.


"Randy Richardson" wrote in message
news:5400852@discussion.autodesk.com...
I did not see the netload dialog box but I didn't expect to see it because
it was invoked in an AutoLISP program, which specified the DLL to be loaded.
The reason I say it doesn't work is that the when I try to use a custom
AutoCAD command that was defined in the dll I get an "Unknown Command"
error, and when I try to use a custom AutoLISP function that was defined in
the dll I get a "no function definition" error.

I'm using AutoCAD 2007 and Visual Studio 2005.

As I said, running AutoCAD in the AutoCAD root directory solves the problem,
but, I'm wondering, at what cost? And I'd sure be interested to know why it
works fine without doing that for others but not for me.

Randy Richardson
Hattiesburg, MS

"Norman Yuan" wrote in message
news:5400738@discussion.autodesk.com...
When you say "netload" not working, what does that mean? Do you not see the
open file dialog box, or do you see error message after load the dll?

As for Acad's "Atart in" folder is set to
"C:\...\AcadInstall\UserDataCache\" for the short-cut, as you mentioned in
the other post, although your change seems solved your problem for now, I
doudt it is the real reason. My Acad2006 and Acad2007's (on the same
computer) short-cut have the same settings and "NETLOAD" command works well
for both.

You may want to tell your Acad's version, your VS's version, and what
exactly mean "netload" not working, so that some can help find an anwser.

"Randy Richardson" wrote in message
news:5400671@discussion.autodesk.com...
It seems that the only time the netload command works is when AutoCAD is
opened by Visual Studio.

Anyone have any idea what I'm doing wrong?

Since the only net DLL's I have are ones that I compiled, it could be some
kind of compilation error too. None of the samples supplied with the SDK
seem to be pre-compiled. I should probably try netloading someone else's
DLL if I knew where to find one.

Thanks,

Randy Richardson
Hattiesburg, MS
*Paul Richardson
Message 8 of 9 (555 Views)

Re: Netload problem

11-22-2006 02:17 PM in reply to: *Randy Richardson
The demand loading problem with acmgd is only when debugging. So
as Norman said setting 'copy local' to false will allow you to run custom
commands
while debugging without getting an error.

Seems you had a different issue.

"Randy Richardson" wrote in message
news:5403728@discussion.autodesk.com...
In order to test your advice, I changed the "Start In:" folder back to the
UserDataCache folder.

I changed the Copy Local property to false for acdbmgd.dll and acmgd.dll as
per Norman's advice. I built the project. I opened AutoCAD to test it, and
it didn't work. I closed AutoCAD, and set the Copy Local property back to
true for acdbmgd.dll as per Paul's advice. I built the project. I opened
AutoCAD to test it, and it didn't work. I closed AutoCAD, and set the
"Start In:" back to the AutoCAD root folder. I opened AutoCAD to test it,
and this time it worked.

So it looks like the Copy Local property has nothing to do with this
problem. It looks like I'm stuck with changing the "Start In:" folder for
AutoCAD.

Thanks for your efforts.

Randy Richardson
Hattiesburg, MS


"Paul Richardson" wrote in message
news:5402961@discussion.autodesk.com...
Setting 'CopyLocal' is only necessary for 'acmgd'. As far as I know
'acdbmgd' is not demand loaded. Works on my end anyway.


"Norman Yuan" wrote in message
news:5401020@discussion.autodesk.com...
Check your project's reference to acdbmgd.dll and acmgd.dll, make sure their
"Copy Local" set to False. That is, make VS2005 not copy the two DLLs to the
folder where your dll is in when compiling your project.


"Randy Richardson" wrote in message
news:5400852@discussion.autodesk.com...
I did not see the netload dialog box but I didn't expect to see it because
it was invoked in an AutoLISP program, which specified the DLL to be loaded.
The reason I say it doesn't work is that the when I try to use a custom
AutoCAD command that was defined in the dll I get an "Unknown Command"
error, and when I try to use a custom AutoLISP function that was defined in
the dll I get a "no function definition" error.

I'm using AutoCAD 2007 and Visual Studio 2005.

As I said, running AutoCAD in the AutoCAD root directory solves the problem,
but, I'm wondering, at what cost? And I'd sure be interested to know why it
works fine without doing that for others but not for me.

Randy Richardson
Hattiesburg, MS

"Norman Yuan" wrote in message
news:5400738@discussion.autodesk.com...
When you say "netload" not working, what does that mean? Do you not see the
open file dialog box, or do you see error message after load the dll?

As for Acad's "Atart in" folder is set to
"C:\...\AcadInstall\UserDataCache\" for the short-cut, as you mentioned in
the other post, although your change seems solved your problem for now, I
doudt it is the real reason. My Acad2006 and Acad2007's (on the same
computer) short-cut have the same settings and "NETLOAD" command works well
for both.

You may want to tell your Acad's version, your VS's version, and what
exactly mean "netload" not working, so that some can help find an anwser.

"Randy Richardson" wrote in message
news:5400671@discussion.autodesk.com...
It seems that the only time the netload command works is when AutoCAD is
opened by Visual Studio.

Anyone have any idea what I'm doing wrong?

Since the only net DLL's I have are ones that I compiled, it could be some
kind of compilation error too. None of the samples supplied with the SDK
seem to be pre-compiled. I should probably try netloading someone else's
DLL if I knew where to find one.

Thanks,

Randy Richardson
Hattiesburg, MS
Distinguished Contributor
JamieVJohnson
Posts: 136
Registered: ‎09-29-2008
Message 9 of 9 (555 Views)

Re: Netload problem

02-20-2009 12:37 PM in reply to: *Randy Richardson
Thanks for this post Paul...



AutoCAD 2009, Visual Studio 2005, .Net 2.0 project... same problem, same solution.



Just to prove the point to myself, I created 2 icons. One with start in mapped to c:\program files\AutoCAD 2009 the other mapped to ...AutoCAD 2009\UserCacheData Then opened them at the same time. Then ran my netload command on each one. The usercachedata version failed in the same way. If you think about it it makes sense, most of the dlls needed to run are in the root folder, including some of my overwritten acad.config files.



Again, Thanks guys



jvj
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.