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.
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.
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).
Originally Posted by shg
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).
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.
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.
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.
Does this help at all?
https://www.autodesk.com/support/tec...-to-Excel.html
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.
Where did I say that?You mentioned that the link (data extraction option) only exports text values and coordinates.![]()
Your link goes nowhere (page not found) ...
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.You mentioned that the link (data extraction option) only exports text values and coordinates.
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.
Okay Thanks.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks