Activate Terminal Node over entire CATProduct
Activate Terminal Node over entire CATProduct
(OP)
I need to be able to apply "Activate Terminal Node" over an entire product, but currently I can't work out to get everything (including those parts buried two levels deep in 'components' to load.
I've tried to do it via each first level product, which works apart from no parts in components are loaded:
I've also tried:
And a few other combos without success.
Peoples thoughts?
I've tried to do it via each first level product, which works apart from no parts in components are loaded:
CODE
Set CATIA_Product = CATIA.Documents.Open("Path to File".CATProduct")
Set CATIA_Products = CATIA_Product.Product.Products
CATIA_Product.Activate
CATIA_Product.Product.ApplyWorkMode (DESIGN_MODE)
Product_Count = CATIA_Products.Count
For i = 1 To Product_Count
CATIA_Products.Item(i).ActivateDefaultShape
Next I've also tried:
CODE
Set CATIA_Product = CATIA.Documents.Open("Path to File".CATProduct")
Set CATIA_Products = CATIA_Product.Product.Products
CATIA_Product.Activate
CATIA_Product.Product.ApplyWorkMode (DESIGN_MODE)
CATIA_Products.ActivateDefaultShape And a few other combos without success.
Peoples thoughts?





RE: Activate Terminal Node over entire CATProduct
Is it the TOP node or?
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
RE: Activate Terminal Node over entire CATProduct
Assembly
- Component (Part 1)
- Component (Part 2)
- Component (Part 3)
- Component (Product 1)
- Component
-- Component (Part 1 - Part 2 bolts)
--- Bolt 1
--- Bolt 2
--- Bolt 3
-- Component (Part 2 - Part 3 bolts)
--- Bolt 1
--- Bolt 2
--- Bolt 3
-- Component (Part 3 - Product 1 bolts)
--- Bolt 1
--- Bolt 2
--- Bolt 3
If that explains it?
So I guess yes, top node!
RE: Activate Terminal Node over entire CATProduct
Sub CATMain()
Dim objSelection as Selection
Set objSelection = CATIA.ActiveDocument.Selection
' clear selection
objSelection.Clear
' select root product
objSelection.Add CATIA.ActiveDocument.Product
End Sub
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
RE: Activate Terminal Node over entire CATProduct
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
RE: Activate Terminal Node over entire CATProduct
Thanks, but still not working/nothing happening!!
Getting "Object does not support this property or method", error 438.
CODE
Set Excel_Sheet = Excel_Workbook.Worksheets(Control_Sheet) Set CATIA_Product = CATIA.Documents.Open("PATH" & Excel_Sheet.Cells(iRow, Part_Number_Column) & ".CATProduct") Set CATIA_Products = CATIA_Product.Product.Products Dim CATIA_Selection As Selection Set CATIA_Selection = CATIA.ActiveDocument.Selection ' clear selection CATIA_Selection.Clear ' select root product CATIA_Selection.Add CATIA.ActiveDocument.Product CATIA_Selection.ActivateDefaultShapeRE: Activate Terminal Node over entire CATProduct
Sub CATMain()
Dim objSelection as Selection
Set objSelection = CATIA.ActiveDocument.Selection
' clear selection
objSelection.Clear
' select root product
objSelection.Add CATIA.ActiveDocument.Product
CATIA.StartCommand "Activate Terminal Node"
End Sub
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
RE: Activate Terminal Node over entire CATProduct
Just need to sort the problem out with my clash exporter (see other thread!).