Hi
How can I get the id of a point entity when I click on it with the mouse and / or when I go over it with the mouse pointer
How to get the id of an entity with a clik and / or with the pointer overlap
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Full Member
- Posts: 81
- Joined: Fri Apr 17, 2015 6:40 am
- Location: http://creativitainformaticart.altervista.org
Re: How to get the id of an entity with a clik and / or with the pointer overlap
If you have the entity, you can use:
If you don't have the entity, you can get the one closest to the mouse cursor with:
Where event is an RInputEvent (mouse move event or mouse click event).
Defined in:
Code: Select all
var id = entity->getId();
Code: Select all
this.getEntityId(event, false, true);
Defined in:
Code: Select all
EAction.prototype.getEntityId = function(event, preview, selectable)
event RInputEvent
preview for previewing purposes
selectable Only return selectable (editable) entities
-
- Full Member
- Posts: 81
- Joined: Fri Apr 17, 2015 6:40 am
- Location: http://creativitainformaticart.altervista.org
-
- Full Member
- Posts: 81
- Joined: Fri Apr 17, 2015 6:40 am
- Location: http://creativitainformaticart.altervista.org
Re: How to get the id of an entity with a clik and / or with the pointer overlap
I succeeded by also taking cues from Cross.js