Code Red > AutoLISP (Vanilla / Visual)
Simulate left mouse click
ribarm:
I have a point in variable pt...
How can I simulate that I left mouse clicked on that point (of course in ACAD) through ALISP ?
P.S. I want something that will select single sub object, but unfortunately (vl-cmdf "_.SELECT" "_SU" "_non" pt "") doesn't work...
GP:
Hi Marko,
with "" the object is deselected
ribarm:
--- Quote from: GP on December 25, 2017, 12:49:14 PM ---
Hi Marko,
with "" the object is deselected
--- End quote ---
Never mind Gian, I've solved my task differently... It was just ask for fun and to see if there is some possibility to achieve what I want... But now I don't mind...
T.Willey:
Going off memory, but if you want to select a sub-entity by a point, I think there is a function 'nentselp' with will allow you to do it.
ribarm:
--- Quote from: T.Willey on December 28, 2017, 06:46:52 PM ---Going off memory, but if you want to select a sub-entity by a point, I think there is a function 'nentselp' with will allow you to do it.
--- End quote ---
No, (nentselp) won't work for complex 3d solids... As I stated, I solved my task by checking numbers of selected entities through (vl-cmdf "_.SELECT" "_SU" "_CP" p1 p2 p3 p4 "") and then (setvar 'cmdecho 1), (vl-cmdf "_.SELECT") => (setq li (getvar 'lastprompt)), (setvar 'cmdecho 0)... Then I inspected "li" variable - lastprompt and do things according to number of sub objects selected (for ex. (vl-cmdf "_.ERASE"))... But then again it's a long story and I don't want to post my code...
Navigation
[0] Message Index
[#] Next page
Go to full version