- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Scale problem
Hi,
i am a beginner, i have a lisp for insert the drawing and Template (.dwg formate).
its working in my machine
1.inserting drawing
2.template at 0,0 location (for my requirement drawing has to insert first)
but its not working in other machines,
I tried INSUNITS, DWGUNITS, ATTREQ but its not working
the lisp routing is below,
(defun c:zedwg1( / *error* echohold attreqhold KorR )
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
(princ (strcat "\nError: " errmsg))
); end if
(setvar 'attreq attreqhold)
(command "_.undo" "_end")
(setvar 'cmdecho echohold)
(princ)
); defun
(command "_.undo" "_begin")
(setq
echohold (getvar 'cmdecho)
attreqhold (getvar 'attreq)
); setq
(setvar 'cmdecho 0)
(setvar 'attreq 0)
(initget 1 "Keep Remove")
(setq KorR (prompt "\nSelect Block name from list, then pick OK."))
(princ)
(initdia)
(command "_.insert" (getvar 'viewctr) "_.erase" "_last" ""); establishes default Block name
(command "_.zoom" "E")
(command "_.-insert" "ISO TEMPLATE" "0,0,0" "1" "" "")
(princ "\nEasy EXPLODE & attedit & attedit")(princ)
(command "EXPLODE" "LAST" "")
(initdia)
(command "._attedit" "726.712806,120.221366,0.000000")
(princ)
(initdia)
(command "._attedit" "820.800222,141.451045,0.000000")
(command "_.-insert" "CONFIDENTIAL_BLOCK" "12.7000,39.400,0" "1" "" "")
(command "LAYISO" "_WINDOW" "60.5062,157.2234" "527.9969,383.1805" "" )
(command "scale" "_window" "12.8700000,39.4000" "608.2000,520.700" "R" "window" "13.0000,500.2000" "37.3000,521.2000"
"" "328.4033,265.5697" "0.95")
(command "LAYUNISO" "")
(princ)
)
could some please help me to fix the issue.....
I would appreciate you valuable Guide to fix the issue,
Thanks,
Meganathan
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
The drawing is inserting at 0,0 correctly with the size (863,558) after select the browse insert file.
problem i am facing is, while imports the template (ISO TEMPLATE.dwg - file),
Template is scaling big size (21935 , 14193) after import.
Not sure why its scaling the template !!!
please see the attached image,
Green color is drawing and Red border is Template.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Run -DWGUNITS command (there is a dash in the name, type it) and ensure the file you are in is set correctly (and what for the scaling question).
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Thanks for the information
I have checked even -Dwgunits also it is not resolved my problem
the question regarding the scale is why the template alone get scaled?
more over because of the scale the lisp stop.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
-DWGUNITS settings in your source and destination files must match, as does the correct settings for INSUNITS in the destination file must be set for all of it to work (generally speaking, since I have no idea what your template file is all about).
I have to say your lisp is a very old school method of bringing in titleblocks and starting/setting up a template file: we haven't done it that way in a couple of decades.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Thanks for the reply,
i have found this commands in Autocad2016,
Command: INSUNITSDEFSOURCE
Enter new value for INSUNITSDEFSOURCE <1>:
Command: INSUNITSDEFTARGET
Enter new value for INSUNITSDEFTARGET <1>:
now its the insert is working.
Thanks.