Hello Guest it is April 17, 2024, 08:21:50 PM

Author Topic: ACAD import points to a drawing  (Read 10545 times)

0 Members and 1 Guest are viewing this topic.

Offline djc

*
  •  47 47
    • View Profile
Re: ACAD import points to a drawing
« Reply #20 on: June 14, 2011, 08:15:30 AM »
Does anyone know how to bring in points to a drawing in ACAD?

I realise that your question has now been amply answered, but for future reference, the way to proceed is via a DXF file. A few stabs into Google will reveal that free converters exist to take virtually any file you can think of both into and out of DXF format. In your particular case, CSV to DXF is the most appropriate.

In addition, you can do it yourself via Excel: open up a blank drawing in Acad and put a single point at the origin. Save as ASCII DXF. Open in Notepad and look for the [Entities] section. That is what a single point at 0,0 looks like. Save the DXF again with two points and examine. Note the difference. You now have enough information to cut and paste from Excel. Polylines are more complicated but same principle.

If you search a bit further, you can find the DXF file specification. This contains inter alia a minimal DXF file. Use this (as a header and footer) and you can automatically generate from Excel.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: ACAD import points to a drawing
« Reply #21 on: June 14, 2011, 04:22:55 PM »
oK I see the method.But I don't see where it applies here. I am taking a points file with A/Z data being A is polar and Z is height.  THen Gerrys macro takes that data and converts it into XY coords and inserts into the drawing at 0,0 XY.

But all that aside(;-) How would I get the data inside EXCELL put into the DXF format.I would have to create a header and footer block. Then create an blank entity block for EACH point to input the data Inserting the data into the empty spaces in the block ??

The Number of data points could run from 360 to 360,000

Then save out as text file ? That is not counting the COnversion from polar to linear.

Just curious,(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: ACAD import points to a drawing
« Reply #22 on: June 21, 2011, 12:01:53 AM »
Gerry another ACAD question when you have the time.

Can you take a set of points, imported cam data, and start at one point and connect the dots with ARCs.

Lets say Start at a point then reference the next 2 points and set the  radius between the two outer points from the offset off of the center point???


Maybe a LISP routine ?

Just a thought, (;-) TP

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: ACAD import points to a drawing
« Reply #23 on: June 21, 2011, 06:50:43 AM »
With Lisp or VBA, yes, but they'd be individual arcs.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: ACAD import points to a drawing
« Reply #24 on: June 21, 2011, 01:25:03 PM »
Hi Gerry the final output is straight lines any way BUT being that it is in the A axis they are all arcs .

Could I blend that process into the points import program?   I don't know much about Lisp or VBA but I can have a go at it.

I have been learning SheetCamism for building post so it can't possible be any harder than that (;-)

(;-) TP

« Last Edit: June 21, 2011, 01:26:35 PM by BR549 »

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: ACAD import points to a drawing
« Reply #25 on: June 21, 2011, 01:58:33 PM »
For me, VBA is much more readable the Lisp. I've written complex Lisp code in the past, but mostly use VBA now.

Look in the help file (VBA reference section) for the AddArc method. It looks like adding arcs is rather complicated, as you'll need to find the center of each arc, as well as the start and end angle. You can find the angles using the "AngleFromXaxis" method, after you find the centerpoint.

I think a much easier method is to create a polyline from the points. I'll need to check, but I think you can use pedit to fit arcs to the polyline, and explode the fit polyline into arcs. This would be a lot easier than creating the arcs. But I'm not sure if it'll change the accuracy.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html