@m.lharidon wrote:
....
Yes it work perfectly for this Lisp (CBPRM) but i tried to apply the "select base point" line to an other lisp (cm2p attached in my previous message.).
This is what i looked for. why this selection doesn't work in this lisp but perfectly works on yours.
....
It's the difference between single-object selection with (entsel) and multiple-object selection with (ssget). The CM2P command is set up for multiple objects [if you want -- you can stop at only one], and there is no 'e' variable [the single object in CBPRM] from which to extract that insertion point. IF you will always use it to select only one object, and IF that object will always be something with an (assoc 10) entry in its entity data [such as a Block's or Text/Mtext object's insertion point, or a Line's or Polyline's start point, or an Arc's or Circle's center point], you could try replacing this line:
(setq p (getpoint "\n Specify Base point of objects :"))
with [instead of the substitution in CBPRM using the 'e' entity name] this:
(setq p (cdr (assoc 10 (entget (ssname ss 0)))))
to get it from the first [and only] object in the selection set.
But you could also change the selection part to use (entsel) instead of (ssget), as in the other command.
Kent Cooper, AIA