Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Change coordinates + export block
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Change coordinates + export block (Read 1823 times)
0 Members and 1 Guest are viewing this topic.
amc.dicsac
Newt
Posts: 109
Autocad 2008
WWW
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
Logged
<a href="http:/http://axprogramlisp.blogspot.pe" class="bbc_link" target="_blank">By Alexander Castro</a>
kdub_nz
Mesozoic keyThumper
SuperMod
Water Moccasin
Posts: 1707
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 ??
Logged
Called Kerry in my other life
Retired; but they dragged me back in !
I live at UTC + 13.00
some people complain about loading the dishwasher
Sometimes the question is more important than the answer.[/i
amc.dicsac
Newt
Posts: 109
Autocad 2008
WWW
Re: Change coordinates + export block
«
Reply #2 on:
June 13, 2016, 05:36:00 PM »
Code - Auto/Visual Lisp:
[Select]
(
defun
c:Export_Block
(
/
Carpeta_dwg Nombre_dwg Punto_base sscop
)
(
setq
Carpeta_dwg
"C:/Bloques/"
)
(
setq
Nombre_dwg
(
getstring
t
"
\n
Ingresa nombre de bloque: "
)
)
(
setq
Path_dwg
(
strcat
Carpeta_dwg Nombre_dwg
".dwg"
)
)
(
setq
Punto_base
(
getpoint
"
\n
>> Indica punto base: "
)
)
(
command
"ucs"
"o"
Punto_base
""
)
(
setq
sscop
(
ssget
"_:L"
)
)
(
command
"_.-wblock"
Path_dwg
""
Punto_base sscop
""
)
(
command
"oops"
)
(
command
"ucs"
"p"
)
(
command
"base"
"0,0,0"
)
(
LM:
Open
(
strcat
Carpeta_dwg Nombre_dwg
".dwg"
)
)
(
princ
)
)
;; Abrir Archivos ---> Lee Mac
(
defun
LM:
Open
(
target
/
shell result
)
(
if
(
and
(
or
(
eq
'INT
(
type
target
)
)
(
setq
target
(
findfile
target
)
)
)
(
setq
shell
(
vla-getInterfaceObject
(
vlax-get-acad-object
)
"Shell.Application"
)
)
)
(
progn
(
setq
result
(
vl
-
catch
-
all
-
apply
'
vlax-invoke
(
list
shell '
open
target
)
)
)
(
vlax-release-object
shell
)
(
not
(
vl-catch-all-error-p
result
)
)
)
)
)
(
vl-load-com
)
Logged
<a href="http:/http://axprogramlisp.blogspot.pe" class="bbc_link" target="_blank">By Alexander Castro</a>
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Change coordinates + export block