catia v5 bom in python
TRANSCRIPT
-
8/3/2019 Catia v5 Bom in Python
1/2
HomeScript Collection
Adobe applications
CAD Systems
Internet Explorer
Lotus Notes
Microsoft Office
Microsoft Project
Microsoft AccessMicrosoft Visio
MS Speech Engine
OpenOffice
Windows Media
Player
Microsoft Windows
Windows ScriptingHost
WMI
Image/Graphic
OtherArticles
CATIA V5 Articles
Microsoft COMarticles
RSS category feeds
NewsArticles
Script examples
RSS site feeds
More related
Thanks to...
Notebook Guide
0
Reply | Reply with quote | Quote | Report to administrator
0
Reply | Reply with quote | Quote | Report to administrator
JComments
Home Script Collection CAD Systems Generating BOM (bill of material)from CATIA V5
Generating BOM (bill of material) from CATIA V5
To test this sample you should have installed Pywin32 and start CATIA V5 before running this script.
import win32com.client
catapp = win32com.client.Dispatch("CATIA.Application")doc=catapp.ActiveDocument.Product
product_count = doc.Products.Count
print"This example prints all Parts and subproducts of \a CATProduct up to the 2nd level."
for products inrange(product_count):
products = products + 1
print doc.Products.Item(products).Name, ":"
part_count = doc.Products.Item(products).Products.Countfor parts inrange(part_count):
parts = parts +1
print" ", doc.Products.Item(products).Products.Item(parts).Name
For a HTML-generated Bill of materialyou should better use the BOM-generation from CATIA V5:
import win32com.client
catapp = win32com.client.Dispatch("CATIA.Application")
doc=catapp.ActiveDocument.Product
doc.Product.ExtractBOM(2, "c:\BOM.html")
Last Updated ( Friday, 20 March 2009 )
Comments
#juju 2007-08-13 06:15
Is it possible to get the position matrix too ?
# praveen 2011-05-31 14:13y am I not being allowed to view more on catia scripts.
Refresh comments list
RSS feed for comments to this post
Add comment
< Prev Next >
[ Back ]
Advertisement
Fashionez.com is a leading supplier of Wedding Dresses, Party Dresses,
Men's Clothing, Women's Clothing, Cosplay Costumes, Baby & Kids
Feedback
If the page "The Python Script
Collection For Windows -
Generating BOM (bill of
material) from CATIA V5" was
useful for you, please give it a +1:
0
Comments
I tried this for outlook2007 and it doesn't work,but python doesn't have an
er... More...
I never understood
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 oncatia scripts. More...
eval('item.%s' %
attribute) should be written
as getattr(item, attribute)
More...
Login Form
Username
Password
Remember me
Lost Password?
No account yet? Register
Home
Newsflash
Archive
Sitemap
Contact
Login/RegisterSubmit something
RSS
My prefered Python IDE
Python Script Collection For Windows - Generating BOM (bill of ... http://win32com.goermezer.de/content/view/31/291/
2 2011/10/19 05:16
-
8/3/2019 Catia v5 Bom in Python
2/2
Clothing. 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.
Do you have a script for me ?
Do you have an interesting Python script which does some really cool thing on Windows ? Please post them to this site. It`s very simple - simply
copy&paste it to this form. No login is requiered.
Hint: For syntax highlighting and correct Python intendat ion place your code between html tags and .
My prefered web framework
My prefered web framework for developing web applications is Django. Django calls itselfThe web framework for perfectionists with deadlines. It is
a really fast, scalable and (thanks Python) the sexiest web framework of the world.
Copyright 2006 Dipl.-Ing. Mustafa Grmezer. All trademarks and registered trademarks are the property of their respective companies. All images
on this pages are of the respective artists. Some of the images showing on win32com.goermezer.de are copies from other webpages/magazines. If
the owners of these images insist on there copyright, please contact me and I will remove them immediately. I will accept no responisibility for the
content of the listed links or the services offered by the linked sites. If you miss a backlink from one of the tools used by this CMS, please visit thedisclaimer.
Python Script Collection For Windows - Generating BOM (bill of ... http://win32com.goermezer.de/content/view/31/291/
2 2011/10/19 05:16