+ Reply to Thread
Results 1 to 13 of 13

Distance, Coordinate & Chainage Required From text to polyline

  1. #1
    Registered User
    Join Date
    11-26-2019
    Location
    Thane
    MS-Off Ver
    2021
    Posts
    49

    Distance, Coordinate & Chainage Required From text to polyline

    Dear Experts/Users,

    I have numerous text elements and a polyline in a CAD file, and I want to export text details according to the attached Excel file using Excel VBA.

    DWG PDF, and the required Excel file are attached for your reference.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,515

    Re: Distance, Coordinate & Chainage Required From text to polyline

    What you call an Excel file is simply a comma-delimited text file. I note that I have no difficulty importing this text file into Excel using Excel's File->Open command (delimiters and such are a good match for my system settings). You talk about "exporting" text from this file, but give no details about how you want to export data. Help us understand exactly what you need to do and we should be able to help you program those steps into VBA (or suggest a different programming language like Power Query which often is better at manipulating text files).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    11-26-2019
    Location
    Thane
    MS-Off Ver
    2021
    Posts
    49

    Re: Distance, Coordinate & Chainage Required From text to polyline

    Thank you, @MrShorty.

    I need the results in a macro-enabled workbook. I mistakenly attached a CSV file.

    Please refer to the attached PDF, which represents an AutoCAD DWG file (the portal does not accept CAD files for upload).

    This file contains numerous text elements and a polyline. I want to extract the text coordinates, polyline chainages from the text (using perpendicular lines from the text to the polyline), and the distances from the text to the polyline (perpendicular line lengths from the text to the polyline).

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: Distance, Coordinate & Chainage Required From text to polyline

    Please attach the correct file. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    11-26-2019
    Location
    Thane
    MS-Off Ver
    2021
    Posts
    49

    Re: Distance, Coordinate & Chainage Required From text to polyline

    Okay,

    I have attached the file. In this file, there are no VBA or formulas.

    In this Excel file, I have filled the data manually.
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: Distance, Coordinate & Chainage Required From text to polyline

    Ah, I think I misunderstood the requirement.

    Can you please attach the AutoCAD file? You can do this by creating a copy and manually changing the file extension to .zip (or by zipping it with your favourite zipping app). Zip files are supported - please let us know what the file extension should be changed back to.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: Distance, Coordinate & Chainage Required From text to polyline


  8. #8
    Registered User
    Join Date
    11-26-2019
    Location
    Thane
    MS-Off Ver
    2021
    Posts
    49

    Re: Distance, Coordinate & Chainage Required From text to polyline

    Thank you.

    I have attached the DWG file as per your instructions.

    You mentioned that the link (data extraction option) only exports text values and coordinates.

    Additionally, I also need the distance from the text to the polyline and the chainage of the polyline.

    In the AutoCAD file, I manually drew an imaginary line from the text to the polyline in blue color, and also included dimensions.
    Attached Files Attached Files

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: Distance, Coordinate & Chainage Required From text to polyline

    You mentioned that the link (data extraction option) only exports text values and coordinates.
    Where did I say that?

  10. #10
    Registered User
    Join Date
    11-26-2019
    Location
    Thane
    MS-Off Ver
    2021
    Posts
    49

    Re: Distance, Coordinate & Chainage Required From text to polyline


  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: Distance, Coordinate & Chainage Required From text to polyline

    Your link goes nowhere (page not found) ...

    You mentioned that the link (data extraction option) only exports text values and coordinates.
    I never said anything about the link that I provided except to ask you if it helped. I take it that it doesn't. I am not the author of the information found in the link.

    Sorry - I don't think I can help any further. I've looked at the DWG file and cannot see a way to extract the necessary data. maybe someone else will have an idea.

  12. #12
    Registered User
    Join Date
    11-26-2019
    Location
    Thane
    MS-Off Ver
    2021
    Posts
    49

    Re: Distance, Coordinate & Chainage Required From text to polyline

    Okay Thanks.

  13. #13
    Registered User
    Join Date
    11-26-2019
    Location
    Thane
    MS-Off Ver
    2021
    Posts
    49

    Re: Distance, Coordinate & Chainage Required From text to polyline

    This code produces the desired result; however, there is an issue with the text direction.

    Please Login or Register  to view this content.
    Last edited by AliGW; 07-17-2024 at 01:56 AM. Reason: Code tags corrected.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Specific Chainage Cordinate
    By rajatds31 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-20-2024, 05:59 AM
  2. pelase help with vba to make repition to measure distance decimal value coordinate
    By deeproject167 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2021, 03:17 AM
  3. Length and distance from the line coordinate and point coordinate
    By sanju2323 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-02-2019, 03:13 PM
  4. [SOLVED] find the X Y coordinate using length and distance.
    By sanju2323 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-26-2019, 04:16 AM
  5. Postcode distance Calculation (urgent help required)
    By stevennicholls in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-23-2013, 06:58 AM
  6. User input to get coordinate distance
    By pitakoc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-01-2012, 11:20 AM
  7. Replies: 0
    Last Post: 10-16-2012, 04:27 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1