pvsvprasadcivil Posted June 12, 2016 Posted June 12, 2016 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. Quote
halam Posted June 12, 2016 Posted June 12, 2016 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 Quote
pvsvprasadcivil Posted June 12, 2016 Author Posted June 12, 2016 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 Quote
lrm Posted June 14, 2016 Posted June 14, 2016 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. Quote
BIGAL Posted June 14, 2016 Posted June 14, 2016 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) Quote
pvsvprasadcivil Posted June 14, 2016 Author Posted June 14, 2016 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. Quote
BIGAL Posted June 15, 2016 Posted June 15, 2016 (edited) 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 June 16, 2016 by BIGAL Quote
lrm Posted June 15, 2016 Posted June 15, 2016 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. Download the Point Manager program from Lee Mac's site as noted above. Click Manage, Load Application Select and load the file you downloaded. Enter the command: PTM Fill in the form as follows (your filename of course may be different): Open the txt file in Excel and select the column of coordinates you want. Copy and paste the column of coordinates into MS Word. 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. Quote
BIGAL Posted June 16, 2016 Posted June 16, 2016 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)) ) Quote
Recommended Posts
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.