Author Topic: "Draw Excel Lisp" Question  (Read 5102 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
"Draw Excel Lisp" Question
« on: December 12, 2006, 09:14:37 AM »
Terry,
I tried your DrawExcel.lsp
With the support files loaded, this file is not being created Temp.csv
I have tried with macros enabled & disabled.

Any ideas?

PS
"C:\Temp\Temp.txt" is being created & this is it:
Code: [Select]
3
3
C:\Program Files\ACAD2000\xlcab.xls
« Last Edit: December 12, 2006, 11:51:30 AM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

GDF

  • Water Moccasin
  • Posts: 2081
"Draw Excel Lisp" Question
« Reply #1 on: December 12, 2006, 09:18:21 AM »
Terry,
Having read your DCL tutorials, I  must say you have done a great job with them.
 The vector routines are very helpful & take the pain out of creating vector images.
I have used it to create some images for my Dialog boxes. :-)

Thanks for all your hard work.


Great work Alan and Terry

Alan I have been using the vector Image way also and love the ability to do away
with slide images. Thanks again guys. I can always learn more on how to create dcl
files.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

terrycadd

  • Guest
"Draw Excel Lisp" Question
« Reply #2 on: December 12, 2006, 11:30:25 AM »
CAB,
I wonder if we should start a new thread regarding "DrawExcel.lsp"?
The files needed are: DrawExcel.lsp, DrawExcel.dcl, DrawExcel.dvb, GetIcon.lsp, and Dcl_Tiles.lsp.
It should create two files if successful: C:\Temp\Temp.txt and C:\Temp\Temp.csv.
Just in case you may have one of the function names defined slightly different in one of your files,
try this method to load "DrawExcel.lsp".
After your normal functions load from AcadDoc.lsp or however you load them,
Type (load "DrawExcel") manually. It loads GetIcon.lsp and Dcl_Tiles.lsp.
Then type "DrawExcel" or the shortcut "DES" to run the function.
Use the "Browse" method to find your spread sheet.
It might be important to close all open Excel applications, but should still work anyway.

We are using 2005 and 2006 here at work. And it works on all stations.
Please try it again, and someone else try it also to verify if it works ok.
I can't see why it wouldn't work with macros enabled.
Terry
========================================
The links to these functions are:
http://web2.airmail.net/terrycad/LISP/DrawExcel.lsp
http://web2.airmail.net/terrycad/LISP/DrawExcel.dcl
http://web2.airmail.net/terrycad/LISP/DrawExcel.dvb
http://web2.airmail.net/terrycad/LISP/GetIcon.lsp
http://web2.airmail.net/terrycad/LISP/Dcl_Tiles.lsp
========================================

« Last Edit: December 12, 2006, 06:40:27 PM by Terry Cadd »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: "Draw Excel Lisp" Question
« Reply #3 on: December 12, 2006, 11:58:16 AM »
Using ACAD2000 to test.

No csv file created.
After several tries I get this:
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: "Draw Excel Lisp" Question
« Reply #4 on: December 12, 2006, 12:39:48 PM »
Terry,
This is the original message:
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

terrycadd

  • Guest
Re: "Draw Excel Lisp" Question
« Reply #5 on: December 12, 2006, 02:49:34 PM »
I tried several things during lunch, but couldn't get it to crash. I will take another look at it after work.  It was initially written in AutoCAD R14, and since then has been run daily in engineering on versions 2000i, 2004, 2005 and 2006.  None of the AutoCAD stations required any VBA customizing.  I'm at a loss at this point regarding making any recommendations.  I’ve attached the information from the top menu [Tools / References] screen.



CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: "Draw Excel Lisp" Question
« Reply #6 on: December 12, 2006, 04:54:27 PM »
I checked mine but made no difference.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

terrycadd

  • Guest
Re: "Draw Excel Lisp" Question
« Reply #7 on: December 12, 2006, 06:32:08 PM »
I really hate that you're having trouble with this one, because it's a neat function.
Do you have an option in the VBA Tools/References screen for "Microsoft Excel 11.0 Object Library"?
I noticed the on the lower section that your screen displays ".../EXCEL9.OLB" instead of ".../Excel.exe".
Could this be part of it?

terrycadd

  • Guest
Re: "Draw Excel Lisp" Question
« Reply #8 on: December 12, 2006, 11:25:39 PM »
I was able to find an archive copy of DrawExcel.dvb complied on 2000i just before I made some changes on 2005 regarding replacing commas in a cell to the ascii chr 184. The reason for this revision was that a comma in a cell caused the rows to shift a column over every time it encountered a comma. The routine reads in the C:\Temp\Temp.csv file and then replaces the ascii chr 184 with a comma fixing that problem. I suspect that the VBA “replace” function may not have been included in the VBA utilities with 2000i. But I can’t verify that at this point.
I know that DrawExcel works on other systems as well as ours, as I have received several complimentary emails from around the world. Regarding the dilemma of the possible comma within an Excel cell, I should have probably made a revised version of the “CommaList” function to handle input from csv files.
Since I can’t revert back to 2000i and recompile the dvb file, try downloading the following DrawExcel-2000.dvb file. You may either revise the sub-function “GetExcel” to load DrawExcel-2000.dvb, or you may delete the DrawExcel.dvb file and then rename DrawExcel-2000.dvb to DrawExcel.dvb.
http://web2.airmail.net/terrycad/LISP/DrawExcel-2000.dvb

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: "Draw Excel Lisp" Question
« Reply #9 on: December 13, 2006, 12:39:02 AM »
Thanks Terry, I'll give it a try tomorrow. It's past my bedtime here. :-)

I do believe the error has to do with the inability to establish the wbkObj var
as Workbook is highlighted when the error is displayed.
 
Code: [Select]
Dim ExcelApp As Excel.Application, wbkObj As Workbook, shtObj As Worksheet
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Terry Cadd

  • Mosquito
  • Posts: 1
Re: "Draw Excel Lisp" Question
« Reply #10 on: April 07, 2020, 04:00:59 PM »
The website http://web2.airmail.net/terrycad that hosted AutoLISP Exchange, Draw Excel and Getting Started with DCL Dialogs has been moved to the new domain https://autolisp-exchange.com . All programs and files are free to download and share. Just click on a button to view the program, then right-click and choose saveas.