DXF Export for CNC

I’m trying to build an export program DXF for CNC and presently Im using the native export by sketchup. So I’m trying to figure out a way to accomplish this by exporting part by part and should work with CNC software I’m having 2 issues right now:

  1. My sketchup object (Component) is being rejected by the CNC software because it requires polylines ( observation from a peer ).
  2. It takes a long time to export multiple object as I have to delete and redo every shape for it to be on a single dxf file (for every component 1 export function is being called).

I saw some simpleDXF exporter but Im have no idea how to accomplish something like that

See "Simple DXF" CNC exporter

Sorry edited my post i would like to ask some direction on how i could program an export like that maybe some book.

You need to ask specific coding questions (preferably with a code snippet and sample skp file which shows the challenge the code is attempting to solve.)

I have a pinned series of wiki lists (in this category) to help with learning Ruby (which is a prerequisite) and how the SketchUp API extends Ruby. (If you need to create an interface for the export, you’ll likely need to use the UI::HtmlDialog class which also requires knowing HTML, CSS and JavaScript.)

You should look at the “official” tutorials on how to set up an extension project …

ADD: I think that TIG has published an open source OBJ exporter over at SketchUcation. A DXF exporter would be very similar as both are plain text file formats. Perhaps also there are some open source XML exporters ?