I’m using SW 2024 & Excel 2019 (via MS Office). Someone on Reddit was asking about importing Excel based XYZ coordinates into SW, typically to make a curve from the data although there are probably other general purposes (more on that later). Anyway I haven’t done this for some time, but I know I have in the past on prior SW version. I’m pretty sure I just had 3 columns in Excel containing XYZ data, no headers or blank rows, did a File save file type Text.
Then from within SW followed the method described similarly in many links: Select Curves, Curve through XYZ Points, pick the TXT file & it generates a curve. For some reason this familiar method failed. I keep getting this error popup.
SNAG-26-02-2025 7.32.03 PM.jpg
Tried some other things like saving as CSV with various delimiters but nothing worked because SW will only import TXT . Today I found this link made some progress & maybe some indication of where the problem may be. The link discusses pretty much exact same work flow. But I noticed their XYZ source data was from a file showing Notepad, which is .TXT
https://grabcad.com/tutorials/tutorial-how-to-import-points-to-solidworks-from-a-text-file
So I created a test using Notepad coordinates & it worked perfect. I then used the exact same data from within Excel, saved as file type TXT (dropdown = Text, tab delimited) & again it failed to open in SW, same error message. So my hunch is there is something about how Excel is delimiting the data when saving to TXT. Yet when I look at both TXT files using Notepad side by side they look the same. Maybe there is another app that can better highlight the delimiter differences? In Excel AFAIK there are no other options as to how to delimit specific to TXT files the way you can in .CSV. But SW will only import 2 formats this way .TXT & .SLDCRV (a Solidworks curve file whatever that is).
So back to replicating Notepad method, here is what I did.
- create your Notepad file
- open SW Start but don’t make a sketch yet. Select Curves, Curve through XYZ Points.
- browse for the TXT file (you may have to click this filetype in lower right drop down). It should successfully load in previewer.
- Now the weird part is it must somehow be aware of the SW template being used because for example it concatenates mm to the text values, so my 1.0 becomes 1.0mm. But anyway then it builds a curve through the data.
I understand there are macros that facilitate this task of reading from Excel (but I’m also reading other posts where they are failing). I’m wondering if the macros are doing some data / delimiter conditioning so SW is happy? Maybe I copy/paste Excel data into a Notepad file but that seems clunky. Really too bad SW doesn’t facilitate CSV vs TXT because there are many more options with CSV.
Anyway, sorry for long ramble. just wondering if others have similar issues or can make suggestions in this regard