I have tried a few of the net, can't get them to work
See if this thread helps you.
3D points from an Excel Table
the ones i downloaded didn't work
the last one on the blog wasn't available
It seems like I just saw a thread within the last week similar to this.
Sorry the link I gave you didn't work.
I saw the link too, but it brought me to a german site, couldn't make heads or tails on what to download
also, I need to ensure what I download is free & legit, we are not allowed anything else
Understood, can't be too careful these days. Have to trust the sites you get things from.
How about Insert>Curve>Curve Through ReferencePoints... will bring up a dialog to Browse for a .csv file?
James, I have written a macro that will retrieve comma-delimited data from any .txt, .csv, or excel file and place it into the active part or assy doc, or into a new part or assy doc. Supports several unit systems. Edit: Sorry, I decided to un-attach this. I am not quite comfortable at this point making it available on the forum since it contains so much code. If you want me to email it to you, I will. Just shoot me an email.
It was written to work with Excel 2010 so if you don't have this version then you'll need to modify the macro as follows:
1. In SolidWorks, go to Tools-->Macro-->Edit Macro...
2. In the VB Editor, go to Tools-->References
3. Uncheck the Excel 2010 reference
4. Find "Microsoft Excel Object type library" in your list, or browse for your excel executable
5. Click OK
Video Tutorials for the SolidWorks API
Dear Rice ,
Check this macro to create 3d Points......
One of the loops failed for me, and I don't really desire to debug it. Regardless, I doubt the poster wants to manually enter in the file path, plus since this only takes .txt files he would have to save all of his excel files as comma delimited .txt.
The Input and FreeFile functions are fine, but I prefer using the File System Object in order to take advantage of the more robust (and easier to use, IMO) TextStream object. Nevertheless both can get the job done.
Thanks for taking the time to post this code. Often all that is needed is a bit of code to point a person in the direction to get their own code to work. Personal preferences can be found in anyone’s code.
Sorry for missing this thread.
I just tested this one out in SW2011, and it works fine.
my problem is that the file is converting the #s to metric, where I would prefer to enter metric values that stay as typed
Tools>Macro>Edit, which should open it up in Microsoft Visual Basic.
Then on the left is the tree, click on Forms>FileLocationForm. Right click and choose "View Code".
Change line 51. which currently has a metric to Imp. unit conversion. change the multiplier to a metric multiplier for whatever metric units you want. SolidWorks internally uses meters.
Text directly from SolidWorks Help:
Curve Through XYZ Points
Click Curve Through XYZ Points on the Curves toolbar, or click Insert, Curve, Curve Through XYZ Points.
Create new sets of coordinates by double-clicking cells in the X, Y, and Z columns and entering a point coordinate in each one. (Created outside of a sketch, the X, Y, and Z coordinates are interpreted with respect to the Front plane coordinate system.)
The numbers in the Point column define the order in which the points are connected.
Click OK to display the curve.
The Curve Through XYZ Points icon appears next to the curve name in the FeatureManager design tree.
Tips for working with this tool:
Open an existing curve file. Click Browse and navigate to a curve file to open. You can open .sldcrv files or .txt files that use the same format as .sldcrv files. You can also create 3D curves in Microsoft Excel for example, save them as .txt files, then open them in SolidWorks. Create a file containing coordinate values for curve points using a text editor or worksheet application. The file format must be a three-column, tab, or space-delimited list of only X, Y, and Z coordinates. Do not include any column headings, such as X, Y, and Z or other extraneous data.
Change coordinates. Double-click in a cell and enter a new value. (As you enter values, notice the preview of the curve is displayed in the graphics area.)
Add a row. Double-click in a cell in the row below the last numbered row.
Insert a row. Select a number under Point, then click Insert. A new row is inserted above the selected row.
Delete a row. Select a number under Point, then press the Delete key.
Save the curve file. Click Save or Save As, navigate to the desired location, and specify the filename. If you do not specify an extension, the SolidWorks application adds the extension .sldcrv.
Retrieving data ...