Jump to content
  • 1

Filter selection tool


MarcelP102

Question

Right now when you select a lot of different objects there is no way to filter the selected objects. The info object palette only shows the total number of selected objects. Revit has a built in selection filter option, but lacks some functionality. One of the best selection filter plugin for Revit is OneFilter. FilterMore is a bit more basic but also nice. Note the requested tool is not similar to the magic wand tool. I'm asking for a tool that can filter the selection after you selected a bunch of objects.

 

It would be awesome if Vectorworks could get a similar selection filter as mentioned examples:
original_99a7256d-8880-4193-80d1-eb059ae8ceb1_.png.cd07e18c176c3afab9bde2eb72e38417.png

 

 

Must have functionalities:

-          Shows list of all selected objects. First grouped by main category (wall/roof/door etc.) than by objecttype/style and last by item (Like FilterMore)

-          Selection mark button to add or de-select item from the list

-          Button to reverse checked items / select all / select none

 

Nice to have functionalities:

-          Filter selection by class/layer

-          Filter selection by parameters

-          Save filter rules for later use

 

Maybe this can already be realized with a plugin/vectorscript? I'm more than happy to donate some money to the person that comes up with this tool.

 

Thanks in advance.

Edited by MarcelP102
  • Like 3
Link to comment

20 answers to this question

Recommended Posts

  • 0

Wow this is awesome! Thank you so much! This is exactly like I hoped it would be! I understand the difficulty that filtering additional level brings. Perhaps if I'm more comfortable with scripting I can enhance the script with code to get symbol names/wall types etc. I will donate some beers for your hard work, keep an eye on your paypal wallet 😉 Thanks again!

Link to comment
  • 0

@Andy Broomell Thank you for running the test.  If you could please do an additional favor for me, below is script that will generate a character map.  On Windows, Vectorworks uses character 45 as the nesting hyphen, so I replace it with character 173 which has the same appearance but doesn't create the nesting behavior.  If you could please run the script and let me know what an equivalent character is, I'll add a line to detect the platform and replace accordingly.

 

image.png.d916aae63d5950f483a71d65f20b8fba.png

 

PROCEDURE MapCharacters;

{*	Builds a worksheet mapping characters with both Chr() and UniChr()
	Developed by: Jesse Cogswell
	Date: 6/2/2022
*}

CONST

	kNumChrs = 255;
	
VAR

	uniChrs,chrs:ARRAY[1..kNumChrs] OF CHAR;
	workHd:HANDLE;
	
PROCEDURE BuildArrays(VAR uniArr, arr:ARRAY[1..kNumChrs] OF CHAR);

	VAR
	
		i:INTEGER;
		
	BEGIN
		FOR i:=1 TO kNumChrs DO
			BEGIN
				uniArr[i]:=UniChr(i);
				arr[i]:=Chr(i);
			END;
	END;

FUNCTION BuildWorksheet(uniArr,arr:ARRAY[1..kNumChrs] OF CHAR) : HANDLE;

	VAR
	
		h:HANDLE;
		i:INTEGER;

	BEGIN
		h:=GetObject('Character Map Worksheet');
		IF(h<>NIL) THEN DelObject(h);
		
		h:=CreateWS('Character Map Worksheet',kNumChrs+1,3);
		
		SetWSCellFormula(h,1,1,1,1,'Number');
		SetWSCellFormula(h,1,2,1,2,'UniChr');
		SetWSCellFormula(h,1,3,1,3,'Chr');
		
		SetWSCellAlignment(h,1,1,kNumChrs+1,3,2);
		SetWSCellTextFormat(h,1,1,1,3,GetFontID('Arial'),10,1);
		SetWSCellTextFormat(h,2,1,kNumChrs+1,3,GetFontID('Arial'),18,0);
		
		FOR i:=1 TO kNumChrs DO
			BEGIN
				SetWSCellFormula(h,i+1,1,i+1,1,Num2Str(0,i));
				SetWSCellFormula(h,i+1,2,i+1,2,uniArr[i]);
				SetWSCellFormula(h,i+1,3,i+1,3,arr[i]);
			END;
		
		BuildWorksheet:=h;
	END;

BEGIN
	BuildArrays(uniChrs,chrs);
	
	workHd:=BuildWorksheet(uniChrs,chrs);
	ShowWS(workHd,TRUE);
END;

Run(MapCharacters);

 

Link to comment
  • 0

Thanks for the link @Pat Stanford.  I think I got this solved.  Try running the script:

Message(UniChr(8211));

If it returns the n-dash, that's what I'll put in the script.

 

Also, @MarcelP102 I looked into what it would take to do sub-types and think I have it pretty well worked out.  It wouldn't add to the nesting behavior (since most objects don't have a sub-type or style), I'll just add a column to the list browser with it.

 

I'm also going to add a fourth Show option for architectural wall objects (doors, windows, wall features) since they have very different selection behavior.  This option will show all architectural objects visible and will not be sortable by class and layer, jut object type (but will have columns for them in the browser).

 

I'll implement the changes and reupload tonight or early tomorrow.

