Send Commands to Active AutoCAD Application

Send Commands to Active AutoCAD Application

C_Haines_ENG
Collaborator Collaborator
511 Views
1 Reply
Message 1 of 2

Send Commands to Active AutoCAD Application

C_Haines_ENG
Collaborator
Collaborator

Is there a way to send specific commands from Inventor to an active application of AutoCAD?

 

Say opening the print dialogue? or changing ltscale?

0 Likes
Accepted solutions (1)
512 Views
1 Reply
Reply (1)
Message 2 of 2

C_Haines_ENG
Collaborator
Collaborator
Accepted solution

I solved this by just reading the API on the AutoCAD forms.

 

ACADapp = GetObject(, "AutoCAD.Application") 
ACADDoc = ACADapp.ActiveDocument
Call ACADDoc.Sendcommand("YOUR COMMAND HERE" & vbCrLf)

This program will get an open version of AutoCAD and send your command from the YOUR COMMAND LINE area.

Alternatively you can use 

 

ACADapp = CreateObject("AutoCAD.Application") 
ACADDoc = ACADapp.ActiveDocument
Call ACADDoc.Sendcommand("YOUR COMMAND HERE" & vbCrLf)

 

To create a new instance of AutoCAD and send your commands there.