.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Insert into ACAD 2010 .NET App

1 REPLY 1
Reply
Message 1 of 2
scott.cleveland
315 Views, 1 Reply

Insert into ACAD 2010 .NET App

I ahve a .net app which I want to have an insert occur but wnat to use the insert dialog built into autocad.

If I call:

m_objAcadApplication.ActiveDocument.SendCommand("INSERT\r");

I get the dialog, then through win32 api calls I can set the path and the block name on the dialog, but if I click OK the insert does not work - it will only work if I click the browse button and browse to the file name I just set. I did this also w/ win32 api (have select drawing file dialog) and set the filename, and then click the open button via win32 api - but it looks hacky.. Anyone know how the have the initial insert dialog go forward w/ the insert and not have to go w/ the select drawing dialog? Thanks Scott
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: scott.cleveland

The drawing file that's inserted is not stored in the path label, it's
stored in a private member variable that you can't get to.

Sorry to ask, but what is the point to this, verses just building your own
UI?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message
news:6270390@discussion.autodesk.com...
I ahve a .net app which I want to have an insert occur but wnat to use the
insert dialog built into autocad.

If I call:

m_objAcadApplication.ActiveDocument.SendCommand("INSERT\r");

I get the dialog, then through win32 api calls I can set the path and the
block name on the dialog, but if I click OK the insert does not work - it
will only work if I click the browse button and browse to the file name I
just set. I did this also w/ win32 api (have select drawing file dialog) and
set the filename, and then click the open button via win32 api - but it
looks hacky.. Anyone know how the have the initial insert dialog go forward
w/ the insert and not have to go w/ the select drawing dialog? Thanks Scott

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost