Hallo
Vielen Dank für Deine Antwort. Ich hatte nur Probleme das Material vernünftig zu deklarieren. Hier das script für diejenigen die es interessiert:
Sub CatMain()
Dim mypartdoc As PartDocument
Set mypartdoc = CATIA.ActiveDocument
Dim mypart As Part
Set mypart = mypartdoc.Part
Dim mymat As Material
Dim omanager As MaterialManager
Set omanager = mypart.GetItem("CATMatManagerVBExt")
omanager.GetMaterialOnPart mypart, mymat
Dim sel1 As selection
Set sel1 = mypartdoc.selection
sel1.Clear
sel1.Add mymat
sel1.Delete
End Sub
Martin
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP