Author Topic: Change coordinates + export block  (Read 467 times)

0 Members and 1 Guest are viewing this topic.

amc.dicsac

  • Newt
  • Posts: 108
  • Autocad 2008
Change coordinates + export block
« on: June 13, 2016, 05:14:53 PM »
Hello that such I need help, I have a block in the coordinates 100,100,50 and want change when exported to 0,0,0
<a href="http:/http://axprogramlisp.blogspot.pe" class="bbc_link" target="_blank">By Alexander Castro</a>

kdub

  • Mesozoic relic
  • SuperMod
  • Swamp Rat
  • Posts: 1343
  • class keyThumper<T>:ILazy<T>
Re: Change coordinates + export block
« Reply #1 on: June 13, 2016, 05:29:36 PM »
What have you tried that doesn't work ??
called Kerry in my other life

Sometimes the question is more important than the answer.
#ridesober

amc.dicsac

  • Newt
  • Posts: 108
  • Autocad 2008
Re: Change coordinates + export block
« Reply #2 on: June 13, 2016, 05:36:00 PM »
Code - Auto/Visual Lisp: [Select]
  1. (defun c:Export_Block (/ Carpeta_dwg Nombre_dwg Punto_base sscop)
  2. (setq Carpeta_dwg "C:/Bloques/")        
  3. (setq Nombre_dwg (getstring t "\nIngresa nombre de bloque: "))          
  4. (setq Path_dwg (strcat Carpeta_dwg Nombre_dwg ".dwg"))                                
  5. (setq Punto_base (getpoint "\n>> Indica punto base: "))  
  6. (command "ucs" "o" Punto_base "")
  7. (setq sscop (ssget "_:L"))
  8. (command "_.-wblock" Path_dwg "" Punto_base sscop "")
  9. (command "oops")
  10. (command "ucs" "p")
  11. (command "base" "0,0,0")
  12. (LM:Open (strcat Carpeta_dwg Nombre_dwg ".dwg"))
  13. (princ))
  14.  
  15.  
  16.  
  17. ;; Abrir Archivos ---> Lee Mac
  18. (defun LM:Open ( target / shell result )
  19. (if (and (or (eq 'INT (type target))
  20.               (setq target (findfile target))
  21.             )
  22. (setq shell (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application"))
  23.         )
  24. (setq result (vl-catch-all-apply 'vlax-invoke (list shell 'open target)))
  25.               (vlax-release-object shell)
  26.               (not (vl-catch-all-error-p result))
  27.         )
  28.     )
  29. )
<a href="http:/http://axprogramlisp.blogspot.pe" class="bbc_link" target="_blank">By Alexander Castro</a>