.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I am using Visual.net 2008 with autocad.net API, autocad2010, windows 7 home
right now, i want to start autocad.exe, and draw some lines in it, by using C# WindowsFormsApplication, not C# Class Library
still i cannot start autocad.exe
I hope to open cad by autocad.net API, not ObjectARX or others
I am a new one, please HELP ME
thanks very very much !
Re: How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
There is no exe autocad, you mean acad.exe?
You cant program in autocad through windows forms with just opening acad.exe with out ObjectARX
Re: How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
If you want to don't add any reference to acad's libraries
in this case just one way to do it is using late-binding to AutoCAD
There is a ton of code to do this work
C6309D9E0751D165D0934D0621DFF27919
Re: How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Here are 2 files were written on vb.net
See if this will be working fror you
C6309D9E0751D165D0934D0621DFF27919
Re: How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks very much ! really appreciate your great help ~
actually i work it out by using C# library
Re: How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Create Wndws Forms Application project
Name it AcadTestExe
Add form Form1 to project
Drop on form OpenFileDialog, texbox and button
Keep default names for all controls
Add class ReflectionCommands.cs
Copy all codes accodingy to classes, then hit F5
~'J'~
C6309D9E0751D165D0934D0621DFF27919
Re: How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Dear Hallex, you are genius!!!
I tried your codes, and it works very well~
Thank for your help, It's really great~
althought I cannot figured out how you fix it without adding any CAD liraries or dll
I am a new one in cad developping , these days I kept searching for any useful book or documents
still there is no result
Can you give me some advice for learning cad with C# ? Is there any useful documents for me ?
PS: I can draw circle by your incredible codes, Could you please tell me how to draw a ARC ?
Re: How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
C'mon
This is very simple code
Glad you like it
This project does not require any
CAD library
I tested it on A2009-2010 Win7
Will be back
~'J'~
C6309D9E0751D165D0934D0621DFF27919
Re: How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
your code is incredible simple, I enjoy it
I cannot understand you until now
with your help, I figured it how to draw an arc
thanks ~~~~~~
and please give me some advice ![]()
Re: How to open autocad.ex e in C# , PLEASE HELP!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
dear Hallex:
I use your code to draw some lines in cad,
It is ok in WIN7 64bit + AUTOCAD2008 and WinXP + AUTOCAD2004
but errors happened in WinXP + AUTOCAD2008
my code is :
for (int k = 1; k < iHH.OutHHXY.Row - 1; k++)
{
pt2[0] = iHH.OutHHXY[k, 0];
pt2[1] = iHH.OutHHXY[k, 1];
drawLineInObject(oSpace, pt1[0], pt1[1], pt2[0], pt2[1], "0");
pt1[0] = pt2[0];
pt1[1] = pt2[1];
}
The error happened in these lines:
object oLine = oBlock.GetType().InvokeMember("AddLine", BindingFlags.InvokeMethod, null, oBlock, pts);
oLine.GetType().InvokeMember("Layer", BindingFlags.SetProperty, null, oLine, new object[] { layer });
oLine.GetType().InvokeMember("Update", BindingFlags.InvokeMethod, null, oLine, null);
BUT , if I debug the loops one by one, It runs well. I am so confused~
please help me ~~
Thanks very much !!!


