Is there a way to mass convert points from a 3D sketch to a 2D sketch? Currently I have to click on each point to convert. Copy and paste also does not work properly.
Just ran into this problem today. There is an easy solution using the 'Save Selection' feature...
*) Exit from any sketch you may be in.
*) Enable 'Filter Sketch Points'.
*) Window or lasso select all of the points you wish to convert.
*) Once all of the Sketch Points are highlighted, right-click anywhere and select 'Save Selection' from the menu.
*) SolidWorks will save this info in a folder in the Feature Manager called 'Selection Sets'.
*) Turn off Selection Filter.
*) De-select the old sketch or you will edit it by mistake.
*) Begin new 2D or 3D Sketch.
*) Select 'Convert Entities'.
*) In the Feature Manager, expand the Selection Set and select the first Sketch Point in the list.
*) Scroll to the last point and Shift-Select to capture all points in the list.
*) The Feature Manager will begin to populate with the Sketch Points. (Be patient. May take a while.).
*) Once the Sketch Points are in the Feature Manager, select the green checkmark to finish.
*) Exit the sketch.
That should do the trick.
Note that this technique can be used to convert 3D Points to 3D Points or 3D Points to 2D Points.
The best part of course is that the new Sketch Points remain associative to the old.
It is not ideal, but might work for your situation. If you can link all of the points with lines then you can select the 3 sketch and convert the entities and then convert all of the entities to construction geometry? Would this be suitable or your situation? if not could you please provide more details on the context of the situation.
How many points would typically be involved?
Could you use the Derived Sketch
At least in SW 2014, I can't select Insert>Derived Sketch, because it is grayed out. That would be a handy feature to have. Is it available in a later version?
Did you select the sketch and a sketch plane, you need to make those selections or one of them for it to clear the grayout..
EDITED - Derived sketch doesn't work when using a 3D sketch - however it works for 2D sketch
The first image shows that the individual points (CMM scan) are not at the same Z height. That is why I want to convert them onto a plane for a 2D sketch. From there I can spline them. There are approximately 135 points per section and I have 100 parts to do this for.
Thanks, but if I'm understanding you correctly, I would still be having to click on each and every point.
I tried that and in 2014 it doesn't give that option. Is that only available in 2017, or is it in 2016 SP5? The reason I'm asking is we are looking at upgrading and if it is in 2017, it may help sway me to wait until they get 2017 more stable and jump to that release. Right now we are leaning toward 2016 SP5.
Matt Peneguy - I should have checked before I posted, 2D sketch is available for a derived sketch , but not a 3D sketch (2017 SP3)
I would say you need a macro, for a similar situation (model vertices -> sketch points) I wrote my first one, took me all day but it puts a smile on your face when it works.
As I was trying I made one that copies points from "Sketch1" to "Sketch2". In it's current form it isn't very useful, I was just learning and this was a stepping stone. I would you suggest you ask in the api forum?
Here is what I wrote/copy/pasted/cannibalised...
Dim swApp As SldWorks.SldWorks
Dim selMgr As SldWorks.SelectionMgr
Dim Model As SldWorks.ModelDoc2
Dim SketchPoints As Variant
Dim SketchFeature As SldWorks.Feature
Dim skPoint As Object
Dim boolstatus As Boolean
Dim i As Integer
Set swApp = CreateObject("SldWorks.Application")
Set Model = swApp.ActiveDoc
Set selMgr = Model.SelectionManager
boolstatus = Model.Extension.SelectByID2("Front Plane", "PLANE", 0, 0, 0, False, 0, Nothing, 0)
boolstatus = Model.Extension.SelectByID2("Sketch1", "SKETCH", 0, 0, 0, False, 0, Nothing, 0)
Set SketchFeature = selMgr.GetSelectedObject6(1, 0)
Set SketchFeature = SketchFeature.GetSpecificFeature2
SketchPoints = SketchFeature.GetSketchPoints2
For i = 0 To UBound(SketchPoints)
Set skPoint = Model.SketchManager.CreatePoint(SketchPoints(i).X, SketchPoints(i).Y, 0#)
boolstatus = Model.Extension.SelectByID2("Sketch2", "SKETCH", 0, 0, 0, False, 0, Nothing, 0)
edit: actually my memories failing me,,, I think this is trying to copy 2 sketches worth of points, I can't remember, it did work kindof at the time
Could you use the macro provided here: Tutorial-How to export points from solidworks to a excel file! - GrabCAD
To export your 3D points to excel? Then change the Z column to all one value, then save the excel file as a txt file and then re-import it into Solidworks.
Tutorial-How to import points to solidworks from a text file ! - GrabCAD
I do have a macro, but when it dumps the points back in from Excel it does it automatically as a 3D sketch. I wouldn't have a clue as to how to edit let alone write a macro.
Yes, I see the issue. Even with the import from a txt document, I think that it creates a 3D sketch even if all points are on the same plane.
Maybe Rob Edwards answer is the best. Not sure why you can't box select sketch points *sigh*
Ya I put in a request with SW for the ability to box select.
It's a complete pain not being able to convert sketch points..
My macro skills are pretty much zilch, but one of the wizards on here could do it pretty easy I bet
Can you get away with doing an on plane relation with all the points?.. In my example I edited a 3d sketch where I had randomly created 3d sketch points, then selected the plane I wanted to make an on plane relation, then box selected the points. Don't know why I had to select the plane first, but I did.
Thank you everyone for your input. I'll try the API fellas.
Good Luck Rod, I would be interested in the macro myself so will look out for it
I just hastily cobbled this together, which creates a sketch on front plane and adds points at the origin and then makes them coincident with each point in 3DSketch1, but you have to turn off 'snapping manually' I don't know how do that
boolstatus = Model.Extension.SelectByID2("3DSketch1", "SKETCH", 0, 0, 0, False, 0, Nothing, 0)
Set skPoint = Model.SketchManager.CreatePoint(0, 0, 0#)
boolstatus = SketchPoints(i).Select4(False, selMgr)
boolstatus = skPoint.Select4(True, selMgr)
It works!! ... kind of
That is why I want to convert them onto a plane for a 2D sketch. From there I can spline them.
If you are going to join each point with a spline after creating a 2D sketch, why not join the points in the 3D sketch (viewed face on) and then convert the spline into a 2D sketch?
Thanks Dennis, but that doesn't get me from a 3D to a 2D sketch.
Awesome! That works. Thank you!
Points are X, Y, Z.
Reduce one of them to 0 put them all on the same plane.
Solid works is not the right software to process point clouds.
Retrieving data ...