Ich versuche gerade meine VBA Programme in VB 2005 umzusetzen und bin dabei auf ein Problem gestoßen das die Suche nicht mehr funkioniert!
Hat jemand schon mal das gleiche Problem gehabt und kann mir eine Lösung anbieten?
Es kommt immer die Meldung "The iIndex value is not correct. Please give a value between 1 and 1" (siehe Anhang)
Imports MECMOD
Imports ProductStructureTypeLib
Imports PARTITF
Imports INFITF
Imports KnowledgewareTypeLib
Public Class FormRemoveKnowledge
Private Sub ButtonRemoveKnowledge_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveKnowledge.Click
Dim CATIA As New Object
CATIA = System.Runtime.InteropServices.Marshal.GetActiveObject("CATIA.Application")
Dim productDocument1 As ProductDocument
productDocument1 = CATIA.ActiveDocument
Dim selection1 As Selection
selection1 = productDocument1.Selection
selection1.Search("((((CATKnowledgeSearch.AdvisorCheck.Hidden=TRUE + CATKnowledgeSearch.AdvisorRule.Hidden=TRUE) + CATKnowledgeSearch.AdvisorFormula.Hidden=TRUE) + CATKnowledgeSearch.AdvisorReaction.Hidden=TRUE) + CATKnowledgeSearch.Design Table.Hidden=TRUE) ,all")
Dim partDocument1 As PartDocument
partDocument1 = CATIA.ActiveDocument
selection1 = partDocument1.Selection
selection1.Delete()
End Sub
End Class
Danke schon mal
Gruß
Marko
[Diese Nachricht wurde von crow73 am 21. Feb. 2007 editiert.]
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP