How to see information select objects

How to see information select objects

rgruychev
Advocate Advocate
762 Views
4 Replies
Message 1 of 5

How to see information select objects

rgruychev
Advocate
Advocate

How to see information after select objects with  (setq sel1 (ssget))

I want to see information selected  object and take this information.

0 Likes
763 Views
4 Replies
Replies (4)
Message 2 of 5

cadffm
Consultant
Consultant
You are searching for SSSETFIRST ?

(If (setq ss (ssget))(sssetfirst nil ss))

Sssetfirst - F1

Sebastian

0 Likes
Message 3 of 5

cadffm
Consultant
Consultant
If not. Use F1 and see all lispfunctions who started with"ss*"

Sorry, i am not sure about your goal and knowledge about lisp and dwg/dxf structures.

Sebastian

0 Likes
Message 4 of 5

Kent1Cooper
Consultant
Consultant

@rgruychev wrote:

How to see information after select objects with  (setq sel1 (ssget))

I want to see information selected  object and take this information.


If only seeing  the information is enough, you can use LIST instead of (ssget), and it will tell you all about the selected object(s).

 

If by "take this information" you mean you want to extract it to use in some other code or something, that would be by way of (entget) or VLA Properties.  You would need to step through the selection and get the information from each object separately.  But it's a wide-open question -- what do you want to do with the information, and in what format do you need it?  Do you need all  information about each object, or only some of it, such as Layers or insertion points or measured lengths of Dimensions or color overrides or ...?  Extracted things like those could be put into an AutoLisp list, or written out to an external text file, or put into Text or Mtext in the current drawing, or if numerical, processed with any kind of calculation, or....

Kent Cooper, AIA
0 Likes
Message 5 of 5

CADaSchtroumpf
Advisor
Advisor

You want know what you apply at your variable sel1?

A loop!

(setq sel1 (ssget))
(cond
  (sel1
    (repeat (setq n (sslength sel1))
      (setq dxf_ent (entget (ssname sel1 (setq n (1- n)))))
      (print dxf_ent); at this part use what you want.
    )
  )
)