Hi,
I am working on project which deals with Data Extraction. My Approach is as follows
1) If all entries in drawing in Blocks i will extract data by referring block names.
2) If all entries in Text i am able to extract data.
Here half of data is in blocks and Half are in Texts; to make it uniform i am exploding the drawing so that all are Texts.
Now, the problem is they are inconsistent template, please see the attached image. I am going by distance mechanism that is were the problem. If some one has better idea/solution please provide will be helpfull
Solved! Go to Solution.
Solved by amitnkukanur. Go to Solution.
Hi,
I can't understand what the problem is. Just a guess: If you explode blocks with attributes, you end up with attribute deffinitions without the information intended to be extracted, so do not explode blocks (block references), try this link to understand the use of the API:Data Extraction
Gaston Nunez
Hello Gasty,
Thanks for Replying.
1) This is about the drawing done in AutoCAD 2013.
2) If the data to be extracted is in Blocks then i dont have any problem because i will straight away I target those block names to extract data
3) The Problem is Header Names are in Blocks and Values are in Texts hence i am find difficult to extract data.
Header such as Title, Job No, Approver.
Values such as Spring Nut, 123456789, Test
4) What i am doing is Explode the drawing so that all are individual texts.
5) Then i will search for the Text Header Called "TITLE" and scan few
distance based on cordinates. If Template is consistent then my logic is
working perfectly, but for inconsistent how should be my approach.
6) If i use the concept you provided in the link work in this case for
AutoCAD 2013. I am using .NET 4.
Please Reply.
rgds
Amit
Hi Amit,
It's more clear now, to better understand, can you post a test drawing to look at?
As for AutoCAD 2013, it's supported, you have to reference AcDx.dll in your project (copy to local:=false as always) from the inc folder of the 2013 SDK. For more information, there is a complete example included in the 2009 ARX SDK, but I don't see it in 2013/2014/2015 (my versions) if you can find it, coudl be a good start.
Gaston Nunez
Hi Amit,
While I understand the rules of your company, It's very dificult to help you without seeing a drawing, can you explain waht kind of template inconsistency are you finding? If I understand, the problem arise when you (the program) can not find some field value, making an euristic search could be very hard (and even imposible) in some cases, it's that correct?
Gaston Nunez
Hi Gasty
Thanks for Reply.
I have attached the sample template image which i created
Observe the Title Block - where values are in texts and headers are in blocks.
Hence i am exploding the drawing, then all values are converted to texts.
Then i get coordinates of Title (Header) and scan few co-ordinates from there to get values.
However if template is consistent i am able to extract all values, like the distance for A=3mm, some times A=2 mm and some times A=5 mm.
If i scan the area with 3mm distance i will loose A=5mm details and A=2mm might fetch junk values.
This is how template is organized.
Please reply.
With Warm Regards
Amit