csv header for text sta & offset

Discussion in 'AutoCAD' started by john coon, Jan 23, 2004.

  1. john coon

    john coon Guest

    I need help from the group,

    How can I create a header for a CSV file. I am exporting a sta & offset
    comma delimited that I would like to add a header to and still have the
    other data placed insert the correct header name.
    This is my print statement

    Open "C:\temp\blockstaoff.csv" For Output As #1 'Open file for output

    Print #1, strSta & "," & strOff & "," & objAlign.Name & "," & varDataPnt(0)
    & "," & varDataPnt(1) 'Write right side comma-delimited

    This is my result

    88+00.00,85.00' RT,RW-17-35,1048423.72176103,153605.464389402
    86+00.00,85.00' RT,RW-17-35,1048503.88690268,153422.233523925

    How do I get it to read more like this.

    station offset rt/lt alignment northing
    easting
    88+00.00,85.00' RT,RW-17-35,1048423.72176103,153605.464389402
    86+00.00,85.00' RT,RW-17-35,1048503.88690268,153422.233523925

    I have no idea how to do this. Any ideas or location in the help files, I've
    looked, but I might not be looking in the right place..
    Or
    would it be better to try to create or open excel?

    Thanks as always....Have a great day!

    John Coon
     
    john coon, Jan 23, 2004
    #1
  2. john coon

    Jeff Mishler Guest

    How about...

    Open .......
    Print #1 "station offset rt/lt alignment northing
    easting"

    Then run the For/Next loop

    Jeff
     
    Jeff Mishler, Jan 23, 2004
    #2
  3. john coon

    John Coon Guest

    Jeff,

    Your kidding me......Well it just goes to show when you don't know you
    REALLY don't know!
    Thanks Jeff., I was looking in the help files for samples of some
    convoluted bit of code.
    you guys are great!!!!!

    John Coon
     
    John Coon, Jan 24, 2004
    #3
  4. john coon

    John Coon Guest

    Another question, I just noticed the stationing was created higher to lower.
    Is there a reason for that?
    I selected a group of blocks by ssx to query to an alignment, Does it
    select from the last entity blocks that were inserted?
    I originally used a text file with the format below to insert some runway
    lights by reading a text file.

    Thanks as always! Have a great day
    John Coon

    170+00.00 85.00' LT RW-17-35 1044981 161049.8
    170+00.00 85.00' RT RW-17-35 1045137 161117.9
    86+00.00 85.00' LT RW-17-35 1048348 153354.1
    86+00.00 85.00' RT RW-17-35 1048504 153422.2


    insert block by text file format
    8600,85
    8600,-8517000,85
    17000,-85
     
    John Coon, Jan 24, 2004
    #4
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.