Hi,
Does anyone know how to import points from a table in excel into solidworks. I heard theres a way do do it with macros.
Rob
SolidworksImport export
Hi,
Does anyone know how to import points from a table in excel into solidworks. I heard theres a way do do it with macros.
Rob
SolidworksImport export
I have an awesome excel spreadsheet with options to import points or lines to 2d or 3d sketches.
I will attatch it.
2 points to note.
You need a part open before you use it, and do a fit to screen / zoom extents before assuming it hasnt worked!
Rgds
Pete
You can also use Curve Through XYZ Points
Yes. You can use curves through xyz but you have to convert your excel files to txt first.
thanks alot.. this is exactly what i was looking for. Now the next thing I need to do is create a surface using the imported points.
I have the solidworks file attached with all the points. I did a surface fill but it doesnt come out the way it should...
This spreadsheet is not only awsome, it is totally awsome & just saved a ton of time not having to enter the points manually. The only thing I can see that would make it better would be the ability to create a spline thru the 3d or 2d points. I know you can do that with insert curve thru XYZ points but to use it you then have to convert the entity into a new sketch. Thanks again Pete
sir i imported points using curve through xyz points. but am not able to use the curve for further design. am new to solidwork pls help me how to use imported curve. am designing involute spur gear. i imported involute coordinates. i got the curve but not able to use it.
Welcome to SolidWorks forums Ganesh.
What exactly is hurting you to use the curve??
You might also find this post helpful for your future reference
Ganesh,
Curves are sometimes a little strange in SW. It may be that you will need to make a sketch and then Convert Entities on your curve to put a spline in your sketch.
Jerry Steiger
sir i can import coordinates into solid works. then i made a entity from the imported curve. but once i do this the system slows down and not responding often. am not able to make circular array after that. solidworks not responding after doing this. am unable to make a gear due to this problem.
Hi,
I am new to this forum and I was hoping someone could help me with a problem. I start using the macro in the excel sheet. And it worked perfectly.
We are a engineering company and my main job atm is to build a sound barrier next to a highway. We work in x,y,z ( thats why the excel sheet is a perfect macro to set the center points in the part.)
However... at some point when iam almost done, a client call's me and telling me that the, for example, the first 10 x,y,z, are different because of .... whatever...
In what way is it easy to set those points to new x,y,z, without destroying my assembly. My idea was to get the points that were created with the excel sheet, to a design table. But the design table doesn't recognize the points. I could use auto dimension to set the points from the origin point. But i have a minimum of 150 points. To much to use the auto dimension manually.
I also could use table driven pattern..but that's only in x,y....and i need the z-coord for my work.
Summery: I would like the points created from the excel sheets in a way that i can control the points from a excel.
Hope i made my story clear!
Best Regards,
Bernd
What is the number of points you importing in. And what are the system details/specs you using.
atm i got 100 points. Using SW 2012 proffesional
If you ever figured out the solution to this problem I'd be very interested to hear.
Peter,
I love your macro to import points. How do I control the units being used. My spread sheet is in mils but when it comes into the sketch (which is set to mils) the points are placed using mm.
Steve
Hello All
I have tried these methods but the results are same.
"The data in this file may be invalid. C:\Users\...."
Could you help me for this purpose?I have attached the files.(I took a export on CSV and after that translate it to TXT)
Very very very good excel, thanks a lot, god bless you
OMG! This Macro would be awesome if I could get it to run. But everytime I click on one of the buttons, I get a message that says Compile error: Can't find project or library. I do have a part opened up and running SolidWorks 2015.
EDIT: I got it to work but the 2D doesn't work out for some reason. No worries can just put in zeros for the column.
Hi , how would I use this as a macro,do I have to import it into VBA and save as swp?
1.) Have a part opened up in SolidWorks
2.) Open Up Excel document and add/modify points
3.) When finished, click on button and go back into SolidWorks document
Note: Edit Sketch and Press F if you do not see sketch
Hello Jackie Yip,
How did you make it work? im still having a hard time finding out how to make it work.
Thanks
Just found this thread and yes the macro is awesome and works great for the 3D options, but I believe there is a line of code that is missing from the VBA macro for the 2D point and line options. If you edit the excel macro and add the line it will work.
For the Create 2D Points macro "Private Sub btnTest_Click()" and the missing line below
......
Part.ClearSelection2 True
Part.Extension.SelectByID2 "Front Plane", "PLANE", 0, 0, 0, False, 0, Nothing, 0 '****** MISSING IN ORIGINAL MACRO ****
Part.InsertSketch
Part.SetAddToDB True
.....
Then for the Create 2D Lines
"Private Sub CommandButton1_Click()" Add the same line
Part.Extension.SelectByID2 "Front Plane", "PLANE", 0, 0, 0, False, 0, Nothing, 0 '****** MISSING IN ORIGINAL MACRO ****
Before the Part InsertSketch line and everything should work great. Thanks again to the original post by Peter
This works great! I was wondering if you have one that will work in inch values? I didn't realize it was metric and inputted inche values. Thanks
Here is inch one but it might be little off as I've taken the factor as 1 m = 39.3701 in
Updated to a factor of 1 m = 39.3700787401575 in
Hello,
This macro still works great but if your using Windows 10, I believe the trick is to create a design table and select this file instead and it'll work. Tried doing it outside of SWX and kept getting an error where it didn't know a part was opened up, but inserting it as a design table did the trick.
It could be related to macro references.
I'll try to check on a Win 10 tomorrow.
Hi Peter,
This macro has been useful to plot a 3d sketch, which is driven by a XYZ table from our customers. The only thing I couldn't work out is how to add fillets between each line segment.
I tried to record a macro by manually adding sketch fillets to each point, however, when I run the macro, it doesn't work.
Kind regards,
Mustafa
It is really a very helpful macro. I import few coordinates using this macro and place rods there. Now I need to rotate few of the rods at certain polar angle. Is there any way to incorporate the angles into this macro or otherwise to achieve rotation of rods in solidworks?
I know this is old, but someone may be having the same issue. When saving Excel as a TXT-file, depending on operating system etc., it matters which encoding is used. Text files saved directly from Excel gives import errors in Solidworks on my Windows 10 system, but when I open in Notepad and save with ANSI-encoding, it works fine...!
Hi Deepak,
Running this macro in SolidWorks 2017 seems to throw an error with the Part.SetToDB True.
Any ideas?
Thanks,
Great Work
You are wonderful as usual, Thank You
Hi , sorry for missing out your post. Are you still having issues with the file?
I am having similar issues with the "Compile error: Can't find project or library". Running Solidworks 2012 x64 Edition. Any tips?
, update/correct the macro references to your SOLIDWORKS version as suggested here Fix-Update SOLIDWORKS Macro References? (don't worry on the fact that video is for fixing missing library error but check the process to update your macro library) and that should fix your issue. If not then do revert back.
Hi All,
I am still trying to figure out how to add code for adding fillets to each of the points on the 3D sketch. I tried to record macro and copy that into this macro, but it didn't work. Please help.
Super handy. Love this community!
Peter Simpson
I went through macro/excel and it is really good.
Peter Simpson/@Deepak Gupta
Is there any way so that there will be a separate 3D sketch for a every row in excel?
Our requirement is that we should have separate 3D sketch for every X,Y,Z coordinates.
Please let us know and this will help us.
Try this updated excel file. Only 3d points/lines buttons are working.