Advertisement
Guest User

Untitled

a guest
May 18th, 2023
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. (defun c:rebatimento()
  2. (setq obj (ssget))
  3. (command "._COPYclip" obj (getpoint "\nEnter base point: ") "")
  4. (setq coord (getpoint "\nEnter the coordinates to paste the object: "))
  5.  
  6. ; Get elevation of reference surface and point
  7. (setq zref (getreal "\nEnter value of reference surface:"))
  8. (setq zpont (getreal "\nEnter the value of the point: "))
  9.  
  10. ; Substitute the y coordinate
  11. (setq finalcoord (list (nth 0 coord) (* (- zpont zref) 5) 0.0))
  12.  
  13. ; Repeat the paste process until the user cancels
  14. (while
  15. (progn
  16. (command "._pasteclip" finalcoord "")
  17. (setq coord (getpoint "\nEnter the coordinates to paste the next object (or press Enter to cancel): "))
  18. (setq zpont (getreal "\nEnter the value of the point: "))
  19. (setq finalcoord (list (nth 0 coord) (* (- zpont zref) 5) 0))
  20. );progn
  21. );while
  22.  
  23. );defun
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement