PDA

View Full Version : Routine / Program to update Attribute information via Excel


angeles.rene
2006-11-15, 01:16 PM
Hi!
Do you know of a way to import an extracted attribute table?

I have added data on the extracted attribute table, intending to import it back to update globally all the blocks' attributes of a dwg. The other option is to manually input the additional data using attedit command...

Thank you,
Rene

Mike.Perry
2006-11-16, 07:03 AM
Do you know of a way to import an extracted attribute table?

I have added data on the extracted attribute table, intending to import it back to update globally all the blocks' attributes of a dwg. The other option is to manually input the additional data using attedit command...Hi

Does the information presented above, not achieve what you are after OR am I totally missing what it is you are asking ( most likely ).

If the information presented above, does not fulfil your requirements, could you please take the time to expand further on what it is you are after achieving.

Have a good one, Mike

angeles.rene
2006-11-16, 09:02 AM
Hi Mike,
Thanks for the reply. As I see it, your solution refers to manipulating the attribute table settings prior to export or, extraction. Perhaps I misunderstand. To expand further, I want to NOT use ATTEDIT but instead, to globally and automatically add missing attributes to all blocks in the dwg. Say, there are four attributes in a block and one is not filled in. I could fill the missing attribute by using ATTEDIT and copy-pasting the attribute data from an excel file (in my case, I have 200+ drawings having a total of 12,000 blocks. Each block has one missing attribute, so using ATTEDIT, though effective, would be time-consuming).

Currently, I have extracted (by block selection) the DWG's block attributes to an excel file and have saved it to the filename 155.xls. I have edited 155.xls by adding the missing attribute values copy-pasted from an excel source file called "pcms-id.xls. I'd like to believe that 155.xls would be now ready to be imported back to ACAD with the intention of globally and automatically updating (or filling-in the missing attributes value of) all blocks. I then imagine myself using ATTEDIT randomly to check whether the changes took place. I wouldn't worry about accuracy because that is insured by the excel source file pcms-id.xls. (As you may notice, I use PCMS in my work and this exercise is my attempt to automate what in PCMS would be a long process.)

I was thinking, if ACAD allows attribute extraction to an excel file (which represents a list of block and their attributes), maybe there is a way to "intract" (as opposed to "extract") or import that excel file back to ACAD so that the changes made to it are "absorbed" by ACAD, thus, updating all the listed blocks and their attributes at one time.

Thanks again for your time and for all the useful knowledge you freely impart on us mortals.

Regards,
Rene

Mike.Perry
2006-11-16, 02:27 PM
Hi Rene

Ok! now I understand what you are after achieving.

Please select the API you would like to use to write an Application / Routine to achieve your requirements. I will then *split* this thread into its own logical thread, then *move* it to the Programming (http://forums.augi.com/forumdisplay.php?f=88) forum of your choice.

:beer: Mike

angeles.rene
2006-11-27, 12:11 PM
Hi Mike,
I would prefer the API to be Windows based but I am not a programmer so I would just imagine the end result for you. I would like to have the "import" program work as a tool in ACAD. A wizard would be very good for that would simplify user-to-program interaction. Excel would still be my choice of import data source. I'm new at AUGI and I don't know what I'm expected to do when you finally get the software done. Please clarify what you may want me to do next.
Many thanks,
Rene

Opie
2006-11-27, 03:16 PM
Hi Mike,
I would prefer the API to be Windows based but I am not a programmer so I would just imagine the end result for you. I would like to have the "import" program work as a tool in ACAD. A wizard would be very good for that would simplify user-to-program interaction. Excel would still be my choice of import data source. I'm new at AUGI and I don't know what I'm expected to do when you finally get the software done. Please clarify what you may want me to do next.
Many thanks,
Rene
Rene,

Mike was asking you to decide which programming language you are interested in for this solution (VBA, AutoLISP, ARX, or Dot Net API). Once you make that decision, this thread would be split with your request being moved to the Programming Forum you decided.

It'll probably be unlikely that he will respond quickly as he is at Autodesk University this week.

HTH

angeles.rene
2006-11-27, 05:39 PM
Thanks guys. I would prefer AutoLISP.
Regards,
Rene

Mike.Perry
2006-12-06, 05:58 AM
Hi Rene

Done!

New thread created ( split ) from thread "Editing attribute extraction table settings, use a hidden command" and *moved* from the AutoCAD Tips & Tricks (http://forums.augi.com/forumdisplay.php?f=180) forum to this one...

Thanks, Mike

Forum Manager

abdulhuck
2006-12-06, 07:49 AM
Hi Rene,

The Venurable old "Attout" and "Attin" commands are still working in AutoCAD 2005. Thanks to Autodesk for not discontinuing these commands. With "attout", you can select the blocks and write the data to a text file, then you can edit the attribute values in the text file, when you have finished, import the text file back to the drawing with "Attin" command. You can open the text file in Excel also, but you should save your changes in text format only, not in Excel format. Only update the data you required to, if you update the handles by mistake, it may not work.

Regards,

Abdul Huck

Mike.Perry
2006-12-06, 08:04 AM
The Venurable old "Attout" and "Attin" commands are still working in AutoCAD 2005. Thanks to Autodesk for not discontinuing these commands.

<SNIP>Hi

Only a possible option if you have Express Tools available, seeing as AttOut and AttIn are Express Tools commands.

Have a good one, Mike

abdulhuck
2006-12-06, 09:09 AM
Hi

Only a possible option if you have Express Tools available, seeing as AttOut and AttIn are Express Tools commands.

Have a good one, Mike
Hi Mike,

:) I believe that this is an AutoCAD built-in command which was there before the introduction of Express Tools. I unloaded express tools, closed and restarted AutoCAD 2005 without Express tools loaded, and I am still able to use these two commands. Please correct me if I am wrong.

Regards,

Abdul Huck

Mike.Perry
2006-12-06, 09:27 AM
:) I believe that this is an AutoCAD built-in command which was there before the introduction of Express Tools. I unloaded express tools, closed and restarted AutoCAD 2005 without Express tools loaded, and I am still able to use these two commands. Please correct me if I am wrong.Hi

