Jump to content

VB.NET out of process AUTOCAD


geogiac

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...