Author Topic: Setting Coordinate System  (Read 2456 times)

0 Members and 1 Guest are viewing this topic.

pedroantonio123

  • Guest
Setting Coordinate System
« on: March 05, 2015, 07:07:47 AM »
Hi

Is it possible to set the  information Setting Coordinate System (Italy-U32) with Lisp
see image e attach also the DWG File



http://img4web.com/view/YGAGXX


Maybe someone knows a way

Thanks
Pedro

VovKa

  • Water Moccasin
  • Posts: 1629
  • Ukraine
Re: Setting Coordinate System
« Reply #1 on: March 10, 2015, 05:29:25 AM »
Code: [Select]
(ade_projsetwscode "ITALY-U32")

pedroantonio123

  • Guest
Re: Setting Coordinate System
« Reply #2 on: March 11, 2015, 08:11:30 AM »
Thanks VovKa
it works in Map3D

It is possible to do this  in Autocad?
When I open a DWG Map3D  in Autocad then I see these coordinates information "Italy-U32" it can remove them by command GEOREMOVE.
Is there a way with Lisp to set "Italy-U32" in Autocad?

Thanks
Pedro

VovKa

  • Water Moccasin
  • Posts: 1629
  • Ukraine
Re: Setting Coordinate System
« Reply #3 on: March 12, 2015, 05:38:41 AM »
try it
Code: [Select]
(defun vk_projsetwscode (WSCode / a b c d e)
  (if (not (tblsearch "appid" "ADE_PROJECTION"))
    (regapp "ADE_PROJECTION")
  )
  (setq a (entget (namedobjdict) (list "*"))
b (assoc -3 a)
c (assoc "ADE_PROJECTION" (cdr b))
d (list "ADE_PROJECTION" (cons 1000 WSCode))
e (if c
    (subst d c b)
    (append b (list d))
  )
  )
  (entmod (if b
    (subst e b a)
    (append a (list (cons -3 e)))
  )
  )
)
;;;(vk_projsetwscode "ITALY-U32")

pedroantonio123

  • Guest
Re: Setting Coordinate System
« Reply #4 on: March 12, 2015, 12:12:44 PM »
It woooooorks, thanks VovKa  :-)  :-)
After saving the DWG, the coordinate system is displayed
(vk_projsetwscode "UTM84-33N")
Maybe there a possibility that the coordinate system is displayed immediately?
This would be perfect

Thanks

VovKa

  • Water Moccasin
  • Posts: 1629
  • Ukraine
Re: Setting Coordinate System
« Reply #5 on: March 12, 2015, 12:28:33 PM »
Maybe there a possibility that the coordinate system is displayed immediately?
can't help because i use Map3d 2005 and it doesn't have that feature, so i can't test