Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: to change parameter in CATProduct #1421

    Hello Matt,
    thanks for reply. Piece of my code is here:
    ‘=================================================================================
    ‘transfer parameters from formular to CATIA
    ‘=================================================================================

    Private Sub cmbUlozParametry_Click()

    Set MujDokument = CATIA.ActiveDocument
    NazevDokumentu = MujDokument.Name ‘to get Name of the Document
    Extract = Right(NazevDokumentu, 7) ‘to save type of the document to variable

    Dim MojeParametry As Selection

    Select Case Extract

    Case “CATPart”

    Set MujPart = MujDokument.Part
    Set oParam = MujPart.Parameters

    Set sNazev = oParam.Item(“Nazev”)
    sNazev.Value = txbNazev

    Case “Product”

    Set MujProdukt = MujDokument.Product
    Set oParam = MujProdukt.Parameters

    Set sNazev = oParam.Item(“Nazev”)
    sNazev.Value = txbNazev

    Case “Drawing”

    NeniCATPartNeniCATProduct = MsgBox(“Active document isn’t CATPart or CATProduct!”, 48, “Bad Type of Document”)

    End Select

    End Sub

    Problem is that name of the parameter has to be same in CATProduct and in all his CATParts. I’m thinking about this solution – to select desired CATProduct interactive (this is what I’m to able do ) and change parameter in this selection (I don’t know how arrange it…)
    Thank you.

    in reply to: to change parameter in CATProduct #1418

    Yes, I do.

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