geogiac Posted May 21, 2010 Share Posted May 21, 2010 does anybody has a snippet of code thata does the following (completely out of process because i want to make an EXE that commands autocad) 1- open a transaction 2- activate a drawing 3- add a line in the database and in the modelspace 4 - closes the connection thanks Quote Link to comment Share on other sites More sharing options...
SEANT Posted May 21, 2010 Share Posted May 21, 2010 Hooking onto AutoCAD from an out of process application requires the use of a COM Interop, hence a “Transaction” will not be available. Fortunately, there is still a lot of manipulation available through that COM/ActiveX hook. Post #17 of this thread has an example establishing a COM hook. http://www.cadtutor.net/forum/showthread.php?t=39166 While it doesn’t actually add anything to a drawing database, it does show how to acquire the AutoCAD application. Entities can be added to a Block Table Record (i.e., Modelspace, Layout, etc.) in the same manner as shown in the AutoCAD Developer Help: ActiveX and VBA Reference. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.