No announcement yet.

AutoCAD Visual Basic code for CNC work

  • Filter
  • Time
  • Show
Clear All
new posts

  • AutoCAD Visual Basic code for CNC work

    I have a few routines I have written in Visual Basic for Applications in AutoCAD to help with producing CNC code. I have one that is in many ways like some of the early cad packages Ihave seen that lets you select an entity (line,arc) and if it is connected to the previous you select the move type (G0, G1, G2,G3) and it generates the code. It also adds the G41/G42 and G40 if you have selected cutter comp. With another you create a toolpath, I using the Start Cut and Rapid layers, with all moves connected and unique(can't have more than 2 entities share a common point in X Y & Z) and it will generate the CNC in a few seconds. The third, I call CNCCheck and will read the CNC file and draw it on the screen. You can then do all the normal CAD stuff with it.

    I have versions written to work with our waterjet machine - we don't have nesting software so I use the Macros to generate the CNC code when I want more control over the cut path. I have some similar code I have written to use with our Milltronics lathe - rough turn, rough bore, rough face and other routines similar to the the Macros for the waterjet for finish profiles.

    I also have written similar code to work with Mach3 on my Sieg Mill. If you draw in 3D and connect everything cleanly it will prodice code with just a click.

    Just wondering if there is any interest.

  • #2
    Well, at least one guy would be quite interested in examining your routines- I've been thinking about abstracting coordinate data from A'cad for some time - which version do your fcns run on?


    • #3
      Currently using AutoCAD 2007. I originally started developing them on ProgeCAD and had to make a few minor changed because of the slightly different way Progecad names a couple things.What kind of machine are you doing CNC work on? Lathe? Mill? Router? Plasma?