TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: A_LOTA_NOTA on October 08, 2010, 08:05:44 PM

Title: BOM Extraction
Post by: A_LOTA_NOTA on October 08, 2010, 08:05:44 PM
After a couple of post on the swamp I was about to get the info I needed for lisp that would extract the required info from the attached BOM.  Now I have been asked to get all the lines off the drawings. That doesn't sound real difficult, other than not all the drawings have the same number of lines of text.  So I've attached one of the drawings for suggestions / help. The info needs to be extracted to a comma delimited file. The BOM is always the same size no matter the scale of the drawing. It is always the some distance from the top right corner of the drawing. Thank you
Title: Re: BOM Extraction
Post by: Lee Mac on October 08, 2010, 08:14:01 PM
http://www.theswamp.org/index.php?topic=29270.0 (http://www.theswamp.org/index.php?topic=29270.0)
Title: Re: BOM Extraction
Post by: CAB on October 09, 2010, 09:19:20 AM
You have not explained very clearly the problem you are having.
Are you wanting to get ALL LINES in model space except the border & text table shown in you Sample DWG?
Does the border change size from drawing to drawing?
Are the layer names always the same for the border & table shown?

You can use ssget for model space only and exclude some layer names
or you can use ssget with points to define the area to select.
Note that ssget requires the drawing to be visible on the screen.

The other approach is the iterate through the database looking for LINES that
match you search criteria.
Title: Re: BOM Extraction
Post by: A_LOTA_NOTA on October 09, 2010, 09:43:22 PM
You have not explained very clearly the problem you are having.
Are you wanting to get ALL LINES in model space except the border & text table shown in you Sample DWG?
Does the border change size from drawing to drawing?
Are the layer names always the same for the border & table shown?

You can use ssget for model space only and exclude some layer names
or you can use ssget with points to define the area to select.
Note that ssget requires the drawing to be visible on the screen.

The other approach is the iterate through the database looking for LINES that
match you search criteria.

Yes, everything is in model space even the border and text. The border changes size with the scale of the drawing but not the BOM. I have not checked the layers but I would have to say yes the are consistant.
Title: Re: BOM Extraction
Post by: A_LOTA_NOTA on October 11, 2010, 09:02:30 AM
The other approach is the iterate through the database looking for LINES that
match you search criteria.

Sorry, what I should have said was lines of text. I'm wanting to extract all the text to a comma delimited file. I've attached an example of the output file.
Title: Re: BOM Extraction
Post by: Matt__W on October 11, 2010, 09:09:44 AM
EATTEXT
Title: Re: BOM Extraction
Post by: A_LOTA_NOTA on October 11, 2010, 09:20:14 AM
EATTEXT

I have about 500 drawings I need to get the info off of. The number of lines of text is not consistent from drawing to drawing.
Title: Re: BOM Extraction
Post by: Krushert on October 11, 2010, 10:08:44 AM
Can I ask what you are using the comma delimited text file for? 
Title: Re: BOM Extraction
Post by: Krushert on October 11, 2010, 10:11:14 AM
EATTEXT

I have about 500 drawings I need to get the info off of. The number of lines of text is not consistent from drawing to drawing.

First of all EATTEXT can processed multiple drawings files at once.  The second .... I will get back to you. 
Title: Re: BOM Extraction
Post by: A_LOTA_NOTA on October 11, 2010, 10:27:26 AM
Can I ask what you are using the comma delimited text file for? 

To put the info in a database
Title: Re: BOM Extraction
Post by: A_LOTA_NOTA on October 11, 2010, 10:28:25 AM
I guess I'll have to check EATTEXT out. I have never used it.
Title: Re: BOM Extraction
Post by: A_LOTA_NOTA on October 12, 2010, 09:17:07 AM
I wasn't able to do what I needed with EATTEXT. But I was able to extract the text with lisp. Thanks for all the replies