Sorry, I disagree.

As far as I am aware, AttOut and AttIn have always been Express Tools commands...

ID: TS32056 - Express Tools ATTOUT and ATTIN (http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=2870263&linkID=2475323)

The below two statements are true for AutoCAD 2005 and 2007...

* Look at the AutoCAD Online Help File [F1], you will find no mention of AttOut or AttIn.

* You will find reference to those two commands in the Express Tools Online Help File.

Why do those two commands work for you in AutoCAD 2005 when Express Tools are not loaded ?

My guess, you must still be somehow loading the two LISP routines that make those two commands available...

attout.lsp and attin.lsp

Have a good one, Mike

kpblc2000
2006-12-06, 09:28 AM
Try to erase folder "c:\progam files\autocad 2005\express" and try to run these commands again (in new AutoCAD session). Does them works?

abdulhuck
2006-12-06, 11:36 AM
Hi

Sorry, I disagree.

As far as I am aware, AttOut and AttIn have always been Express Tools commands...
....
My guess, you must still be somehow loading the two LISP routines that make those two commands available...

attout.lsp and attin.lsp

Have a good one, Mike
Yes Mike, you are right. I have been using this command from long back, but never had bothered to know the source. For your information, it is only one file, attout.lsp contains both the commands. Also, in my AutoCAD, though the express tools menu is unloaded, the express tools utilities are getting loaded some how, that's why I reached in a wrong conclusion. Thanks for the information. :)

Regards,

Abdul Huck

angeles.rene
2007-05-27, 11:32 AM
Hi Rene,

The Venurable old "Attout" and "Attin" commands are still working in AutoCAD 2005. Thanks to Autodesk for not discontinuing these commands. With "attout", you can select the blocks and write the data to a text file, then you can edit the attribute values in the text file, when you have finished, import the text file back to the drawing with "Attin" command. You can open the text file in Excel also, but you should save your changes in text format only, not in Excel format. Only update the data you required to, if you update the handles by mistake, it may not work.

Regards,

Abdul Huck


Hi,
Please accept my apologies for being so late to thank you for this thread. The two programs helped me solve my problem. One thing concerns me though. PCMS, the software that eventually used the edited attribute data, does not seem to "recognise" the data I fed it but still managed to process it to give me the result I wanted. A few PCMS commands are greyed out when I tried to used them on the new edited dataset. I will be looking at that problem more closely but you know how it works when one's trying to beat a deadline. Some stuff gets sweeped under.

Thank again, and to Mike more heavenly powers be upon thee.

Regards,
Rene

kozmosovia
2007-05-28, 04:42 AM
Try BOMSuite-ATT from http://www.atablex.com,
The attribute can be extracted into a Table and then to Excel,
You can have the attributes changed in AutoCAD according with what changed in Excel.

abdulhuck
2007-05-29, 03:46 PM
Hi,
...PCMS, the software that eventually used the edited attribute data, does not seem to "recognise" the data I fed it but still managed to process it to give me the result I wanted. A few PCMS commands are greyed out...
Sorry Rene, I didn't get what is PCMS stands for. But the Attout and Attin writes simple text files, which can be opened in Excel and manipulated. After that, you have to save it back to text format only. The additional information in this text file is only the Handle of the entity (block), for reference.

Regards,
AH

r424andy
2007-06-07, 10:20 PM
I just stumbled across this post. I am also currently workin on a similar situation. I am currently useing 2008, and unforunatly the new data extraction does not inculde block handles that would allow for attin. That and the old attout does not allow for visablity states of dynamic blocks. arrrrrgggg. plus that inch (") as text is still messing me up. Looks like I have some more research to do