I have Register Apllication with the Name ("RoomPoint") i want to store the insertion point of an Entity, i am doing like this but it does not work Please can you help.
Thanks
(setq Old_Insertion_Point (cdr (Assoc 10 oldlist)))
(setq thedata '((-3 ("RoomPoint" (1010 . Old_Insertion_Point)))))
You are using a quotation mark in front of the list in (setq thedata ...). That means nothing inside gets evaluated.
Remove the quote and build the list using LIST and CONS calls.
--
Actually i want to know how i will put value for a insrtion point to 1010 application type in extended data if you can provide any example i would more easier for me.
Thanks
Why a complete Paires of Extended data list is not created.
Thanks
(setq oldlist (entget (entlast)))
(setq Old_Insertion_Point (cdr (Assoc 10 oldlist)))
(setq Old_Insertion_Point_X (car Old_Insertion_Point))
(setq Old_Insertion_Point_Y (cadr Old_Insertion_Point))
(setq Old_Insertion_Point_Z (caddr Old_Insertion_Point))
(setq thedata ((-3 ("RoomPoint" ((cons 1010 Old_Insertion_Point_X)(cons 1010 Old_Insertion_Point_Y)(cons 1010 Old_Insertion_Point_Z))))))
(setq NewList (append Oldlist thedata))
Hi kulfi,
from the help files Organization of Extended Data
3D Point
1010. Three real values, contained in a point.
Real
1040. A real value.
As a demo:
(Untested)
(setq oldlist (entget (entlast))) (setq Old_Insertion_Point (cdr (Assoc 10 oldlist))) (setq Old_Insertion_Point_X (car Old_Insertion_Point)) (setq Old_Insertion_Point_Y (cadr Old_Insertion_Point)) (setq Old_Insertion_Point_Z (caddr Old_Insertion_Point)) (setq thedata (list (list -3 (list "RoomPoint" (cons 1040 Old_Insertion_Point_X) (cons 1040 Old_Insertion_Point_Y) (cons 1040 Old_Insertion_Point_Z) ) ) ) ) (regapp "RoomPoint") (setq NewList (append Oldlist thedata)) (entmod NewList)
Or:
(setq oldlist (entget (entlast))) (setq Old_Insertion_Point (cdr (Assoc 10 oldlist)))
(regapp "RoomPoint") (setq thedata (list (list -3 (list "RoomPoint" (cons 1010 Old_Insertion_Point) ) ) ) ) (setq NewList (append Oldlist thedata)) (entmod NewList)
Hope that helps
Henrique