Jump to content

Global Attribute Editor & Extractor


Lee Mac

Recommended Posts

Hi Lee!!

Just needed your help as I need to automate incremental numbering of Tendons (P-T Cables)..... The Number is incorporated as a Attribute in a Standard Block... Whenever inserted it prompts the user to enter numbers... The User enters 1-2 i.e. to indicate 2 Nos. of Tendons... Thereafter user does not insert the Block for 3 to 5... again he needs to insert Block for Tendons 5-10 +1 to indicate a bunch or group of 5 Tendons + 1 Extra in case of failure... The series goes this way and the numbering is complete say upto 230.. (EXAMPLE); Worst thing is there is modification in the drawing and teh Tendon Count Changes... User needs to Renumbering the entire Drawing Sheet...

 

What I specifically want is number changes from 100 onwards... The Lisp Routine be so developed that on selection of Block containing attribute 100-102 +1 say suppose if selected and edited and replaced manually as 110-112 + 2 then the Numbers Following in that particular drawing be edited and modified automatically i.e. the Final count becoming 240 say for Example..

 

Help shall really be appreciated...

 

 

 

 

Following Rob's suggestions I have updated the first post to Version 2.3.

 

In this version:

 

  • The Get_Unique function (used for sorting attributes) has been upgraded, meaning a 40% increase in speed for this function.

  • In the Extractor, when selecting blocks from the drawing, their attributes will be displayed instead of just "ALL TAGS", making it easier to edit which to extract.

  • In the Extractor, then double-clicking on an entry to edit it, you can now also edit the block name.

  • In the Editor, you can now only select tags that belong to the block entered - making the functionality much more consistent. And the current value for the selected tag is shown in the 'New Value' field, so that it is quicker to change, if only a small edit is needed.

  • In the Editor, when selecting a block from the drawing all Attributes with their current values are listed, making it quicker than selecting/entering each one individually.

As always, your feedback is welcome, and any bug reports :)

 

Enjoy,

 

Lee

Link to comment
Share on other sites

Hi NHM,

 

Thanks for your post - although I am more than happy to help, your request isn't really part of this thread, and would be better suited to an independent thread.

 

But anyway, in the meantime, I can point you to this thread in which attributes/text have been incremented - it may give you some food for thought.

http://www.cadtutor.net/forum/showthread.php?t=44991

 

Lee

Link to comment
Share on other sites

Thanks for offering Help!! I was just unaware @ the particular thread to follow... just needed get connected to you hence followed you to this thread..

 

Sincere apologies for the same...

 

 

Hi NHM,

 

Thanks for your post - although I am more than happy to help, your request isn't really part of this thread, and would be better suited to an independent thread.

 

But anyway, in the meantime, I can point you to this thread in which attributes/text have been incremented - it may give you some food for thought.

http://www.cadtutor.net/forum/showthread.php?t=44991

 

Lee

Link to comment
Share on other sites

it is possible to have a Edit option on the tag eg: textstyles, hieght, width. I came up to this suggestion when i encountered of one of the block coming from the client, they want to add more text which is cannot accomodate on the box, so we have to adjust the size of text. for that we need to redifine the block and insert it manually/or other way use "attout' and 'attin' from express tools. Using macatt is not working.

 

One more problem we encountered, because we are processing more than 100+ drawings and its takes so long and sometimes we encountered error of my system(eg Hanging) we can give an options how many pages we could process.

Link to comment
Share on other sites

it is possible to have a Edit option on the tag eg: textstyles, hieght, width. I came up to this suggestion when i encountered of one of the block coming from the client, they want to add more text which is cannot accomodate on the box, so we have to adjust the size of text. for that we need to redifine the block and insert it manually/or other way use "attout' and 'attin' from express tools. Using macatt is not working.

 

The ability to change these characteristics of the attribute is not too difficult - the difficulty is in trying to fit it all in the DCL and still make it clear for the user.

 

One more problem we encountered, because we are processing more than 100+ drawings and its takes so long and sometimes we encountered error of my system(eg Hanging) we can give an options how many pages we could process.

 

It should be pretty quick - even for a large amount of drawings - but to reduce the amount to process, perhaps move a set number into a temporary folder and process them.

Link to comment
Share on other sites

  • 2 weeks later...
This program will allow the user to extract all attributes from multiple blocks in multiple drawings, and will write all data to an Excel spreadsheet.

 

The user is prompted to create a list of block names from which attributes will be extracted.

 

The user is then prompted to select a directory of drawing files to process, and also provided with the option to process sub-directories of the selected directory.

 

Results will then be written to an Excel Spreadsheet, to be saved as the user wishes.

 

Your feedback, comments and suggestions are welcome :)

 

Lee

 

Hi Lee,

Thank you for your program.

 

I would like to prefer you to extract all the attributes from all drawings in a folder to a Excel sheet as following:

1. The FIRST ROW lists only all TAG NAMES of an selected attribute block (When all drawings have the same attributed titleblock)

2. The FIRST COLUMN lists all FILENAMES of CAD file

3. Then from cell B2 will list all attribute texts of the selected attribute block.

4. The LAST COLUMN will be the Hyperlink of each CAD file.

