Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting empty *txt properties and attributes extraction file from Autocad2015 LT

17 REPLIES 17
SOLVED
Reply
Message 1 of 18
Anonymous
3004 Views, 17 Replies

Getting empty *txt properties and attributes extraction file from Autocad2015 LT

Hi, I work in Autocad2015 LT so I know it got limited extraction feature if it comes to exporting blocks properties or attributes. However I am trying to achieve it using ATTEXT command and I am using attribute extraction template file with the following content:

BL:NAME C100000
BL:NUMBER N100000
BL:LAYER C100000

I want to have blocks names listed from blocks properties in this document, the number of blocks, and the layer name for now. I have at the same time some attributes assigned to these blocks, but for the moment I don't need them listed in the output txt file. I follow the tutorial from the above link: 

http://www.cad-notes.com/how-to-extract-block-attributes-in-autocad-lt

Unfortunately whatever I do and whatever option I chose for the output file, there is no content whatsoever. The output file is getting created but always empty with 0 KB content. What am I doing wrong. Could somebody please help?

Cheers

 

17 REPLIES 17
Message 2 of 18
john.vellek
in reply to: Anonymous

HI @Anonymous;

 

Welcome to the Autodesk Community!

 

Data Extraction in AutoCAD LT 2015 is not quite as easy as in the full product but it is certainly possible.

 

Is it possible to attach a sample drawing for me? Against it, I will run your template file to make sure that it is built properly.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 3 of 18
Anonymous
in reply to: john.vellek

Hi John,

thank you for your quick reply. In general I am looking in CAD LT 2015 for the opportunity of extracting to separate file, ideally excel the list of blocks included in the model space. Ideally having the block name and quantity to avoid counting them manually, because of the risk of mistake. I do not worry about the block attributes at the moment to be extracted. I know that the full CAD version has this advanced extraction feature available, LT version not. Can you please check both my cad file and template file against errors/ mistakes? Is there an option to extract these blocks numbers and names to any document or table, without bothering of selecting them first? "Qselct" or "select similar" command probably can not be included/ accepted DURING the "ATTEXT" extraction process/ operation? So do I have to bother to select every single block duplicate manually for the "ATTEXT" extraction process?

Thanks a lot,

Peter

Message 4 of 18
john.vellek
in reply to: Anonymous

Hi @Anonymous,

 

The data extraction process is AutoCAD LT relies on blocks with attributes in them. With this said, I modified a couple of your lighting blocks so that they would have an attribute called FIXT.

 

Next, I created a template file that has the following lines in it:

 

BL:NAME C015000

CIRC C030000

 

Now, when I run ATTEXT inside of AutoCAD LT, I have CDF by default for the file format - this means if you rename the resulting text file from .txt to CSV, you should easily be able to open it in Excel.

When I select the Select Objects button I simply type ALL at the command prompt.

Finally, when I click OK the Room_Lighting_Layout.txt file is created.

 

Capture.PNG

 

To get information such as the layer I suggest running this command with only one layer turned on at a time and writing the information to a unique TXT file.

 

When you import all the data into Excel you will then be able to sort and count. You can then copy and paste your Excel date aback into your drawing.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.

 

 

 


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 5 of 18
Anonymous
in reply to: john.vellek

Thank you John for your effort, I am following your instructions, but it still doesn't work. Same message as usual: "0 records in extract file". I have inserted 10 downlights with attributes into new file (attached), i ma using txt template file with your content, but still no luck so far. cdf neither sdf  don't work.

0_records_in _extract_file.jpgWhat could be causing this?

Message 6 of 18
john.vellek
in reply to: Anonymous

hI @Anonymous,

 

In your template, change CIRC to DOWNLIGHT and it should work.

 

That line is the attribute tag (name) that it is looking for.

 

BL:NAME C015000
DOWNLIGHT C030000

 

I have attached the resulting file.

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 7 of 18
john.vellek
in reply to: Anonymous

Hi peterindublin,

 

I am checking back to see if my post helped you with your problem or if you need additional assistance or information. Please add a post with how you decide to proceed and your results so other Community members may benefit.

