×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

reading coordinates from autocad

reading coordinates from autocad

reading coordinates from autocad

(OP)
Hi, I am to write a code in FORTRAN which can calculate the section properties of any arbitary shape. The idea is to draw the section in autocad and then mesh (or hatch) it with user defined option (square meshes of unit size). my program is supposed to read the cad file, get the coordinates of these meshes (or hatch) and calculate the section properties (ie; Area, section modulus etc). i know that cad has option region>massprop> to get this, but i dont have full option cad, hence looking to develop this program. i wish to know if any one has good ideas on this. is it possible to read the coordinates of mesh from autocad file (if saved in a different format - dxf, ascii etc which can be open in notepad for reading)

RE: reading coordinates from autocad

I assume you have AutoCAD LT or similar if it doesn't have the MASSPROP command. So then you also couldn't use a lisp routine to simplify an extract of coordinates.
You should be able to pull the coordinates from a dxf file. Create a simple file with a hatch and look through the dxf file. You'll have to get familiar with the dxf codes for objects. A polyline around the section might be easier to read than a hatch, not sure.

RE: reading coordinates from autocad

(OP)
hi @carlB, your comments is appreciated. but i am struggling with dxf. unable to precisely get the coordinates from this...anyway, thanks for your comment

RE: reading coordinates from autocad

You can find the structure of DXF files with a quick google search. If you try that and still have questions, come back here.

RE: reading coordinates from autocad

I was able to right click on a 2010 ACAD Lt dxf file. At "Open with", I was able to select Notepad, and the file opened with all the coordinates in text format.

RE: reading coordinates from autocad

Here is a thought. If Fortran can read script, then write your program in script which should be able to identify the coordinates of the meshes. If you can download the ACAD program in the 2005,2002 or 2000 version ) on this site so that I can look at the mesh structure to get an idea on how the mesh can be identified with coordinates. If you can insert points within the mesh, then the coordinates of those points will be listed in reference to the UCS when you pick those points. To ease the selection of those points, put them in one layer then you can turn off all other layers and the points will show up when you command to list and requires you to select the objects, ie, the points.

RE: reading coordinates from autocad

Here is a correction to my reply"... then you can turn off all other layers and the points will show up on the screen. When your command to "list" requires you to select the objects, ie, the points, it should be relatively easy to pick the points."

RE: reading coordinates from autocad

I've never used attributes but you could use them to identify each point (a big chore), then later extract them.
Did "Notepad" open a dxf for you?

RE: reading coordinates from autocad

The DXF file has a structure, each entity is identifies with coordinates and other identifying attributes ( ie radius for a circle, etc ). It is a pure ASCII text file and can be read by any word processor or text editor. You don't need the mesh objects, just the coordinates defining the shape. If you have a general idea of the shape you can write a program to open the file, read the coordinates and calculate the section properties. Don't make it harder than it is!!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close