wsylvester
New member
You can't create a CNC program with SOLIDWORKS; that's what it is. If someone is claiming they saw another person doing so, they were in error; that's what it is. If you can't do something, but continue to try, it would take forever; that's what it is.
In error? while I haven't done it in SolidWorks I have done it in AUtoCad using VBA ,close to 6 years ago, longer if you include doing it in Lisp.
With SolidWorks having VBA then there would be no reason not to be able to tweak the Acadvba code to suitSW's object library. Granted you're not going to do complex surfacing, but a good deal of parts are just profiles,pockets and holes.
Manycnc machines have canned pocket routines that only need the boundries do to pockets.. those 3 digit g codes that no one uses. quite a bit can been done with looping and g10 also. If one has the imagination to do so. Environiment as CncWhiz puts it.
So okaytechnically you can't do it alone with Acad or SW, but vba is included. So I consider it part of them. You just have to have a basic understanding of it. It's not that hard! So that you don't think that I'm just blowing smoke out my rear here's some partial code sniglets from Acad vba routine done 6 years ago.
No, I didn't see someone else do it, I did it. Cnc's since 75? APT? Punched cards?Those were the days
--------------------
Public obj As AcadObject
Public poly As Acad3DPolyline
Public ln As AcadLine
Public ar As AcadArc
Public pt As AcadPoint
Public pts(0 To 2) As Double
--------
Open fn For Output As #1
For Each obj In ThisDrawing.ModelSpace
'Debug.Print q, obj.ObjectName
Select Case obj.ObjectName
Case "AcDbLine"
Set ln = ThisDrawing.HandleToObject(obj.Handle)
aline
Case "AcDb3dPolyline"
Set poly = ThisDrawing.HandleToObject(obj.Handle)
apoly
------
Public Function apoly()
var = poly.Coordinates
Print #1, "G01";
For q = 0 To UBound(var) Step 3
Print #1, " X"; Format(var(q), fs); _
" Y"; Format(var(q + 1), fs) _
; " Z"; Format(var(q + 2), fs)
'pts(0) = var(q): pts(1) = var(q + 1): pts(2) = var(q + 2)
'Set pt = ThisDrawing.ModelSpace.AddPoint(pts)
Next q
End Function
In error? while I haven't done it in SolidWorks I have done it in AUtoCad using VBA ,close to 6 years ago, longer if you include doing it in Lisp.
With SolidWorks having VBA then there would be no reason not to be able to tweak the Acadvba code to suitSW's object library. Granted you're not going to do complex surfacing, but a good deal of parts are just profiles,pockets and holes.
Manycnc machines have canned pocket routines that only need the boundries do to pockets.. those 3 digit g codes that no one uses. quite a bit can been done with looping and g10 also. If one has the imagination to do so. Environiment as CncWhiz puts it.
So okaytechnically you can't do it alone with Acad or SW, but vba is included. So I consider it part of them. You just have to have a basic understanding of it. It's not that hard! So that you don't think that I'm just blowing smoke out my rear here's some partial code sniglets from Acad vba routine done 6 years ago.
No, I didn't see someone else do it, I did it. Cnc's since 75? APT? Punched cards?Those were the days

--------------------
Public obj As AcadObject
Public poly As Acad3DPolyline
Public ln As AcadLine
Public ar As AcadArc
Public pt As AcadPoint
Public pts(0 To 2) As Double
--------
Open fn For Output As #1
For Each obj In ThisDrawing.ModelSpace
'Debug.Print q, obj.ObjectName
Select Case obj.ObjectName
Case "AcDbLine"
Set ln = ThisDrawing.HandleToObject(obj.Handle)
aline
Case "AcDb3dPolyline"
Set poly = ThisDrawing.HandleToObject(obj.Handle)
apoly
------
Public Function apoly()
var = poly.Coordinates
Print #1, "G01";
For q = 0 To UBound(var) Step 3
Print #1, " X"; Format(var(q), fs); _
" Y"; Format(var(q + 1), fs) _
; " Z"; Format(var(q + 2), fs)
'pts(0) = var(q): pts(1) = var(q + 1): pts(2) = var(q + 2)
'Set pt = ThisDrawing.ModelSpace.AddPoint(pts)
Next q
End Function