Hello All, I am new in .net programming and I have writing ruby codes more then 3 years. I want to write some codes, taking data from excel files to make something and drawing somethings in AutoCAD. I searched google and found some links about IronRuby and AutoCAD.. But, i could not find step-by-step integration IronRuby and AutoCAD. This site http://through-the-interface.typepad.com/through_the_interface/2009/04/using-ironruby-inside-autocad.html is give me some idea for integration.. But i could not find any information why i use C# for integration to ruby for autocad. How can i find the proper information AutoCAD and IronRuby integration? - especially step-by-step guide - Thank you for helps now.. Regards, Murat USTUNTAS --
I very much doubt that there is a step by step guide for that, since only one other person on the world seemed interested in this. On Mon, Feb 28, 2011 at 11:18 AM, Murat ?ST?NTA? <ustuntas at ekatek.com.tr>wrote:> Hello All, > > I am new in .net programming and I have writing ruby codes more then 3 > years. > I want to write some codes, taking data from excel files to make something > and > drawing somethings in AutoCAD. > > I searched google and found some links about IronRuby and AutoCAD.. But, i > could > not find step-by-step integration IronRuby and AutoCAD. > > This site > http://through-the-interface.typepad.com/through_the_interface/2009/04/using-ironruby-inside-autocad.html > is give me some idea for integration.. But i could not find any information > why i use > C# for integration to ruby for autocad. > > How can i find the proper information AutoCAD and IronRuby integration? - > especially > step-by-step guide - > > Thank you for helps now.. Regards, > > Murat USTUNTAS > > > > > > -- > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20110228/5f4e447f/attachment.html>
I have no AutoCAD experience, so is not something I can personally help with. I agree with Andrius in that there are probably very few people that would need (or want) this kind of integration. On the other hand, if AutoCAD has a .NET API then using IronRuby is a least a possibility. Is there anyone in the IronRuby community familiar with AutoCAD and it''s API''s willing to give Murat a hand with this? Mike @WebCoding4Fun on Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20110228/bcd496ef/attachment.html>
Thank you Mike, I assume that this is very tricky.. But, i hope that somebody knows about AutoCAD and .NET Api integration in this comminity.. Regards, Murat USTUNTAS On 02/28/2011 02:59 PM, Mike Hatfield wrote:> > I have no AutoCAD experience, so is not something I can personally > help with. I agree with Andrius in that there are probably very few > people that would need (or want) this kind of integration. On the > other hand, if AutoCAD has a .NET API then using IronRuby is a least a > possibility. > > Is there anyone in the IronRuby community familiar with AutoCAD and > it''s API''s willing to give Murat a hand with this? > > Mike > > @WebCoding4Fun on Twitter > > > -- > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core-- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20110301/c4f968ae/attachment.html>
The world would be a very boring place if we would do only stuff that was already done, wouldn''t it? On Tue, Mar 1, 2011 at 7:21 AM, Murat ?ST?NTA? <ustuntas at ekatek.com.tr>wrote:> Thank you Mike, > > I assume that this is very tricky.. But, i hope that somebody knows about > AutoCAD and .NET Api > integration in this comminity.. > > Regards, > > Murat USTUNTAS > > > > On 02/28/2011 02:59 PM, Mike Hatfield wrote: > > I have no AutoCAD experience, so is not something I can personally help > with. I agree with Andrius in that there are probably very few people that > would need (or want) this kind of integration. On the other hand, if > AutoCAD has a .NET API then using IronRuby is a least a possibility. > > Is there anyone in the IronRuby community familiar with AutoCAD and it''s > API''s willing to give Murat a hand with this? > > Mike > > @WebCoding4Fun on Twitter > > -- > > > _______________________________________________ > Ironruby-core mailing listIronruby-core at rubyforge.orghttp://rubyforge.org/mailman/listinfo/ironruby-core > > > > -- > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20110301/1c7925c4/attachment-0001.html>
I have played around with this. There are 2 steps: 1. Using the example given in the "Through the Interface" post you have to use an existing .net language to create a "script engine" to allow AutoCAD and Ironruby to talk. You should be able to copy Kean Walmsley''s script directly, pick the right .dll''s for you version of AutoCAD, load them and in your project in either Visual Studio or I have used SharpDevelop, and follow the rest of Kean''s directions to run scripts in AutoCAD. That is the hardest part. It took me awhile to get step 1 to work. 2. Use either the "win32ole" library or .net libraries to connect to excel. The best place I have found to read about the win32ole library is: http://rubyonwindows.blogspot.com/search/label/excel If you want to use .net libraries and you can''t find ironruby examples, find VB.net examples and the are the easiest to translate to ruby. Side Notes: 1. MRI ruby can connect to autocad using the "win32ole" library. It is virtually the same as using VBA. Don''t know how long this ability will last since VBA is going away. 2. David Blackmon has created helper libraries for drawing things in autocad at: http://www.davidkblackmon.com/autocad B/c coding autocad in .net is very messy. My understanding is David took what Kean did in his post and tried improve and expand it. Last I tried to get David''s version to work I couldn''t. But I knew a lot less then :) I am not sure if he is actively working on his autocad_helper library or not. The previous commenters were correct in that there is not many people interested in this subject yet. I am. I am constanly working in excel and autocad so I will be glad to answer any question that I can. If you can give me your version of windows and your version of Autocad I can probably get you started. From there you can explore the vast undiscovered potential the 2-3 other people interested in this subject get to wander in. Timothy Barnes -- Posted via http://www.ruby-forum.com/.
Hello Timothy, I am very pleased for this information from you. If you give me your email address i want to talk to you directly. I am planing to user AutoCAD 2010 or AutoCAD 2011 - also later ZwCAD 2011 - and I am using Windows 7 pro 64bit, Micosoft Office XP. If we will fulfill in this project, i am planing to write a documantation about this integration in very detail.. Regards, Murat USTUNTAS On 03/02/2011 10:40 PM, Timothy Barnes wrote:> I have played around with this. > > There are 2 steps: > > 1. Using the example given in the "Through the Interface" post you have > to use an existing .net language to create a "script engine" to allow > AutoCAD and Ironruby to talk. You should be able to copy Kean Walmsley''s > script directly, pick the right .dll''s for you version of AutoCAD, load > them and in your project in either Visual Studio or I have used > SharpDevelop, and follow the rest of Kean''s directions to run scripts in > AutoCAD. > > That is the hardest part. It took me awhile to get step 1 to work. > > 2. Use either the "win32ole" library or .net libraries to connect to > excel. The best place I have found to read about the win32ole library > is: http://rubyonwindows.blogspot.com/search/label/excel > If you want to use .net libraries and you can''t find ironruby examples, > find VB.net examples and the are the easiest to translate to ruby. > > Side Notes: > > 1. MRI ruby can connect to autocad using the "win32ole" library. It is > virtually the same as using VBA. Don''t know how long this ability will > last since VBA is going away. > > 2. David Blackmon has created helper libraries for drawing things in > autocad at: > http://www.davidkblackmon.com/autocad > B/c coding autocad in .net is very messy. > My understanding is David took what Kean did in his post and tried > improve and expand it. Last I tried to get David''s version to work I > couldn''t. But I knew a lot less then :) I am not sure if he is actively > working on his autocad_helper library or not. > > The previous commenters were correct in that there is not many people > interested in this subject yet. I am. > > I am constanly working in excel and autocad so I will be glad to answer > any question that I can. If you can give me your version of windows and > your version of Autocad I can probably get you started. From there you > can explore the vast undiscovered potential the 2-3 other people > interested in this subject get to wander in. > > Timothy Barnes >--
You can email me at: barnes7td at sbcglobal.net Timothy -- Posted via http://www.ruby-forum.com/.
Don''t use the email above. I am having problems with it. Instead use: barnes7td at gmail.com Sorry. Timothy -- Posted via http://www.ruby-forum.com/.
Hi, Timothy is correct. I am not actively working on my gem any longer. Mainly because there wasn''t much interest. But I remain convinced that using Ruby to code against the Acad .net API can be a great way to go. I haven''t even tried to compile any of my code with the newer versions of IronRuby or Acad. (It has been over a year since I worked on it) But I would be willing to try again if there is some interest. Anyone that is interested can contact me davidkblackmon at gmail DOT com. I would love if we could build some interest in using IronRuby with AutoCad. Thanks, David Blackmon -- Posted via http://www.ruby-forum.com/.
Hello David, I am happy to hear your noise. I hope that open source programming languages will be very popular and attractive for this type of programming (Acad, Office, and others). So please you refresh and develop your gem.. Regards, Murat USTUNTAS On 03/09/2011 03:52 AM, David B. wrote:> Hi, > Timothy is correct. I am not actively working on my gem any longer. > Mainly because there wasn''t much interest. > > But I remain convinced that using Ruby to code against the Acad .net API > can be a great way to go. > > I haven''t even tried to compile any of my code with the newer versions > of IronRuby or Acad. (It has been over a year since I worked on it) > > But I would be willing to try again if there is some interest. > > Anyone that is interested can contact me davidkblackmon at gmail DOT > com. > > I would love if we could build some interest in using IronRuby with > AutoCad. > > > Thanks, > David Blackmon >--
Murat, I was successful in getting Excel to talk to AutoCAD. I had to revert back to IronRuby 0.9.1 b/c IronRuby 1+, so far has been kicked out of Autocad saying that .NET is too new. Here is what I used: Applications: SharpDevelop 4.0 (b/c I''m new to visual studio) IronRuby 0.9.1 Autocad 2011 Excel 2007 References: (AutoCAD Specific) -find these files in C:\Program Files\Autodesk\AutoCAD 2011 or wherever your program is located at. acdbmgd.dll acmgd.dll IronRuby Libraries -find in Ironruby\bin IronRuby.dll IronRuby.Libraries.dll IronRuby.Libraries.Yaml.dll Microsoft.Dynamic.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.Debugging.dll Standard Libraries System.dll System.Core.dll System.Xml.dll System.Xml.Linq.dll Code: AL.cs - C# bridge (build project and type ''netload'' in AutoCAD to load resulting .dll file) xl_2_acad.rb - after you have successfully load ironruby type ''RBLOAD'' @ AutoCAD command prompt and select this file xl_2_acad.xlsx - must be at location ''C:\xl_2_acad.xlsx'' to work or change ruby script I have attached the code and excel files that I used. (the ruby code is literally thrown together) Let me know if your were successful. I will continue to try and get IronRuby 1+ to work and even possibly the ''win32ole'' library since I am used to scripting excel with it instead of the .net methods. Also I will try and get David''s helper methods up and working. Timothy Attachments: http://www.ruby-forum.com/attachment/6089/xl_2_acad.xlsx http://www.ruby-forum.com/attachment/6090/AL.cs http://www.ruby-forum.com/attachment/6091/xl_2_acad.rb -- Posted via http://www.ruby-forum.com/.
Hi Timothy, This is very very good news for me.. I just try this. I hope so i will fulfill in your way.. Regards, Mura USTUNTAS On 03/30/2011 03:48 AM, Timothy Barnes wrote:> Murat, > > I was successful in getting Excel to talk to AutoCAD. I had to revert > back to IronRuby 0.9.1 b/c IronRuby 1+, so far has been kicked out of > Autocad saying that .NET is too new. > > Here is what I used: > > Applications: > SharpDevelop 4.0 (b/c I''m new to visual studio) > IronRuby 0.9.1 > Autocad 2011 > Excel 2007 > > References: > (AutoCAD Specific) -find these files in C:\Program > Files\Autodesk\AutoCAD 2011 or wherever your program is located at. > acdbmgd.dll > acmgd.dll > > IronRuby Libraries -find in Ironruby\bin > IronRuby.dll > IronRuby.Libraries.dll > IronRuby.Libraries.Yaml.dll > Microsoft.Dynamic.dll > Microsoft.Scripting.Core.dll > Microsoft.Scripting.Debugging.dll > > Standard Libraries > System.dll > System.Core.dll > System.Xml.dll > System.Xml.Linq.dll > > Code: > AL.cs - C# bridge (build project and type ''netload'' in AutoCAD to load > resulting .dll file) > > xl_2_acad.rb - after you have successfully load ironruby type ''RBLOAD'' @ > AutoCAD command prompt and select this file > > xl_2_acad.xlsx - must be at location ''C:\xl_2_acad.xlsx'' to work or > change ruby script > > I have attached the code and excel files that I used. (the ruby code is > literally thrown together) Let me know if your were successful. I will > continue to try and get IronRuby 1+ to work and even possibly the > ''win32ole'' library since I am used to scripting excel with it instead of > the .net methods. Also I will try and get David''s helper methods up and > working. > > > Timothy > > Attachments: > http://www.ruby-forum.com/attachment/6089/xl_2_acad.xlsx > http://www.ruby-forum.com/attachment/6090/AL.cs > http://www.ruby-forum.com/attachment/6091/xl_2_acad.rb > >--