Reading from a text file

Discussion in 'AutoCAD' started by tpro, Aug 20, 2003.

  1. tpro

    tpro Guest

    I am new to VBA for Autocad although I have some basic knowledge of writing
    VBA for Excel.
    I need to create some code to read in a series of xyz coordinates from txt
    file (or CSV if necessary) and automatically draw a polyline through the
    points.
    I had done this before with AutoLISP, but I have lost the code that I had
    written and am a bit rusty. I intend to learn some basic VBA for Autocad so
    would be appreciate if someone could recommend a good website to get
    started, but I have an urgent need to complete the task that I have
    mentioned at the start of the post, so if anyone is able to post some basic
    code for me to try out, I would be most appreciative. Could you also comment
    on how the xyz coordinates should be laid out in the text file.

    Either

    10 15 0
    20 15 0
    20 25 0

    OR

    10
    15
    0
    20
    15
    0
    20
    25
    0


    Thanks
    DG
     
    tpro, Aug 20, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.