Jump to content

Curved Line


02manchestera

Recommended Posts

He all

 

Im very new to autocad and i am using 2013 student there is two things i need help with.

 

1) I have drawen a curved line for a Directional Drill Shot and need to create a points on it every 2 metres to give a Cord postion,

 

2)I need to beable to transfer these points into a excel spread sheet.

 

Many thanks

Alex

Link to comment
Share on other sites

Hi,

You can use "measure" command to draw points on line at equal interval.

Command: measure

Select object to measure:

Specify length of segment or [block]: 2

 

Secondly, search this forum you will find some of the autolisp code to export points from autocad to excel or txt.

 

I hope this is what u need.

 

Regards

Aaryan

Link to comment
Share on other sites

Thanks you for your help you have helped me with my first problem many thanks but i have just had a look about and ended up at a website but im not sure what program i would need to use you option would be great

 

http://www.lee-mac.com/programs.html

 

Many thanks

Alex

 

 

 

 

Managed to find the program i want now and managed to get some points into text files but going back to my 1st question.

 

So i have create points what look like crosshairs but as i have over 100 with every drill shot it will take forever to single select each one to export is there away to select them all quickly without selecting everything else on the drawing

 

Many thanks

alex

Link to comment
Share on other sites

Try this code. This should help you out.

 

(defun C:test (/ ss fil opn ctr prop pnt X Y Z)
 (setq ss (ssget '((0 . "POINT"))))
 (setq fil (getfiled "Save File as" "*.*" "csv" 1)
opn (open fil "w"))
 (setq ctr 0)
 (repeat (sslength ss)
   (setq prop (entget (ssname ss ctr))
  pnt (cdr (assoc 10 prop))
  X (rtos (car pnt))
  Y (rtos (cadr pnt))
  Z (rtos (caddr pnt)))
   (write-line (strcat X "," Y "," Z) opn)
   (setq ctr (1+ ctr)))
 (close opn)
 (princ)
 )

 

Copy and paste this code to notepad file and save it as "Test.lsp". Dont forget to put "*.lsp" extension.

Now come to autocad and type "appload" ont the command line, navigate to "Test.lsp" wherever you have saved, select the file and press load and then close the dialog box.

Type "test" at the command line and select objects(points) and press enter and save the file. open that file (which is in csv format) in excel.

 

Hope it helps

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...