Adding unique ID to Blocks and then color it

Adding unique ID to Blocks and then color it

vyshakhgnair_cvr
Participant Participant
324 Views
5 Replies
Message 1 of 6

Adding unique ID to Blocks and then color it

vyshakhgnair_cvr
Participant
Participant

How to add a unique id to each block in a model in Autocad so that it can retrieve using Autodesk api to color specific blocks?

 

0 Likes
Accepted solutions (1)
325 Views
5 Replies
Replies (5)
Message 2 of 6

paullimapa
Mentor
Mentor

AutoCAD Blocks support Attributes which can have a unique value.

Perhaps you can try exploring this option?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 6

vyshakhgnair_cvr
Participant
Participant

Yeah, I have tried to implement that but I could implement that only in the formats such as dwg, dwf. And couldn't find any API documentation which tries to extract value embedded in a file. 

0 Likes
Message 4 of 6

paullimapa
Mentor
Mentor
Accepted solution

I though you were only addressing dwg files then the following may be of interest to you:

https://forums.autodesk.com/t5/net/reg-extract-attributes-without-opening-drawing-file/td-p/5455950

Here's a method using ObjectARX:

https://adndevblog.typepad.com/autocad/2012/12/get-the-attribute-values-from-block-references-insert...

Then there are products that can extract attributes without AutoCAD:

https://www.autodwg.com/AttributeExtraction/


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 6

vyshakhgnair_cvr
Participant
Participant

Thank you I'll go through these. 

0 Likes
Message 6 of 6

paullimapa
Mentor
Mentor

glad to have helped...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes