I would like to determine if a macro automating the creation of a spring in SolidWorks is possible to do for some engineers at my company, or indeed if it already exists (I am willing to pay for a subscription or SolidWorks book if needed).
The macro would get the spring centerline data and wire diameter. This is a text file (though, it might have a different file extension than .txt, despite acting like a .txt), that has three columns separated by tabs, and a number of rows separated by line breaks. Each row represents a point, and each column represents the X, Y, and Z coordinate of those points, respectively. If the text file is not formatted in this way, I don't think SolidWorks will accept it. The wire diameter can be manually input.
If we were to adapt this program to make springs from a single Frontedge folder, the program would need to search for the centerline data within the folder, as well as the wire diameter, and output several files.
1. Make the spring on SolidWorks. The macro would automate the three features involved with making a spring in SolidWorks: first, the Curve feature would take the text file and makes a curve based on the points given. Second, the Plane feature puts a sketch normal to the spring centerline. This sketch is simply a circle, whose diameter will be the wire diameter. Third, the Sweep feature uses the sketch as a profile and the curve as a path to make the spring. Once the sweep is made, the other features would be hidden for convenience.
2. Save the new SolidWorks part. We'd need to choose a name for the spring, and the output folder. We mostly make use of the SolidWorks model of the spring to check for packaging in assemblies, so ideally, after setting everything up, it would only take the press of a button to update (or overwrite) the springs while iterating a design. After an update, I would want to check how it looks in SolidWorks without having to read the springs to an assembly, but I'm not sure how viable that is.
Please let me know if this is the wrong forum to post this particular question in, or if it would be better to post it in a different one.