Académique Documents
Professionnel Documents
Culture Documents
http://win32com.goermezer.de/content/view/31/291/
Home Script Collection Adobe applications CAD Systems Internet Explorer Lotus Notes Microsoft Office Microsoft Project Microsoft Access Microsoft Visio MS Speech Engine OpenOffice Windows Media Player Microsoft Windows Windows Scripting Host WMI Image/Graphic Other Articles CATIA V5 Articles Microsoft COM articles
Home Script Collection CAD Systems Generating BOM (bill of material) from CATIA V5 Generating BOM (bill of material) from CATIA V5
Feedback
If the page "The Python Script Collection For Windows To test this sample you should have installed Pywin32 and start CATIA V5 before running this script. Generating BOM (bill of material) from CATIA V5" was import win32com.client useful for you, please give it a +1: catapp = win32com.client.Dispatch("CATIA.Application")
doc=catapp.ActiveDocument.Product product_count = doc.Products.Count 0 print "This example prints all Parts and subproducts of \ a CATProduct up to the 2nd level." for products in range(product_count): Comments products = products + 1 print doc.Products.Item(products).Name, ":" part_count = doc.Products.Item(products).Products.Count I tried this for outlook for parts in range(part_count): 2007 and it doesn't work, parts = parts +1 print " ", doc.Products.Item(products).Products.Item(parts).Name but python doesn't have an For a HTML-generated Bill of materialyou should better use the BOM-generation from CATIA V5: er... More... import win32com.client catapp = win32com.client.Dispatch("CATIA.Application") I never understood doc=catapp.ActiveDocument.Product doc.Product.ExtractBOM(2, "c:\BOM.html") why people don't include
the import statements at the top of ... More... Thanks friend! ;-) Work really apprecciated from italy! More... y am I not being allowed to view more on catia scripts. More... eval('item.%s' % attribute) should be written as getattr(item, attribute) More...
Comments 0 # juju 2007-08-13 06:15 Is it possible to get the position matrix too ? Reply | Reply with quote | Quote | Report to administrator 0 # praveen 2011-05-31 14:13 y am I not being allowed to view more on catia scripts. Reply | Reply with quote | Quote | Report to administrator Refresh comments list RSS feed for comments to this post
Login Form
Username
JComments
Add comment
Password < Prev [ Back ] Next > Remember me Lost Password? No account yet? Register
Advertisement
Fashionez.com is a leading supplier of Wedding Dresses, Party Dresses, Men's Clothing, Women's Clothing, Cosplay Costumes, Baby & Kids
1 of 2
2011/10/19 05:16
The Python Script Collection For Windows - Generating BOM (bill of ...
http://win32com.goermezer.de/content/view/31/291/
My prefered Python editor is Pyscripter from MMExperts. It is not only an editor. Pyscripter is a full Python IDE including (remote) debugging, a class browser, and all other nice helpers which a full featured IDE needs.
Clothing.
2 of 2
2011/10/19 05:16