Link to comment
  • 0

I have revised the Filter Selection plug-in.  For some reason, I can't edit the above post to change the attachment to make sure no one downloads the out of date version, but the newer one is attached to this post.  Changes are listed below:

  1. Fixed bug with hyphens on Mac operating systems.  Hyphens will now be replaced with n-dash unicode characters for both Mac and Windows operating systems.
  2. Added a count of all objects in drawing next to all the Show radio buttons to help gauge how long it will take populate.
  3. Added a Sub-Type column to the list browser for all show and sort modes.  This column will be populated with symbol definition names, wall styles, and plug-in styles.
  4. Added a fourth show mode, Show - Objects in Walls.  Because objects embedded in walls follow different selection rules than other objects, this button will restrict the List Browser to objects currently selectable at the time of running the tool.  If no wall embedded objects are selectable when running the tool, the radio button will be disabled.  When switching to this mode, the items currently selected in the list browser will be lost.

image.png.c81f1e53f0f517a7a9f214f030dc1f5a.png

 

 

Filter Selection.vsm

Edited by Jesse Cogswell
  • Like 4
Link to comment
  • 0

@rebu1985 That's an odd message.  Not the error that it's showing, but odd in that the line number doesn't make any sense and makes it hard to tell which part of the script is fouling up.  The script is 1700 lines of code and uses a dozen or so different arrays to store and sort different pieces of data, so it's tricky to figure out which one is not working.

 

What would help me a lot is to have more information.  What exactly were you doing when the message popped up?  Did it pop up immediately after running or was it after using the GUI?  Does this happen with every drawing?  If not, could you send me a copy of the drawing that it does happen on so I can see what's causing it?

 

Also, any information about which version of Vectorworks you are running (year, workspace) would also be helpful.

Edited by Jesse Cogswell
Link to comment
  • 0

Hi Jesse,
I have attached some images.

The first and second images show the script working properly, all the elements are located in a one layer and the script works.

The third and fourth images show the script without working. I have copied all the elements to others layers and it doesnt work.
I am using Vectoworks 2020 and i am using a personal workspace but i have the same problem when i am working on the architect workspace. When i am working on personal drawings with a lot of information it doesnt work either.

 

Captura1.1.JPG

Captura1.2.JPG

Captura1.3.JPG

Captura1.4.JPG

Link to comment
  • 0

Can you send me the Vectorworks file where it doesn't work?  I need to know which array is not populating correctly to fix this bug.  What exactly changed between the two images of it working and the two images of it not working?  Moving the objects to a different layer?  By workspace, I meant which VW product are you using?  Fundamentals, Spotlight, Architect, Landmark, or Designer?

 

When it fails, is your active layer a Design Layer or Sheet Layer?  Are you in any kind of group/symbol/viewport edit window?

Edited by Jesse Cogswell
Link to comment
  • 0

@rebu1985 I have been unable to recreate your issue, even after building a duplicate scenario as you have in your images above.  Please answer the following questions, and be as clear and specific as you can be.  The more information you provide, the faster I can get this bug fixed.

  1. Do you get the error when you run the menu command or after interacting with the dialog box?
  2. If it happens after interacting with the dialog, what specific actions did you do between the dialog box popping up and the error message?
  3. In the four images above, what specifically changed between the first two images and the second two images?
  4. In the second two images, what is your active layer?  Are there objects on that layer?  I can see that you have three design layers but that all of the objects are on Design Layer-1 in the images where the script is working.
  5. Can you confirm that you are using the "most current" version of this tool?  It would be the one found in the June 3rd post above which DOES NOT have a screen shot image.

I did a lot of testing on this plug-in to try to eliminate the chances of these types of errors, and I have folded the tool into my general workflow (it's completely replaced Custom Selection for me, as I find it much easier to use compared to the reworked command in VW2022) and have not seen this error.  @MarcelP102 or any other users, have you run into any errors or issues with the tool?

 

MODERATORS: would it be possible to remove the attachments to my messages that contain earlier versions of the tool?  I used to be able to edit my posts to swap the attached script with the most current version, but it seems that I am no longer able to edit any of my posts that have an attachment.

Link to comment
  • 0

@Jesse CogswellIt is possible for a moderator to edit your posts. But I just usually post the newest version and tell everyone to read to the bottom and use the most current version.

 

But if there is something you specifically want removed DM me and I will help.

 

I think there is now a 1 hour limit on editing posts as one of the new spam techniques is to post and then come back a day or so later and add in spam links.

Link to comment
  • 0

@Jesse Cogswell Somehow I got the same error as @rebu1985. I could swear it was working before.. really weird. Also sometimes I got the "No objects able to be selected' error, but there are selectable items.

 

EDIT: After a restart everything works as expected till I try to use it with a 'broken' project. After that I got the errors till I restart. I can't find what inside that project makes it break.

 

EDIT 2: I managed to fix the broken project by deleting all the layers and remake them. Copied over some objects from the old file. Everything working so far. It's a project started some versions ago. All other projects work fine

Edited by MarcelP102
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...