You only add http://file:/// to the Drawing Directory + CAD filename:

(User only needs to click on this link to open this drawing)

 

Please see the attached file for more details. Thank you.

Cheers.

PP

Extract Attributes.zip

Link to comment
Share on other sites

Philippi,

 

I'm glad you like the program - however, I am not going to modify the program to suit the needs of one person - I would like to keep it as generic as possible, so that many users may benefit from it. :)

 

Thanks,

 

Lee

Link to comment
Share on other sites

Hi Lee,

It will be perfect to have an Excel Spreadsheet looks like as I suggested above.

When User has many thousands of drawings saving in one folder with the same Titleblock/Attributes for sheet A1 & A3. Using your program to extract Attributes, you will see so many duplicated texts of the directory/titleblock showing in the Excel sheet while the FIRST ROW showing the Tag names is enough.

Another thing is if using ONE ROW for each drawing, User can use Excel to sort out information of each attribute tag.

I think my requirement is for everyone to use your program and I know you can do it better. Thank you.

Attribute Extractor list.zip

Link to comment
Share on other sites

Philippi,

 

My program groups the attributes under a common block name, and groups all blocks under the drawing name. I believe this is more than sufficient sorting for the user to be able to still know which blocks have been imported from which drawing.

Link to comment
Share on other sites

Lee,

 

I was looking at your command and am wondering if it is possible if you could link the excel sheet that is created with the extractor to the editor. i.e. changes made in the extractor's excel output file could be used to update the block it was pulled from. I think honestally that change to your program would absolutley complete it and also suit the needs of many many draftsman and CAD managers alike, working in multiple drawings.

 

Maybe you might consider the challange,

 

Matt

Link to comment
Share on other sites

If Lee can upgrade the program to create an Excel sheet (saving under .cvs format as same as my sheet posted at #87) then another LISP can update all attribute values of drawings, based on this Excel sheet.

It works the same command ATTOUT and ATTIN of AutoCAD.

Cheers,

PP

Link to comment
Share on other sites

Lee,

 

I was looking at your command and am wondering if it is possible if you could link the excel sheet that is created with the extractor to the editor. i.e. changes made in the extractor's excel output file could be used to update the block it was pulled from. I think honestally that change to your program would absolutley complete it and also suit the needs of many many draftsman and CAD managers alike, working in multiple drawings.

 

Maybe you might consider the challange,

 

Matt

 

Hmmm... I think this could be achieved with another program - (certainly not real-time editing), but the problem I see is detecting the format of the Excel sheet, and knowing which entries would be the filename/block/tags, and values. And - how would the program know which blocks to update with which values?

 

 

If Lee can upgrade the program to create an Excel sheet (saving under .cvs format as same as my sheet posted at #87) then another LISP can update all attribute values of drawings, based on this Excel sheet.

It works the same command ATTOUT and ATTIN of AutoCAD.

Cheers,

PP

 

 

Phiphi, I have looked at your attachment - that is all good when extracting a single block - but it makes the assumption that all the blocks you are extracting will have the same tags... As I say, my program still groups the blocks together (no block duplicates), but keeps them separated into their respective drawings.

 

Lee

Link to comment
Share on other sites

Lee,

 

Real time editing is too risky from a CAD managers point of view so having a seperate program would be ideal. As to the format, could you use the excel format created with the extractor?

 

Matt

Link to comment
Share on other sites

Lee,

 

Real time editing is too risky from a CAD managers point of view so having a seperate program would be ideal. As to the format, could you use the excel format created with the extractor?

 

Matt

 

Well, as I said, the format that the extractor uses groups all the block information together for blocks with the same name, hence, when coming to read this information how would the program know which information went where... :geek:

Link to comment
Share on other sites

I have updated the first post to Version 2.5 (forgot to upload V2.4).

 

In this Version, there is a toggle to allow the user to choose whether to 'Write DWG Filenames'.

 

With the toggle set, blocks are grouped under their respective filename, so that users can see which DWG each block has been extracted from.

 

With the toggle not set, all blocks are grouped together in one list - this mode is ideal for creating Drawing Lists.

 

Lee

Link to comment
Share on other sites

Thank you for your updated program, Lee

For creating Drawing list, it requires to write the DWG filename in the same row of extracted attribute values but not the name of tiltleblock.

Cheers,

PP.

Link to comment
Share on other sites

Thank you for your updated program, Lee

For creating Drawing list, it requires to write the DWG filename in the same row of extracted attribute values but not the name of tiltleblock.

Cheers,

PP.

 

I write the block name to allow for the case that the user is extracting from multiple blocks; also, I was under the impression that the drawing information was contained within attributes of a titleblock, and was not the DWG filename :unsure:

Link to comment
Share on other sites

At fact, there is only one Drawing No. but there are many Drawing filenames with many Revisions. Ex:

DWG No. 123456-STR-0001 (this is shown in the tilleblock)

DWG filenames: 123456-STR-0001-Rev-A, 123456-STR-0001-Rev-B, 123456-STR-0001-Rev-C, 123456-STR-0001-Rev-D....(these are CAD filenames only but NOT shown in any drawing's titlebolck.

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