.NET

Reply
Active Contributor
btillman
Posts: 48
Registered: ‎07-25-2012
Message 1 of 2 (333 Views)

Copy From Excel to Clipboard then to AutoCAD

333 Views, 1 Replies
10-29-2012 11:00 AM

I am working on a project which up until recently used Excel VBA and AutoCAD. To the point, one of the important things this process did was grab a range of cells in the Excel file and copy them to the clipboard. This range of cells was a nicely formatted table with borders, cell filled colors, etc... and the VBA code would copy it to the clipboard before laumching AutoCAD. Once AutoCAD was opened a LISP program would automatically paste this into the model space. It made a lovely OLE object in AutoCAD with crisp, clear appearance.

 

We are now trying to do away with the VBA part in favor of .NET. I am really at a loss to explain why the code I used before will not work, nor will anything else I try:

 

VBA CODE

Sheets("Sheet2").Select
Range("B1:K93").Copy

 

VB.NET CODE

 

vExcelRange1 - vExcelSheet2.Range("B1:K93")
vExcelRange1.Copy()

 The .NET code is not working at al. Can anyone point me in the correct location for assistane?

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 2 of 2 (322 Views)

Re: Copy From Excel to Clipboard then to AutoCAD

10-29-2012 12:44 PM in reply to: btillman

Is Excel still running when you paste the object into AutoCAD?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community