TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: V@no on April 30, 2024, 07:44:42 PM
-
Is there a way prompt user to select an entity and at the same time accept a number as input?
Thank you.
-
Do you mean select 5 objects but using ssget filters ? Using repeat may be the way to go. And look at Lee-Mac ssget functions, in particular :E
-
SSGET might not be what I'm looking for, because it returns selected entity instead of prompt user (I need prompt user to select 2 entities individually, and keep first entity selected, while picking second one)
-
My current hack is to include numbers in INITGET:
(DEFUN c:test
(/ commands i input
)
i -1
)
)
(SETQ input
(ENTSEL "\nSelect object or enter a number 0-100: ")) )
)
It works for my needs, but it's just an ugly hack...
-
Why not for 2 entities use entsel can have messages etc just do twice.
(setq ent1 (car (entsel "\Please pick object 1 ")))
(setq ent2 (car (entsel "\Please pick object 2 ")))
You can use (ssget pt) which selects a single item (ssname ss 0) useful if you want to show a drag line.
-
Why not for 2 entities use entsel can have messages etc just do twice.
That's exactly what I'm using, except entsel doesn't allow arbitrary input (https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-9ED8841B-5C1D-4B3F-9F3B-84A4408A6BBF), hence is the hack above.
You can use (ssget pt) which selects a single item (ssname ss 0) useful if you want to show a drag line.
and pt is a set of coordinates? I think you lost me on this one.