+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Forum Newbie
    Computer Details
    ktd27's Computer Details
    Operating System:
    Windows 8
    Discipline
    Environmental
    ktd27's Discipline Details
    Occupation
    Geophysicist
    Discipline
    Environmental
    Using
    Map 3D 2016
    Join Date
    May 2014
    Location
    Massachusetts
    Posts
    9

    Default How to insert many text objects from CSV or XLSX to specific x,y locations?

    Registered forum members do not see this ad.

    I'm about to receive a bunch of borehole data for a bigger project with x,y coordinates in state plane for each hole and I believe it will be sent as an Excel file. I'd like to add a center-justified text consisting of the borehole name at the x,y coordinate where it should go so I can quickly check out the location of a hole and then look up its other properties by name in the Excel sheet. So far, I'm thinking about concatenating the cells and adding spaces in a separate column in excel so that for each hole I have something like:

    text j mc 0 x-coordinate,y-coordinate BH120

    in a single cell. That way I can copy and paste that line at the CAD command prompt and skip a ton of key strokes going through the text options.

    I've done a similar workaround, inspired by someone here on the forums, when working with line segments where clients have sent me endpoints in Excel format. It's been great because it's transparent enough that I can forward my spreadsheet on to any one of my coworkers and have them duplicate the process without having to worry about a couple of people in my work group who only have LT and can't use LISPs (I think?). The difference is that while you can exit a line command by putting a space after that entry above, I think the only way to end the text command might be by pressing enter twice and I don't know if there's a way to just concatenate a couple of enters at the end of a line like I can a couple of spaces.

    The question is, is there a quick cheat that would let me do everything by copying and pasting multiple lines formatted as above all at once from excel without having to press enter after each hole? Is there an arraypath type command that's more well-suited to this instead, since I do have x,y coordinates?

  2. #2
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,902

    Default

    text j mc 0 x-coordinate,y-coordinate BH120
    We have a winner

    The extra press enters may be spaces on the end of the line, you need to be careful of that, or try -text. As text now expects a new line like mtext.
    To end, a blank line should work as Enter. Carefully check the lines copy and paste to notepad as a check.
    A man who never made mistakes never made anything

  3. #3
    Forum Newbie
    Computer Details
    ktd27's Computer Details
    Operating System:
    Windows 8
    Discipline
    Environmental
    ktd27's Discipline Details
    Occupation
    Geophysicist
    Discipline
    Environmental
    Using
    Map 3D 2016
    Join Date
    May 2014
    Location
    Massachusetts
    Posts
    9

    Default -text with a blank line is perfect!

    I do not know why I never considered adding a blank line...doing both that and -text instead of text is going to work perfectly. Thank you for saving me many hours of frustration!

  4. #4
    Forum Newbie
    Computer Details
    ktd27's Computer Details
    Operating System:
    Windows 8
    Discipline
    Environmental
    ktd27's Discipline Details
    Occupation
    Geophysicist
    Discipline
    Environmental
    Using
    Map 3D 2016
    Join Date
    May 2014
    Location
    Massachusetts
    Posts
    9

    Default

    Mistakes were made. The original post above should have:

    text j mc x-coordinate,y-coordinate 0 BH120

  5. #5
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,902

    Default

    Registered forum members do not see this ad.

    Just watch out for the two ways to do text compare text style with height = 0 to height is a value, the 2nd it will not prompt for height so script stuffs up.

    text j mc x-coordinate,y-coordinate 2.5 0 BH120
    text j mc x-coordinate,y-coordinate 0 BH120
    A man who never made mistakes never made anything

Similar Threads

  1. Break Lines at multiple locations & then insert footage of line
    By ORgrown in forum AutoLISP, Visual LISP & DCL
    Replies: 7
    Last Post: 24th Sep 2015, 07:42 am
  2. Annotative objects in different locations?
    By CAD Panacea in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 27th Dec 2011, 08:40 pm
  3. LISP - Do routine if specific text is found in a specific block attribute
    By h0okem in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 19th Nov 2011, 05:53 am
  4. Faster way of drawing specific radii archs in specific locations.
    By bbankston in forum AutoCAD Beginners' Area
    Replies: 9
    Last Post: 26th Dec 2010, 03:09 am
  5. Convert an AutoCad drawing to xlsx
    By hwoodyard in forum AutoCAD Beginners' Area
    Replies: 1
    Last Post: 9th Apr 2009, 05:42 am

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts