.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extracting BOM from AutoCAD using C#

16 REPLIES 16
SOLVED
Reply
Message 1 of 17
Arindam_Basu
4868 Views, 16 Replies

Extracting BOM from AutoCAD using C#

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

16 REPLIES 16
Message 2 of 17
hgasty1001
in reply to: Arindam_Basu

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

 

 

Message 3 of 17
Hallex
in reply to: Arindam_Basu

Can you upload small picture to see the result
of this program?
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 4 of 17
Arindam_Basu
in reply to: hgasty1001

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

Message 5 of 17

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

Message 6 of 17

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

Message 7 of 17

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

Message 8 of 17

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

Message 9 of 17

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

Message 10 of 17
Hallex
in reply to: Arindam_Basu

Please check this code
http://www.acadnetwork.com/topic-198.0.html
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 11 of 17
Arindam_Basu
in reply to: Hallex

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.

Message 12 of 17
Hallex
in reply to: Arindam_Basu

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
Message 13 of 17
Arindam_Basu
in reply to: Hallex

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

Message 14 of 17
Hallex
in reply to: Arindam_Basu

You're welcome, Arindam
Cheers 🙂
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 15 of 17
praveenj.tsi
in reply to: Hallex

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.....

Message 16 of 17
amitnkukanur
in reply to: Arindam_Basu

The bom you want to extract is block of with attributes or exploded texts
Senior Software Engineer
Message 17 of 17
robsonkretzmann
in reply to: Hallex

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?

 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost