Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excell Table to Text and Lines
#1
Hi

I am about to write a macro to do convert a CSV file to a Table using Text and Lines in Delta CAD.

If anyone has done this let me know.

Otherwise I'll post it when I'm done and I think it works.

Regards Tom Bodine
Reply
#2
Welcome to the site Tom.

Please note that you won't be able to post a DeltaCad Macro file in the forums. You'll have to submit it for approval and posting on our download pages. (Please see the "Frequently Asked Questions (FAQ)" forum.)

Thanks for registering. I'm looking forward to your offering.
Reply
#3
Sad 
(02-03-2009, 10:10 AM)The Boss Wrote: Welcome to the site Tom.

Please note that you won't be able to post a DeltaCad Macro file in the forums. You'll have to submit it for approval and posting on our download pages. (Please see the "Frequently Asked Questions (FAQ)" forum.)

Thanks for registering. I'm looking forward to your offering.

My table maker is written. It works great, except for one proviso. The script starts by opening a browser to allow the user to select the CSV file. I couldn't figure out how to create a file browser with Cypress Enable. I wrote and compiled a script in AutoIt and got the macro to read its output. Since this doesn't conform to the spirit of this forum. I wont post it until I can figure out how to do the whole thing in enable basic.

any guidance would be appreciated
Reply
#4
Finally I got a good version of my table maker written.

I thought I'd get DC 7. so I could ask about dialogs, and found that my script that ran fine under 6 crashed and burned in 7 which reminded me of the broken interpreter that came with 5.

Things which would work in VB and AutoIT won't in Enable. Things like subroutines and functions can not be dependably called or re-entered.

One irritating thing:
I thought it would be handy to have the script remember the last input file name. So I added code to write the file name to a INI file. Then more code to read from the ini file. If I type the file name into the input file dialog. The script can find it. If however it reads the file name from my INI file the script cant find the file even though the file name strings match exactly. Huh

Another irritating thing:
I used a few functions and subroutines to make the code more readable. They would work for a while, but after a few iterations of running, editing, running, editing.... the script stop when ever a function or subroutine was called. Dodgy

So now there is only one subroutine.

Try it out and let me know what you think. Wink
Reply
#5
I tried it. It works pretty good but it stopped with an Error on line 185. (no graphic lines were generated) It could be that the CSV file I used was just way too big for DeltaCad's or your Macro's liking (it contains well over 500 records - lines of data).

Please follow the instructions in <this FAQ> to make your file submission 'official'. Also please include a small sample .CSV file with your submission. Thanks.

BTW Thomas, you currently have 2 user accounts registered. I can merge them together into one account if you want me to. Please check your private messages for more on this. Thanks.

For anyone interested, there is a very versatile free CSV file editor available for download <here>.

P.S.
I'll probably move this thread to the Comments and Discussions Regarding Posted or Downloaded Files forum after the file has been made available on our Macro Download Pages.

You can <download> Thomas' macro file and give it a try now, if you'd like.

NOTE: This file is currently considered to be a 'BETA version' until it is officially submitted according to our FAQ regarding submitting files at which time it WILL be made available for download on our Macro Download Pages.
Please report your successes or any error messages you may get while running this macro file. Thank you.


Personally, I think this macro will be very useful for incorporating a cut list, parts list or any other formatted DB data lists into a drawing.

Good job Mr. Bodine!!Tongue
Reply
#6
I've decided to post "tbodine88"'s .'CSV file to DeltaCad Drawing' converter on our Macro Download Pages, titled as "01Table", only because I think it could be very useful for many DeltaCad users and it's his exclusive creation, as indicated by his posts above.

Thanks for sharing, "tbodine88"!!!:Smile
Reply
#7
[quote='The Boss' pid='895' dateline='1280065389']
I tried it. It works pretty good but it stopped with an Error on line 185. (no graphic lines were generated) It could be that the CSV file I used was just way too big for DeltaCad's or your Macro's liking (it contains well over 500 records - lines of data).

I've been busy so I haven't been checking this thread.

The maximum rows the macro is written for is 250. So it should have crashed earlier.

I wrote it for cut sheets just as you suggested.

Thanks for accepting it.
Reply
#8
It think it probably did crash when it exceeded 250 records(rows) while processing it.

Can you please write-up a simple .txt instruction file along with the submission form located on our Home Page and send it to me via E-mail?

Please include any limitations regarding db row and/or column processing of your Macro and perhaps also a small .csv sample file.

(You don't need to attach your Macro file again with that email.)

Thanks.


Reply
#9
(09-13-2010, 12:36 PM)The Boss Wrote: I've decided to post "tbodine88"'s .'CSV file to DeltaCad Drawing' converter on our Macro Download Pages, titled as "01Table", only because I think it could be very useful for many DeltaCad users and it's his exclusive creation, as indicated by his posts above.

Thanks for sharing, "tbodine88"!!!:Smile

I tried this macro but it cannot find the CSV file. Where should I put the file so the macro can access the data?

Thanks
Reply
#10
I never used excel to generate points in this macro, however I was successful using notepad. You can change the path by cancelling the first dialog and entering the path of your file in next dialog box that appears. Format of your numbers must conform to the specifications listed in the instructions

I think "the Boss" has been successful at his attempt. Maybe he'll be kind enough to add something here.

Chris "i44troll"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)