Community
give this idcb.lsp a try:
; idcb takes point selected on screen and copies X,Y,Z as text to clipboards
; OP:
; https://forums.autodesk.com/t5/autocad-forum/id-values-to-clipboard/m-p/12163699#M1112565s
(defun c:idcb (/ id txt)
; copytext to clipboard with str as text string argument
; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-copy-mtext-to-clipboard-in-one-step/m-p/7517011/highlight/true#M361124
(defun COPYTEXT (str / html)
(vl-load-com)
(if (= (type str) 'STR )
(progn
(vlax-invoke (vlax-get (vlax-get (setq html (vlax-create-object "htmlfile"))
'ParentWindow) 'ClipBoardData) 'SetData "Text" str)
(vlax-release-object html)
(princ "\nSuccessfully Copied text to Clipboard")
) ; progn
(princ"\nOnly Text is Supported.")
) ; if
(princ)
)
(while(not id)
(if(setq id(getpoint"\nSelect Point: "))
(progn
(setq txt(strcat "\nX is "(rtos(car id)2 4) " Y is " (rtos(cadr id)2 4) " Z is " (rtos(caddr id)2 4)))
(copytext txt)
)
(princ"\nNo Point Selected.")
) ; if
) ; while
) ; defun
Thank you, works like I wanted
Better paste to Excel like this:
(while(not id)
(if(setq id(getpoint"\nSelect Point: "))
(progn
(setq txt(strcat "X is "(rtos(car id)2 4) " Y is " (rtos(cadr id)2 4) " Z is " (rtos(caddr id)2 4)))
(copytext txt)
If you want to Excel ask for that, 2 common methods, write a csv file or write direct to excel. For me the latter. Keep picking points they appear in Excel.