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.
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?
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
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..
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.
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.
Hello from France
Welcome to the Autodesk/AutoCAD Forums !
For ATTIN / ATTOUT with Dynamic Blocks, please use this update routine from a French Developper !
Patrice BRAUD
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
Hello
Please is it possible to get a copy of your Dynamic Block ?
Patrice BRAUD
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 BRAUD
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
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 BRAUD