@Anonymous wrote:
@Sea-Haven
@marko_ribar
All right!
Can I continue to the next point?
And I always want the X&Z value to be 0
Thank you
I don't know what you are after, but as Alan explained you have to specify all 3 coordinates separated with "," when asked (commas - without quotes)... If you want to continue changing UCS from previous settings and continously set new coordinates, bear in mind that old ones will change... Here is my code slightly modified for working in random UCS, so with this code you may continue with setting coordinates all until you set last point you pick...
(defun c:oldcoord2newcoord ( / pt v )
(setq pt (getpoint "\nClick on point you want to set coordinates of or specify old coordinates : "))
(setq v pt)
(setq pt (getpoint "\nSpecify new coordinates you wish for clicked point : "))
(vl-cmdf "_.UCS" "_non" (mapcar '- v pt) "")
(princ)
)
Hope that now is all fine and satisfies your requests... I changed "M" option as also with my AutoCAD it's not specifed as Kent noticed (it was coded from my experience of working with UCS, not from actuall options provided within command)...
Still I don't quite know why do you need this LISP (if you specify new coordinates, you can as well type them in text you create directly without changing any setting of UCS and this mod. covers only last setting of point coords - it's only better because of general approach that assumes that user works in some random UCS instead of initial AutoCAD default WCS)...
I don't know what else you requested more, I suppose this was correct answer so that you can mark it as soultion...
Am I wrong and missing something more important? You can either way alter my solution to your specific needs to input only single coordinate, but then it won't cover situations that may be more general (all 3 specifications of point data)... We need more info about things explaining what exactly you want to achieve. Then I suppose your input will make some sense - specifications of just Y coordinate... Anyway I leave both explanations and altering provided solution to you...
Stay well and take care.
Regards, M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)