selection feature(s)
Moderator: andrew
selection feature(s)
What would be really useful is a method to select entities by type, rather than by location or layer.
It could have a user interface like the snap command with buttons for the entity type to select, or like the line command with a drop-down box.
This would enable one to quickly select e.g. all texts in a drawing for subsequent attribute modification. Now one has to select each text individually if the texts are scattered over the drawing and layers...
It could have a user interface like the snap command with buttons for the entity type to select, or like the line command with a drop-down box.
This would enable one to quickly select e.g. all texts in a drawing for subsequent attribute modification. Now one has to select each text individually if the texts are scattered over the drawing and layers...
Re: selection feature(s)
t could have a user interface ?
Re: selection feature(s)
I agree although this post is over 2 years old its still very much valid - often I am in the same situation.LeoP wrote:What would be really useful is a method to select entities by type, rather than by location or layer.
It could have a user interface like the snap command with buttons for the entity type to select, or like the line command with a drop-down box.
This would enable one to quickly select e.g. all texts in a drawing for subsequent attribute modification. Now one has to select each text individually if the texts are scattered over the drawing and layers...
I have added a feature request for this:
http://www.ribbonsoft.com/bugtracker/in ... ask_id=630
One 'workaround' (which you may have found by now ) which Andrew gave me is this:
1. Select everything first (Select All TA).
2. Go to > Property Editor > click on Selection and from the 'drop' down menu select the entity type e.g. Text.
3. Property Editor > layer > then click on the + button (Move Selection to a New Layer), now assign a new layer.
4. Go to new assigned layer and from there edit/modify your entities (in this case text).
As I say you probably know this by now - but its still a useful workaround for now for other users.
Re: selection feature(s)
Thread start is long ago, but perhaps someone finds it useful: I implemented a widget to do this. See http://www.ribbonsoft.com/bugtracker/in ... ask_id=663 to download a small zip file. Any comment is welcome!
Re: selection feature(s)
Hi Stefansmf wrote:Thread start is long ago, but perhaps someone finds it useful: I implemented a widget to do this. See http://www.ribbonsoft.com/bugtracker/in ... ask_id=663 to download a small zip file. Any comment is welcome!
I`ve downloaded your widget to try out, but I can`t get it to run - I`m probably doing something wrong here , please could you outline the steps clearly to install and run. So this `daft' old fella can try it out on Win 7-64.
Re: selection feature(s)
Thanks for the try
As far as I know, you only have to copy the files into the correct directory - no special installation is required. I have:
/qcad/ - the qcad directory
/qcad/scripts/ - the qcad scripts directory
/qcad/scripts/MyTools/ - a new directory created below "scripts"
/qcad/scripts/MyTools/SelectWidget/ - a new directory created below "MyTools" named "SelectWidget" (this directory name must not be changed)
The three files reside inside ..../SelectWidget/ and should result in a new widget near the original PropertyEditor. If it does not appear, in the "view" menu there should be an entry "Select Widget" (unfortunately unordered and without suitable icon).
I hope this helps.
As far as I know, you only have to copy the files into the correct directory - no special installation is required. I have:
/qcad/ - the qcad directory
/qcad/scripts/ - the qcad scripts directory
/qcad/scripts/MyTools/ - a new directory created below "scripts"
/qcad/scripts/MyTools/SelectWidget/ - a new directory created below "MyTools" named "SelectWidget" (this directory name must not be changed)
The three files reside inside ..../SelectWidget/ and should result in a new widget near the original PropertyEditor. If it does not appear, in the "view" menu there should be an entry "Select Widget" (unfortunately unordered and without suitable icon).
I hope this helps.
Re: selection feature(s)
Right - OK, I did have the files set up properly, but I needed to set some permissions!
I can view this widget now but when I select e.g a line - both the Property Editor and the 'SelectWidget' show this but I can only use the property Editor.
I cannot independently use your widget, it doesn`t allow me to select or use any of the input fields.
The only difference I see with your widget is the addition of the radial buttons 'reduction to - by'.
Could these buttons be added directly to the property Editor instead of having another widget?
[Edit: I think your idea is great Stefan and maybe Andrew would consider introducing your addition to the current Property Editor]
I can view this widget now but when I select e.g a line - both the Property Editor and the 'SelectWidget' show this but I can only use the property Editor.
I cannot independently use your widget, it doesn`t allow me to select or use any of the input fields.
The only difference I see with your widget is the addition of the radial buttons 'reduction to - by'.
Could these buttons be added directly to the property Editor instead of having another widget?
[Edit: I think your idea is great Stefan and maybe Andrew would consider introducing your addition to the current Property Editor]
Re: selection feature(s)
Thank you for trying it and for your feedback!
If you select only one entity, all fields in the Selection Widget should be disabled. If you select multiple entities, all fields for diverse properties should be enabled. If those are changed, the selection should be updated. For example 1) selecting a red and a yellow line, changing the color field in Select Widget should result in a changed selection, or 2) selecting a line and a text, changing the type field in Select Widget, should deselect either the line or the text.
Indeed most of the code is identical to the Property Editor. If there would be an option "reduce selection instead of modifying selected entities" a merge of Property Editor and Select Widget (most likely together with some fixes in my code) should be easy.
I would be pleased to receive further feedback!
If you select only one entity, all fields in the Selection Widget should be disabled. If you select multiple entities, all fields for diverse properties should be enabled. If those are changed, the selection should be updated. For example 1) selecting a red and a yellow line, changing the color field in Select Widget should result in a changed selection, or 2) selecting a line and a text, changing the type field in Select Widget, should deselect either the line or the text.
Indeed most of the code is identical to the Property Editor. If there would be an option "reduce selection instead of modifying selected entities" a merge of Property Editor and Select Widget (most likely together with some fixes in my code) should be easy.
I would be pleased to receive further feedback!
Last edited by smf on Sat Aug 04, 2012 7:23 pm, edited 1 time in total.
Re: selection feature(s)
Very good Stefan, I like it - now I`ve got my head around it. Very useful indeed
I`ll test it some more and give you some more feedback over the next day or so, I`ll test it on some bigger/complex files that I have!
I`ll test it some more and give you some more feedback over the next day or so, I`ll test it on some bigger/complex files that I have!
Re: selection feature(s)
Unfortunately, at the moment my script is "a bit" slow for large selections. Checking the "closed"-property of polylines with appriate selection update took ~100 seconds for ~2000 selected entities. Probably my usage of the "eval"-statement slows things down, perhaps a callback-method instead of the eval-string would be faster. I'll try this out in a quiet moment.
I don't even know if this functionallity is best as widget (consumes valuable space) or as dialog (only useful if not used too often). What do you think?
I don't even know if this functionallity is best as widget (consumes valuable space) or as dialog (only useful if not used too often). What do you think?
Re: selection feature(s)
The "eval" function is not the slow down master. I changed the eval to a callback, but the consumed time is nearly equal. For beautyness reasons, I will keep the callback variant.
Inside the following code snippet:
I suspect the doc.queryEntity(id) taking reasonable time (using only the first entity every time the loop is executed in the twinkling of an eye).
So: is there a better way to get all selected entities than getting a list of ids and getting one after one (I don't need the id elsewhere)?
Inside the following code snippet:
Code: Select all
var entityIds = doc.querySelectedEntities();
for (var es = 0; es < entityIds.length; ++es) {
var id = entityIds[es];
var e = doc.queryEntity(id);
/* ... */
}
So: is there a better way to get all selected entities than getting a list of ids and getting one after one (I don't need the id elsewhere)?
Re: selection feature(s)
I was wrong. It was calling di.deselectEntity too often instead of calling di.delesectEntites once. Now it takes less than a second instead of ~100 seconds to process about 2000 entities. I will upload a new package to the bugtracker.smf wrote: Inside the following code snippet:I suspect the doc.queryEntity(id) taking reasonable time (using only the first entity every time the loop is executed in the twinkling of an eye).Code: Select all
var entityIds = doc.querySelectedEntities(); for (var es = 0; es < entityIds.length; ++es) { var id = entityIds[es]; var e = doc.queryEntity(id); /* ... */ }
Re: selection feature(s)
Ok I will download it in a while and check it out.
Re: selection feature(s)
Your latest package (zip 4) is working better, I`ve tested this on quite a complex drawing and so far so good, yes much faster performance now.
All you need to do now is design a little icon image for it
I think that your effort here is commendable and this 'extra' much needed selection option is so very useful, I for one will use it I don`think it takes up too much space - for me its only a little button that I can click and bring up the little dialog window when I need to.smf wrote:I don't even know if this functionallity is best as widget (consumes valuable space) or as dialog (only useful if not used too often). What do you think?
All you need to do now is design a little icon image for it