Floating point

Steve Rudd

Usenet Archive
Joined
Aug 5, 2003
Messages
5
Reaction score
0
Hi Guys,
Need some help with this one please.

(setq pt1 (entsel "Select Object :"))(terpri)
returns :- (<Entity name: 400b21a0> (10197.4 31317.6 0.0))

How do I extract the floating point so its values can be (in whole or part)
used later in the routine?

Rgds,
Steve
 
Steve,

(setq pt1 (cadr (entsel))) returns the point picked. The second item in the list.

Study those help files, dude.

Joe Burke
 
Steve,

You're welcome.

But in fact is probably makes more sense to take your initial approach:

(setq ent (entsel))

This way you can extract the point picked (cadr ent) or the ename (car ent). I can't recall how many times I thought I would need only one or the other, only to find later I needed both. Now I'm rewriting the program to cover my shortsighted mistake.

Joe Burke
 

Latest threads

Back
Top