Skip to content

Commit bd4fb2c

Browse files
committed
added comment about design mode
1 parent 19f5a4a commit bd4fb2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/example__bom_custom_001.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@
2525
from datetime import datetime
2626

2727
from pycatia import catia
28+
from pycatia.enumeration.enumeration_types import cat_work_mode_type
2829
from pycatia.product_structure_interfaces.product_document import ProductDocument
2930

3031
application = catia()
3132
product_document: ProductDocument = application.active_document
3233
product = product_document.product
3334
products = product.products
3435

36+
# if the product isn't already in design mode you'll need to activate it, otherwise script will fail.
37+
product.apply_work_mode(cat_work_mode_type.index("DESIGN_MODE"))
38+
3539
part_numbers = []
3640
prd_dict = {}
3741

0 commit comments

Comments
 (0)