Jump to content
  • 0

Is it possible to select multiple extrudes by height?


chrispolo

Question

2 answers to this question

Recommended Posts

  • 0

You could make a worksheet of all the extrudes in your file and then select them one at a time from the worksheet. However, as far as I am aware, you cannot select multiple items from a worksheet which is what you really want.

 

I do not know any way to select multiple extrudes based on their heights apart from using a script. You may want to post this in the scripting area of these forums as I know some of the scripting folk will be watching there.

  • Like 1
Link to comment
  • 0

Unfortunately, @markdd is correct, you can't select multiple objects from a summarized database row in a worksheet. Would be a nice wish list request.

 

The following script will select all extrudes in a drawing that have the same extrude length as the first selected object on the active layer. It uses the extrude length, so even if they have been rotated or moved it will still select them. If you actually need a script to only select extrudes with the same "top" Z position, that will take a little more work.

 

Procedure SelectSameHeightExtrude;
{If the first selected object in the drawing is an extude}
{this script gets the height of that extrude and selects all}
{other extrudes in the drawing that have the same height.}

{January 4, 2019}
{© 2019, Coviana, Inc - Pat Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{Based on SelectSameLengthLines}
{February 13, 2012}
{© 2012, Coviana, Inc - Pat Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}



Var H1			:Handle;
	OLength		:Real;
	

Procedure DoIt(H2:Handle);

Begin
	If HLength(H2)=OLength then SetSelect(H2);
End;



Begin
	If GetType(FSActLayer)=24 then
		Begin
			OLength:=HLength(FSActLayer);
			ForEachObject(DoIt,((T=XTRD)));
		End
	Else AlrtDialog('First Selected Object Must Be An Extrude.');
End;

Run(SelectSameHeightExtrude);

Select EVERYTHING in the code box above and paste into a new blank Vectorscript edit window.

 

Test first on a backup copy or sample file. Very minimally tested, but since all it does is select damage is unlikely. Now warranty expressed or implied. User must determine suitability for their requirement. 😉

  • Like 2
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...