Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

1010 Value Extended Data

5 REPLIES 5
Reply
Message 1 of 6
kulfi
208 Views, 5 Replies

1010 Value Extended Data

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)))))

Kulfi
Electronics Engineer

Pind Saudi Arabia



5 REPLIES 5
Message 2 of 6
martti.halminen
in reply to: kulfi

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.

 

-- 

 

Message 3 of 6
kulfi
in reply to: martti.halminen

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

Kulfi
Electronics Engineer

Pind Saudi Arabia



Message 4 of 6
kulfi
in reply to: kulfi

A complete pairs of Extended data list is not created.
(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))
Kulfi
Electronics Engineer

Pind Saudi Arabia



Message 5 of 6
kulfi
in reply to: kulfi

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))

Kulfi
Electronics Engineer

Pind Saudi Arabia



Message 6 of 6
hmsilva
in reply to: kulfi

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

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost