Jump to content

Export X Coordinates only to note pad file with Space Seperator


pvsvprasadcivil

Recommended Posts

Dear all Well Wishers,

 

Please provide a code for Exporting X coordinates only to Notepad with space separator or comma separator only. and i need Exporting Y coordinates only to Notepad with space separator for selected objects. sorry for my poor English.so kindly suggest and provide Auto lisp as soon as possible.

 

example of X coordinates in note pad is= 0 2 3.5 6 8.2 10 13 14 17

example of Y coordinates in note pad is= 0 1.5 3.2 4 6.3 9 12.5 19

 

thank you for Supporting.

Link to comment
Share on other sites

Did you try this pointmanager?

you will be able to change format and output

in excel of notepad you can furthermore do some last editing..

 

 

http://lee-mac.com/ptmanager.html

 

Dear sir,

thank you for your kind reply.please arrange alternative lisp for Export X coordinates only with space like 0 3.5 4.2 6.1 7.2 8.6 etc

Link to comment
Share on other sites

If you use Lee Mac's program to place all the X coordinates in a column you can format the coordinates into a single line with spaces by copy and pasting the column of coordinates into MS Word and then use Replace to replace ^p (the paragraph wild card) with a space.

Link to comment
Share on other sites

Feeling genourous today

; 1st line is x 2nd line is y
; by BIG AL June 2016
(while (setq pt (getpoint "press <Cr> to exit"))
(setq lstx (cons (nth 0 pt) lstx)) 
(setq lsty (cons (nth 1 pt) lsty))
)
(setq fo (open "c:\\acadtemp\\XY.TXT" "w"))
(setq x 0
lstxx ""
lstyy "")
(repeat (length lstx)
(setq lstxx (strcat lstxx (rtos (nth x lstx)2 3))) 
(setq lstyy (strcat lstyy (rtos (nth x lsty)2 3 )) 
(setq x (+ x 1))
)
(write-line lstxX fo)
(write-line lstyy fo)
(close fo)

Link to comment
Share on other sites

Feeling genourous today

; 1st line is x 2nd line is y
; by BIG AL June 2016
(while (setq pt (getpoint "press <Cr> to exit"))
(setq lstx (cons (nth 0 pt) lstx)) 
(setq lsty (cons (nth 1 pt) lsty))
)
(setq fo (open "c:\\acadtemp\\XY.TXT" "w"))
(setq x 0
lstxx ""
lstyy "")
(repeat (length lstx)
(setq lstxx (strcat lstxx (rtos (nth x lstx)2 3))) 
(setq lstyy (strcat lstyy (rtos (nth x lsty)2 3 )) 
(setq x (+ x 1))
)
(write-line lstxX fo)
(write-line lstyy fo)
(close fo)

 

Dear sir, thank you for your valuable code. sir what is the command for using your code? and i want to export selected lines only.kindly explain for me.

 

thanking you sir.

Link to comment
Share on other sites

The code is for points picked off the screen using lisp. This is a odd way to export x y data.

 

If you want lines or plines then it would have to be changed. Search for co-ordinates of a pline

 

To run copy all the text to notepad and save as say "Points-x-y.lsp"

 

You can run it in two simple ways.

Using explorer drag Points-x-y.lsp onto dwg, it will run.

Type Appload select Points-x-y.lsp and load it will run.

Edited by BIGAL
Link to comment
Share on other sites

Lee Mac's Point Manager V2.4 plus some minor editing in MS Word should give you want you need without any programming. Lee's program is very flexible as you can select individual polylines and specify the output format.

 

  1. Download the Point Manager program from Lee Mac's site as noted above.
  2. Click Manage, Load Application
  3. Select and load the file you downloaded.
  4. Enter the command: PTM
  5. Fill in the form as follows (your filename of course may be different):
    ptm1.png
  6. Open the txt file in Excel and select the column of coordinates you want.
  7. Copy and paste the column of coordinates into MS Word.
  8. Use the Word Replace function to replace ^p (the paragraph mark) with a space and you will have a single line of X coordinates that are delimited by a space character.

Link to comment
Share on other sites

Here is some code for a line need another for plines as I have already mentioned.

 

 

(while (setq obj (vlax-ename->vla-object (car (entsel "\nPick line"))))
(setq stpt (vla-get-startpoint obj))
(setq lstx (cons (nth 0 stpt) lstx))
(setq lsty (cons (nth 1 stpt) lsty))
(setq endpt (vla-get-endpoint obj))
(setq (setq lstx (cons (nth 0 stpt) lstx))
)

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...