Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ATTIN/ATTOUT with dynamic blocks

12 REPLIES 12
Reply
Message 1 of 13
kingmi53
2301 Views, 12 Replies

ATTIN/ATTOUT with dynamic blocks

I have a routine using ATTOUT which exports data from dynamic block atributes via a .txt file to an Excel spreadsheet which is then updated and returned  to the drawing via ATTIN.  However, if any dynamic block is altered, say by changing a visiblity state, the ATTIN asks for the altered blocks to be individually selected.  This is very time consuming if there are 300 blocks on the drawing that have changed!

 

Is there a lsp routine out there that solves this?  I assume it's to do with the block name being a *U.... and not the block name created when the block was formed.

 

Thanks in advance.

12 REPLIES 12
Message 2 of 13
M_Hensley
in reply to: kingmi53

For dynamic blocks the block name is pretty useless. You need to use vlisp to get the dynamic block's "effectivename".

How are you currently selecting the blocks? Can you upload a drawing with some sample blocks?

Message 3 of 13
kingmi53
in reply to: M_Hensley

Blocks are selected via “attout” then a window over the entire drawing.  Once or twice I’ve wanted only a small section but it occasionally throws up an error.

 

Attached is a drawing showing a couple of the blocks we use.

 

In case it’s not obvious we’re on 2013

Message 4 of 13
mayank12101995
in reply to: kingmi53

sir,
i am a automobile engineer,i am confused  what autocad software i should expertise in begining..Autocad or Autocad Alias 
please respind to me ,,and i don't have a Graphic card in my PC..

Message 5 of 13
M_Hensley
in reply to: kingmi53

Have you tried the command DATAEXTRACTION instead of attout? It will give you the real block name plus a whole lot of other stuff not available to attout. It does take a little trial and error to get the output you want.

Message 6 of 13
kingmi53
in reply to: M_Hensley

We've not tried it as a solution to this problem because we have our data sheets already set up and there is an automatic process to take the attout to the txt file and then in to an excel sheet.  This would all need changing and if that's the case we have an option to use a .NET solution.  If the blocks are not updated between ATTIN/ATTOUT the process works ok so we hoped there would have been a simple and quick fix.  Perhaps the .NET solution would be the easiest.

Message 7 of 13
braudpat
in reply to: kingmi53

 

Hello from France

 

Welcome to the Autodesk/AutoCAD Forums !

 

For ATTIN / ATTOUT with Dynamic Blocks, please use this update routine from a French Developper !

http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/ATTIN-ATTOUT-with-dynamic-blocks/m-p/...

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 8 of 13
kingmi53
in reply to: braudpat

Thank you for the lisp routine.

 

Unfortunately I get the following error whenever I do the ATTIN.  I'm assuming it's loaded correctly.

 

Command: ATTOUT
Select objects: Specify opposite corner: 1104 found
Select objects:
Output file: "C:\Users\320879\Desktop\TS-5 MK test french.txt" created.
Command: ATTIN
Reading the input file... Done.
bad DXF group: (8)
0 Block inserts modified.

Regards

Mike

Message 9 of 13
braudpat
in reply to: kingmi53

 

Hello

 

Please is it possible to get a copy of your Dynamic Block ?

 

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 10 of 13
kingmi53
in reply to: braudpat

Blocks attached

Message 11 of 13
braudpat
in reply to: kingmi53

 

Hello

 

I have re-tested this "beautiful" routine on my French ACAD 2014 x64 and it's OK with your DWG (a little bit updated) !

 

Please don't use any SPECIAL char in your attribute tags !! ... Please remove the POINT from the 3 attribute Tags ...

 

You will find your DWG with the 3 new attributes tags and 2 attributes which has been updated (New added Text = "_Patrice") with "Notepad.exe" from the ".txt" file (coming from ATTOUT)

and the ATTIN command is running OK and has updated the 2 concerned attributes on the 2 blocks ...

 

I hope it can help you !?

 

And (if possible) don't use any special chars into your block names !?

 

 

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 12 of 13
kingmi53
in reply to: braudpat

I have tested the routine on the updated blocks and still have an error.  Since the exported txt file is then imported in to an xlsm it may be the error is occuring there.  We are also looking at a .net solution which, in the long run, may be a better solution.

Thanks for your help.

Mike

Message 13 of 13
braudpat
in reply to: kingmi53

 

Hello

 

Maybe the problem is somewhere !?

Maybe I don't check everything correctly in your DWG : name of the attributes, name of the blocks - No special characters

Because I (and some other people) are using this updated routine !

 

Please could you make an easy test :

ATTOUT

Then use ONLY the NOTEPAD.exe (Don't use Excel) to change a few attributes at the beginning and at the end of the TXT file

( PLEASE no special characters , No Comma into the values, etc )

Then ATTIN ... 

Is it OK ??

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost