Hello
I'm desperately trying to make a macro work to import a point cloud from a .txt file or .csv I only want points and not "curves passing through xyz points".
points.txt
Hello
I'm desperately trying to make a macro work to import a point cloud from a .txt file or .csv I only want points and not "curves passing through xyz points".
Hello
Do you already have the beginning of a code? I imagine that you want to import them into a sketch and not as a reference geometry point.
I want to import them into a 3D sketch, here is the code found on the net:
Dim swApp As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
swApp.ActiveDoc.ActiveView.FrameState = 1
Dim skPoint As Object
Open "Points.txt" For Input As #1
Part.SketchManager.Insert3DSketch True
Do While Not EOF(1)
Input #1, X, Y, Z
Set skPoint = Part.SketchManager.CreatePoint(X / 1000, Y / 1000, Z / 1000)
Loop
Close #1
Part.ShowNamedView2 "*Isometric", 7
Part.ViewZoomtofit2
End Sub
I think I have a unity problem, my table is in Lambert coordinates...
You'll have to tell us a little more if you want us to help you...
Is it the compiled code? Do you have an execution error? Is the result incoherent?
See this tutorial
http://www.lynkoa.com/tutos/3d/video-tutorial-creating-curves-importing-point-data-text-file-solidworks
some leads to follow I think
@+-))
Hello everyone & thank you for the links, I found my solution on the net.
Attached you will find a Macro that creates the point cloud or a spline directly in Solidworks.
Happy modeling, see you soon!
Hello everyone & thank you for the links, I found my solution on the net.
Attached you will find a Macro that creates the point cloud or a spline directly in Solidworks.
Happy modeling, see you soon!
Hello everyone & thank you for the links, I found my solution on the net.
Attached you will find a Macro that creates the point cloud or a spline directly in Solidworks.
Happy modeling, see you soon!
Hello
I allow myself to write about this because I have this problem of generating a point cloud from an XLS file and I tried this macro and it doesn't work for me... it tells me to activate a coin before launching the macro while I have an open solid with an empty coin in it.
Does anyone have a solution?
Thanks in advance
It is preferable to open a topic in general, even if it means linking to the one you are referring to. In the meantime, here is the original topic in the comments, there are some changes made with maybe more recent versions than the one that was running at the time under sw2013.