geht leider immernochnicht, er hat irgendwas gegen die suchnummer ich hasse es...
Hier mal der ganze Macro:
###
Sub CATMain()
Dim MyFS As FileSystem
Set MyFS = CATIA.FileSystem
Dim AllText(3) As String
Dim CurrentData As String
Dim i as Integer
Dim PosStart as Integer
Dim PosEnd as Integer
Dim R, G, B, Modul, Kogr, PPG, Sachnummer, Benennung, EVT, BZA, SST, Datum, GTArt
Dim MyFile As File
Set MyFile = MyFS.GetFile("/home/q070151/CATScript/input.csv")
Dim MyStream As CATIATextStream
Set MyStream = MyFile.OpenAsTextStream("ForReading")
Dim StrLine As String
StrLine = MyStream.ReadLine
StrLine = MyStream.ReadLine
StrLine = MyStream.ReadLine
StrLine = MyStream.ReadLine
StrLine = MyStream.ReadLine
StrLine = MyStream.ReadLine
StrLine = MyStream.ReadLine
StrLine = MyStream.ReadLine
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim selection1 As Selection
Set selection1 = productDocument1.Selection
selection1.Search("Name=*,all")
Dim visualisation As VisPropertySet
Set visualisation = selection1.VisProperties
visualisation.SetRealColor 0,0,0,1
productDocument1.Product.Update
Do Until MyStream.AtEndOfStream
StrLine = MyStream.ReadLine
MsgBox "Gelesene Zeile = " & StrLine
R = Split(StrLine, "/")
G = Split(StrLine, "/")
B = Split(StrLine, ";")
Modul = Split(StrLine, ";")
Kogr = Split(StrLine, ";")
PPG = Split(StrLine, ";")
Sachnummer = Split(StrLine, ";")
Benennung = Split(StrLine, ";")
EVT = Split(StrLine, ";")
BZA = Split(StrLine, ";")
SST = Split(StrLine, ";")
Datum = Split(StrLine, ";")
GTArt = Split(StrLine, ";")
Dim Str_Sachnummer As String
Str_Sachnummer = Sachnummer
MsgBox Sachnummer
Dim Name as String
Name = CStr("Name=")
Dim all as String
all = CStr("*,all")
Dim suche as String
suche = Name & Str_Sachnummer & all
selection1.Search(suche)
Set visualisation = selection1.VisProperties
visualisation.SetRealColor R,G,B,1
productDocument1.Product.Update
Loop
End Sub
###
Danke schonmal... 
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP