Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Delete Geometrical set and Pockets #2274

    Dani
    Participant

    Thank you Matt

    in reply to: Delete Geometrical set and Pockets #2269

    Dani
    Participant

    Thank you Matt,

    But it seems to me that catia does not recognize HydridBody as a form of type.

    When I run this:

    Sub catmain()
    Dim oPartDoc As PartDocument
    Set oPartDoc = catia.ActiveDocument
    Set oSelection1 = oPartDoc.Selection
    oSelection1.Search “type=body, all”
    Dim No As Integer
    No = oSelection1.Count
    MsgBox (No)
    End Sub

    It correctly gives me back the number of bodies in the tree. However when I replace “type=body, all” with “type=hybridbody, all” it brings back this error:
    “The method Search failed”

    Thank you

    in reply to: Delete Geometrical set and Pockets #2213

    Dani
    Participant

    Thank you Emmett, This is my macro that unfortunately didn’t work.

    Sub CATMain()

    Dim partDocument1 As PartDocument Set partDocument1 = CATIA.ActiveDocument

    Set selection1 = partDocument1.Selection selection1.Search “Name=HybridBody, all” selection1.Delete

    Set selection2 = partDocument1.Selection selection2.Search “Name=Pocket, all” selection2.Delete

    End Sub

Viewing 3 posts - 1 through 3 (of 3 total)