×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Activate Terminal Node over entire CATProduct

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:

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

(OP)
Hi, absolute top node!

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

Hi,

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

(OP)
Hi Mate,

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

RE: Activate Terminal Node over entire CATProduct

In a CATScript, for me is working.

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

(OP)
Thanks mate, that works perfectly now!!

Just need to sort the problem out with my clash exporter (see other thread!).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources