Jump to content

Query on attribute.


Recommended Posts

Posted

Hi there,

 

I have several blocks which have an attribute called BlkNo. This attribute is used simply to give the block a number as the user inserts it. In the corner of each drawing is a piece of text that the user has to update to show the last used block number.

 

Is there a quick way I can do a check on the drawing to find the highest number used in the BlkNo attribute?

 

I've just done a data extraction which worked and gave me the answer I wanted but it's a bit of a long winded way of getting it.

 

Is there some sort of query I can run within autocad that gives an answer on the command line?

 

Cheers guys,

 

YP

Posted

If The No Is The Amount Of Blocks Inserted. Than In That Case You Can Select All The Specific Block With Filter Or Qselect Option & Get The Totla No Of Blocks Insrted In The Drawing.

Posted

Dipali,

 

No, I want to check what the highest number is that's been used in the BLKNO attribute.

 

Cheers,

 

YP

Posted

AFAIK, plain AutoCAD doesn't offer this facility. It is a relatively trivial thing to do in VBA (I have considered it several times) and probably LISP. Despite its usefullness to me I don't currently have time to investigate but somebody else may be along in a while with help. (providing you are not using LT)

Posted

It's OK, I think I've come up with a solution.

 

I've used data extraction but instead of sending it out to an xls file I've added a table to the drawing.

 

I've made the table really small and placed it near the text that needs to be kept up to date. I've also changed it's layer to defpoints so that it doesn't print.

 

Once the table is on, any time the drawing has been updated the user just has to select Tools/Data Links/Update Data Links and click on the table.

 

It's a good enough solution for me at the moment.

 

Cheers,

 

YP

Posted

we used the symbol table to give the "next available" number, then when you add a symbol to the drawing you can alter the chart and it is clear for everyone.

 

If only people would follow the rules is would have been a very workable solution....

Posted

The problem is, no matter how 'idiot proof' you make a design, nature invariably produces a "better" idiot. To paraphrase Jeff Goldblum in Jurassic Park: "Stupidity finds a way". Or lazyness, both are applicable.

Posted

Actually, I've just been testing this table I've added and it down't work. Problem is I'd have to create a table for every single drawing. I thought it was going to be something I could simply insert and it would check for the appropriate attributes. If you do that it still looks at the drawing you first created the table in.

 

I think I'm going round in circles here and have probably waisted a whole day on it.

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