Jump to content

Selecting Blocks Based on Attributes


paulwoody

Recommended Posts

Hi Guys,

 

Is there any way of selecting all blocks which have an attribute set to a particular value?

 

I'm sure this can be done with LISP but as yet I've not gotten around to learning the language.

 

Basically I have a block called Light Fitting with an Attribute called Type , I was hoping I could quick select all 'Light Fitting' blocks with a 'Type' Attribute of A.

 

Any ideas? I have tried searching the forums and Google but either I'm using the wrong search terms or nothing exists.

 

In the course of researching this matter I have come across the FILTER command however I am still trying to fathom out how to use that function, is FILTER suitable for my needs?

Link to comment
Share on other sites

I've never used filters as QSELECT does all I usually need. In this case I don't think it can. I can't think of an easy way of doing what you want although it can be done relatively easilly with LISP.

 

What do you intend to do with your objects once you have them selected? The answer to that MAY influence the best way to approach the problem.

Link to comment
Share on other sites

Hi Dave,

 

Some times I simply need to count the blocks so I can produce a schedule and other times I need to be able to see the spacing so I simply copy them from the drawing into a blank drawing for isolated viewing.

Link to comment
Share on other sites

Some times I simply need to count the blocks so I can produce a schedule and other times I need to be able to see the spacing so I simply copy them from the drawing into a blank drawing for isolated viewing.

 

Filter isn't your answer as it doesn't allow you to drill down to Value level of the Attribute. Here's an option which may get you started along the right track. As for counting, this will provide you with a suitable workaround.

 

Try the -ATTEDIT Command (this is the old Commandline driven attribute editing command). Here's the steps to be able to count how many there are (you may be able to script most of it):

Command: -attedit

Edit attributes one at a time? [Yes/No] : N

Performing global editing of attribute values.

Edit only attributes visible on screen? [Yes/No] : N (this depends on the visibility of your particular attributes)

Drawing must be regenerated afterwards.

Enter block name specification : YourBlockName

Enter attribute tag specification : YourAttributeTag

Enter attribute value specification : TheValueYouWantToFind

'SoMany' attributes selected.

Enter string to change: *Cancel*

 

At this point you can cancel the command as it has now provided you with the number of Attributed Blocks that have the Value you're counting. This command can do a lot more than the new ATTEDIT can - it's worth exploring and keeping in your toolbox... Just experiment a bit with it.

 

If you can see the Attribute Value in the Drawing, Another option for carrying out the Count is the Find command. This may be a little less controllable though as it would find any attribute with the Value 'A' irrespective of the Tag it resides under.

Link to comment
Share on other sites

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   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...