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

NETLOAD assembly and read a dwg invisibly

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
338 Views, 6 Replies

NETLOAD assembly and read a dwg invisibly

is there a way that i can run AutoCad invisibly (as a background process i.e with loading the interface) and NetLoad my Assembly and call a method from that assembly which reads blocks out of a Drawing.

Please help Edited by: aps_brar on Dec 17, 2008 7:09 AM
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Howdy,
I am not sure about the ‘invisible’ AutoCad part.

Download this and give it a try.
http://topologyframework.blogspot.com/2008/11/simple-named-pipes-solution-for.html

This one will give you additional insight as to what else can be done.
http://topologyframework.blogspot.com/2008/10/inter-process-communication-ipc-with.html

In these scenarios no methods are invoked or called from the “other” (non AutoCad) process. Within the NETLOADed module there is a simple case structure in place to respond to a “task” that was received via the pipe.

r,
dennis
Message 3 of 7
Anonymous
in reply to: Anonymous


If you start AutoCAD via COM, it should not be visible (well,
it was

that way at one time, but I haven't checked if it still is).
Aside from

the initial visibility, there's nothing special about what you
do, other

than using COM to send a string to the command line (e.g,
the

SendCommand() method), to execute your assembly's
command.

 

You can register your assembly to load automatically when one
of

its commands is used.  See ARX docs for
details.


 

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000
through 2009

href="http://www.acadxtabs.com">http://www.acadxtabs.com

 


 

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
is
there a way that i can run AutoCad invisibly (as a background process i.e with
loading the interface) and NetLoad my Assembly and call a method from that
assembly which reads blocks out of a Drawing. Please help Edited by: aps_brar
on Dec 17, 2008 7:09 AM
Message 4 of 7
Anonymous
in reply to: Anonymous

ok, i can run AutoCad from my .net app and then use acApp.ActiveDocument.SendCommand("netload "D:\Downloads\dotnetarx_demo\CsMgd1\bin\Debug\CsMgd1.dll""); to run NETLOAD. it was always showing a filedialog so i got rid of by calling acApp.ActiveDocument.SetVariable("FILEDIA", false);
but now my problem is that the netload command just sits in the commandline waiting for the enter key to be hit.

i want to drive the whole show from my .net exe where user can select a few drawings from a listview and click a button scan and then my app will start autocad through com and load my ManagedArx (or whatever it is called) assembly into autocad then i want to use sendcommand to call the main method of the loaded assmbly which will scan the drawings and update info in the database.

Is NETLOAD the only way of doing this or am i missing something?

Any help will be highly appreciated
Message 5 of 7
Anonymous
in reply to: Anonymous


See if this works:

 

      doc.SendCommand("(command
\"._NETLOAD\" \"YourAssemblyFile.dll\")\n")


 

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000
through 2009

href="http://www.acadxtabs.com">http://www.acadxtabs.com

 


 

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
ok,
i can run AutoCad from my .net app and then use
acApp.ActiveDocument.SendCommand("netload
"D:\Downloads\dotnetarx_demo\CsMgd1\bin\Debug\CsMgd1.dll""); to run NETLOAD.
it was always showing a filedialog so i got rid of by calling
acApp.ActiveDocument.SetVariable("FILEDIA", false); but now my problem is that
the netload command just sits in the commandline waiting for the enter key to
be hit. i want to drive the whole show from my .net exe where user can select
a few drawings from a listview and click a button scan and then my app will
start autocad through com and load my ManagedArx (or whatever it is called)
assembly into autocad then i want to use sendcommand to call the main method
of the loaded assmbly which will scan the drawings and update info in the
database. Is NETLOAD the only way of doing this or am i missing something? Any
help will be highly appreciated
Message 6 of 7
Anonymous
in reply to: Anonymous

Thanks Tony that did the trick for me, it saved me a lot of hassle and time
Message 7 of 7
Anonymous
in reply to: Anonymous

Hey aps_brar

can u share your code snnipet of "Netload" command to run AutoCad from .net App.

thanks

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