Extracting BOM from AutoCAD using C#

Extracting BOM from AutoCAD using C#

Anonymous
Not applicable
6,404 Views
16 Replies
Message 1 of 17

Extracting BOM from AutoCAD using C#

Anonymous
Not applicable

Hello All,

I am doing a customization project in AutoCAD 2012 using C#.net.

My objective is to extract BOM table from an AutoCAD drawing using c# programming.
I am trying to create a custom menu in AutoCAD which will have the export BOM functionality.

Since I am new to C# programming I am finding it difficult to form the code.
Any sort of help is appreciated.

 

Thanks in advance.

Regards
Arindam Basu

0 Likes
Accepted solutions (1)
6,405 Views
16 Replies
Replies (16)
Message 2 of 17

hgasty1001
Advisor
Advisor

Hi,

 

What about dataextraction command?, it can be automated , see this link: Dataextraction , also it's easy to read from a table and write its data to excel, see this link:Export Table , and Dataextraction API .

 

Gaston Nunez

 

 

0 Likes
Message 3 of 17

Hallex
Advisor
Advisor
Can you upload small picture to see the result
of this program?
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
0 Likes
Message 4 of 17

Anonymous
Not applicable

Hi Gaston

 

The data extraction tool does not export my BOM table.

I am attaching a sample drawing with a BOM table on it.

The task that export function does when right clicking on any table, i have to do that with the help of C# code.

 

My objective is to create a new custom menu in any toolbar of AutoCAD and link the export functionality to that menu.

 

Thanks

0 Likes
Message 5 of 17

Alexander.Rivilis
Mentor
Mentor

Maybe _TABLEEXPORT can help you.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 6 of 17

Anonymous
Not applicable

Exactly the function which _TABLEEXPORT does, i have to do that with the help of a custom menu or by creating a custom action in the quick access toolbar. after creating the action i have to link the _TABLEEXPORT functionality to that custom action.

 

can anybody help me with the code to create such a custom menu or custom action?

 

Regards,

Arindam Basu

0 Likes
Message 7 of 17

Alexander.Rivilis
Mentor
Mentor

I do not understand why you need to use .NET API if you can manually add the command to the menu (CUI), save as a partial menu and load it when needed.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 8 of 17

Anonymous
Not applicable

Thanks Alexander,

 

I understand what you are telling is also a way to fulfill my objective.

But I was looking for a way other than customizing it through UI.

Anyway,

Can you explain me further the steps to save my new custom menu as a partial menu and load it when needed.

 

I have created a new menu and also loaded it with the _TABLEEXPORT command,

but each time I am opening AutoCAD it is showing the menu.

 

If it is possible to change it to a partial menu and load it as and when required please suggest the way for it.

 

Regards,

Arindam

0 Likes
Message 9 of 17

Alexander.Rivilis
Mentor
Mentor

You can do it many ways.

For example: http://through-the-interface.typepad.com/through_the_interface/2010/04/adding-to-autocads-applicatio...

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 10 of 17

Hallex
Advisor
Advisor
Please check this code
http://www.acadnetwork.com/topic-198.0.html
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
0 Likes
Message 11 of 17

Anonymous
Not applicable

Hey Hallex,

 

I cant access the link you've mentioned.

Only registered members are allowed to access this section.

And registration is failing everytime.

 

Kindly post the code here, if u please.

 

Thanks in advance.

0 Likes
Message 12 of 17

Hallex
Advisor
Advisor
Accepted solution

The real world example, based on the drawing from there:
http://forums.augi.com/showthread.php?136467-lisp-table-help&p=1167872&viewfull=1#post1167872

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
0 Likes
Message 13 of 17

Anonymous
Not applicable

Hi Halex,

 

The link you provided helped a lot.

I found the code in lisp.

The TableXport.lsp code works perfect.

 

Thanks for sharing.

 

Regards,

Arindam Basu

0 Likes
Message 14 of 17

Hallex
Advisor
Advisor
You're welcome, Arindam
Cheers 🙂
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
0 Likes
Message 15 of 17

Anonymous
Not applicable

hi,

 

i have attched a sample drawing here which i need to extract total bom from drawing like (tee joint, reducer,dummy plate, socket fittings etc..) which is totaly into fire fighting, can you help me out in this.....

0 Likes
Message 16 of 17

amitnkukanur
Collaborator
Collaborator
The bom you want to extract is block of with attributes or exploded texts
Senior Software Engineer
0 Likes
Message 17 of 17

Anonymous
Not applicable

hi what is the dll used?


@Hallex wrote:

The real world example, based on the drawing from there:
http://forums.augi.com/showthread.php?136467-lisp-table-help&p=1167872&viewfull=1#post1167872


hi what is the dll used?

 

0 Likes