Author Topic: Pasteing excel spreadsheets into autocad  (Read 5216 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« on: August 31, 2005, 03:51:51 PM »
i have an idea for a lisp but am not sure if i need lisp. this has been on my wishlist for awhile now. when we paste excel spreadsheets this is the proceedure we use:

pastespec
paste link
select ole object
right click
set ole text size to .159

i would like to hit a button and have all of this happen.

would this require lisp or could it be done using a macro?

Bob Wahr

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #1 on: August 31, 2005, 03:57:18 PM »
hate to give a BS answer but...

Try making a macro to do it.  If it works then yes a macro will work, if not then maybe it still will with tweaking.

Sorry

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #2 on: August 31, 2005, 04:43:11 PM »
bob made a funny. if making a macro was an easy thing in 2006 that is. damn cui  :evil:  :evil:  :evil:

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #3 on: August 31, 2005, 04:54:58 PM »
if i could figure out how to reselect the image after it gets pasted i think i could get it. i tried previous but it says no previous selection set. i seem to remember figuring this out at some point but i'm having a brain fart at the moment. help anyone

Bob Wahr

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #4 on: August 31, 2005, 04:56:41 PM »
try last instead of previous.

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #5 on: August 31, 2005, 05:03:58 PM »
o yeah is there a way to issue an arrow key via a macro. i am trying to scroll down to pastelink in the pastespec dialogue

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Pasteing excel spreadsheets into autocad
« Reply #6 on: August 31, 2005, 05:05:49 PM »
Here try this. This is a Great program. Just follow the instructions.

File is called AutosXeduLe.xls

Once on the pond look under my name.... "dvarino"

http://http://www.theswamp.org/lilly_pond/temp
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

Murphy

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #7 on: August 31, 2005, 05:19:19 PM »
Or you can follow the link in my signature.

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #8 on: August 31, 2005, 05:59:53 PM »
i saw that a long time ago but forgot about it. when i hit the button it tells me that the macro can not be found. were these created previously or do i have to create them. i have a macro workbook which loads on startup should i create a macro and what would it look like. thanks newts  :wink:

Murphy

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #9 on: August 31, 2005, 06:18:58 PM »
Load Excel, go to Tools
Select Macro
Select Security
Change to Medium or Low. If you set it on Medium it will ask you everytime you load AutosXeduLe if you want to enable Macros.

You will then have to hit Alt+F11.
Press Ctrl+F
Look for ".15" (without the quotes)
Look in Current Project
Any that you find (there should be only 3) change to .16
Next go to Tools
Select References
Scroll down to Autocad 2006 and click the check box.
You can uncheck any other versions of AutoCAD that are checked.

This should fix your problems.

Jim Yadon

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #10 on: September 01, 2005, 07:21:01 AM »
Just a thought...
... if you are working in 2k6, why wouldn't you come up with a macro that dynamically updates a table object rather than use something with the limits of an OLE spreadsheet? I only have 2k5 and haven't had much time to play with said process. I've modified Spanner to a point where I haven't needed anything else for years and I'm kind of married to it at the moment. So like I said, just food for thought.

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #11 on: September 01, 2005, 09:52:03 AM »
i tried what you said and it's not working for me. i still get the same message that it can't find the macro. it does not ask me to enable macros upon startup

Murphy

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #12 on: September 01, 2005, 12:07:18 PM »
Do you have the autosxedule.xls file open before you open the file you want to draw into cad?

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #13 on: September 01, 2005, 12:26:12 PM »
murphyi closed my drawing then reopened it with my excel already open and i got the message to enable macros. i reopen my spreadsheet and try to draw in cad and i get this error:

object variable or withblock variable not set

what does this mean and how can i fix it?

thanks

Murphy

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #14 on: September 01, 2005, 12:43:19 PM »
Please download this file and open it.

You will then have to hit Alt+F11.
Go to Tools
Select References
Scroll down to Autocad 2006 and click the check box.
You can uncheck any other versions of AutoCAD that are checked.

Save the AutosXeduLe 2k6.xls file, with it still loaded open the sheet you want to draw into cad.

Open AutoCAD.

Hit the draw schedule button. If it gives you an Error click Debug.
Please copy the line that causes the error and post it here.

Sorry for the problems.

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #15 on: September 01, 2005, 01:21:18 PM »
murphy it's working swwwwweet

i'll have to play around with it a bit. a couple questions:

my cells are not merged how do i get them to merge
can you draw multiple sheets from excel as seperate schedules
can you have double lines underneath borders like excel

those are the first questions that come to mind i'm sure i'll have more after i play with it this weekend

does anyone have example settings they have customized i can look at as an example.

thanks that's pretty cool

Murphy

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #16 on: September 01, 2005, 02:11:19 PM »
Quote from: ELOQUINTET
murphy it's working swwwwweet

Thank you. Glad you like it

Quote from: ELOQUINTET
i'll have to play around with it a bit. a couple questions:

my cells are not merged how do i get them to merge


You select the cells you want to merge, right click and select Format Cells.
On the Alignment tab at the bottom you will see a check box labeled Merge. Check it.

Quote from: ELOQUINTET
can you draw multiple sheets from excel as seperate schedules


Yes you can.

Quote from: ELOQUINTET
can you have double lines underneath borders like excel


It will not actually draw two lines. It will change line thickness per what it is set in Excel. That is an idea I will add to the wish list.


Quote from: ELOQUINTET
does anyone have example settings they have customized i can look at as an example.


The settings that are in there are my working settings. They are for drawing schedules at full scale so that they can either be drawn in Paper space or in Model space and use a 1:1 viewport scale.

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #17 on: September 01, 2005, 02:52:51 PM »
murphy i know how to merge cells in excel. i am talking about when i draw it in cad they are no longer merged. how do i specify that i want it to draw each tab from excel as a seperate schedule. we do our schedules by floor. a thick line i understand how to do but a double line we use to seperate our schedule and totals, it's just our standard way. nice program regardless.

Murphy

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #18 on: September 01, 2005, 03:08:00 PM »
The problem with merged cells is if you apply a border to the individual cells before you merged them those borders will show up in cad. Try unmerging, change borders to desired results then merge again.

The macro will not draw the double lines. It will make one really thick line. You can draw a second line if you wish and it should be good for any updates. Unless, of course, the schedule gets longer.

If I have time over the long weekend I will look into correcting these problems.

ELOQUINTET

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #19 on: September 01, 2005, 06:50:10 PM »
murphy i appreciate it but our schedules are far too complicated for this application i believe. you can try if you are really up for a challenge. the problem also is our schedules are not always the same and redesigning the templatre everytime is just not efficient. for simple schedules it works good but for more complex ones it's more work than paste from excel. i'll still try to fool arounf with it over the weekend and will come back with suggestions. thanks

Jim Yadon

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #20 on: September 02, 2005, 09:15:33 AM »

Murphy

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #21 on: September 02, 2005, 10:25:33 AM »
The nice thing about it is that you can save as many versions as you want.
Or, better yet, you can save a copy of the settings sheet into your workbooks for different settings. However you want to do it. Set them up once and never have to mess with them again.

Murphy

  • Guest
Pasteing excel spreadsheets into autocad
« Reply #22 on: September 04, 2005, 06:58:24 AM »
Spanner is free?
Spanner gives you quick support for suggestions?

Eloquintet,

Please go to the link in my signature to download the newest version.

Updates are:
Will only draw the outside borders for merged cells.
Will now draw double lines for double line border in Excel.

ELOQUINTET

  • Guest
Re: Pasteing excel spreadsheets into autocad
« Reply #23 on: September 06, 2005, 10:50:13 AM »
murphy not sure how this will appear with the new setup but when i click draw in cad i get a message compile error variable not defined goes to this section of the code???


Public Sub GetStarted()
Dim strPrmt As String
Dim strTitle As String
Dim dgAns As VbMsgBoxResult
On Error GoTo Err_Handler
'Set Values for User Input of Range
strTitle = "Create Acad Spreadsheet"
strPrmt = "Select cells to link ('Ok' for All)"
If DefRange = "" Then
    '030805 bill defrange not set yet
    DefRange = ActiveSheet.UsedRange.Address
End If
Set objRange = Application.InputBox(Prompt:=strPrmt, _
Title:=strTitle, Default:=DefRange, Type:=8)
If objRange Is Nothing Then
    GoTo Exit_Here
End If
'If User accepts default or selects a new range
'Then objRange is assigned. If Cancel is clicked
'Code execution exits
If Connect Then
Call EraseOldRef
If objAcad.Visible = False Then

Murphy

  • Guest
Re: Pasteing excel spreadsheets into autocad
« Reply #24 on: September 06, 2005, 12:21:39 PM »
I take it you donwloaded the update?

If so, you need to go through the instructions and change it to work with 2006.
Sorry, but I do not have cad at home (which is where the update was done) and I only have 2002 at work.