Please hit the Accept as Solution button if my post fully solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 8 of 18
Anonymous
in reply to: john.vellek

Hello

 

My contribution to this as I have probably missed it elsewhere. The attribute tag has to be capitals and of course no spaces. Remember to attsync if you edit an existing block. Let me know if I'm wrong.

Message 9 of 18
steven-g
in reply to: Anonymous

The Attribute tag can be in either upper,lower or even mixed case that makes no difference the attext command is case insensitive, In theory the downlight extraction line should use N for numerical but C also works (it won't work the other way round).

And it is also worth pointing out here that if you have multiple attributes in a block they do have to be unique, Autocad will let you place 2 attributes with DOWNLIGHT as the attribute tag but it won't recognise the second one. You can also create an attribute extraction file that has a long list of attribute tags that are used in many different blocks and it will still work for all the blocks in one go, (it just fills in blanks if it doesn't find an attribute) you don't have to have a seperate extraction file for every different type of block (though a block does have to have a minimum of one attribute from that list before it will work with attext)

Message 10 of 18
Anonymous
in reply to: steven-g

Thank you for the clarification. 

 

The only reason I mentioned it was I had an attext not working and tried everything else until I made the attribute tags capitals at which point it worked straight away. I assumed that was the reason. The attributes were and remain locked and invisible but just created a blank file until I made them caps. No idea why but it works now. I suppose it might be relevant that this was on my laptop MAC LT version.

 

Message 11 of 18
steven-g
in reply to: Anonymous

Could well be a MAC issue, in windows at least attribute tags are normally automatically changed to caps by the system (at least on my machine, but it could be a setting), but for the extraction, template it doesn't matter. Again it doesn't matter in windows, you could well have found one of the many differences between Windows and MAC hopefully a MAC user will be able to confirm that.

Message 12 of 18

Hi John,

 

Your post helped me a lot.

Many thanks.

 

Regards,

Kris.

Message 13 of 18
Anonymous
in reply to: Anonymous

Hi, I am having the same issue. 0 results returning on my extraction file.

Attached is my extraction template and a clean file with just the blocks I want attributes extracted from. 

 

Thank you for any help!! 🙂

Message 14 of 18
steven-g
in reply to: Anonymous

You need to take a look at your template file, 2 examples:

1 - You are telling AutoCAD that SIZE is a number but the attribute contains characters at the end 6'-8" X 7'-7" (50F) 

2 - Further down U is a number but the template tells AutoCAD it is just a single digit N001002 with 2 decimal places? should that may be read N010002

Message 15 of 18
Anonymous
in reply to: steven-g

Thanks Steven! So if the attribute value has any characters whatsoever it should be noted as a C000000 type? Most of my attributes contain both numbers and characters so I didn't understand which would trump.  The U attribute is only .28, it actually never has a number before the decimal. I can change that to N000002. 

Here's my changes. I also added in the 2 attributes that are in the block but that I assumed to be causing problems since the tag has . and #.

LOCATION C050000
ROOM N003000
DIAGRAM C003000
TYPE C050000
SIZE C030000
FINISH C020000
MANUFACTURER C050000
U N000002
S.G. C003000
SCREEN C002000
# N002000
REMARKS C050000

REMARKS C050000

 

It's still returning a blank file. Could something be wrong with my blocks?

Message 16 of 18
steven-g
in reply to: Anonymous

If there is a single character in there then it is a string, so even a space would make it a string.

 

0.28 is made up of at least 4 digits the decimal point counts as a digit so N00200 will still fail and you still need to tell Autocad to use 2 places after the decimal point. You are not telling AutoCAD how big the number is you are telling it how many actual digits are used and how many places after the decimal point to show. So it would need to be at least N004002 (you might not use the zero before the point but AutoCAD does)

 

If you read your command line after running the 'attext' command it will tell you the errors it is finding, maybe you need to increase the height of your command line window to see the errors.

Message 17 of 18
Anonymous
in reply to: steven-g

YAY that fixed it!! Thanks so much for the explanation! anything coding related always confuses the mess out of me. 😞

Message 18 of 18
steven-g
in reply to: Anonymous

👍 Great

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report