If Not ThisDoc.Document.DocumentType = DocumentTypeEnum.kPartDocumentObject Then Exit Sub Dim oDoc As Inventor.PartDocument = ThisDoc.Document ' Schreibgeschützt? If oDoc.IsModifiable = False Then Exit Sub ' Inhaltscenterteil? If oDoc.ComponentDefinition.IsContentMember = True Then Exit Sub If oDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then 'Blechteil Dim oCompDef As SheetMetalComponentDefinition = oDoc.ComponentDefinition If oCompDef.HasFlatPattern = True Then ' Abmessungen in ein iProp kombiniert iProperties.Value("Custom", "Zuschnitt") = Round(SheetMetal.FlatExtentsLength, 0) & "x" & Round(SheetMetal.FlatExtentsWidth,0) & "x" & Round(oDoc.UnitsOfMeasure.ConvertUnits(oCompDef.Thickness.Value,"cm", oDoc.UnitsOfMeasure.LengthUnits),0) ' alternativ jede Abmessung einzeln 'iProperties.Value("Custom", "Länge") = Round(SheetMetal.FlatExtentsLength, 0) 'iProperties.Value("Custom", "Breite") = Round(SheetMetal.FlatExtentsWidth,0) 'iProperties.Value("Custom", "t") = Round(oDoc.UnitsOfMeasure.ConvertUnits(oCompDef.Thickness.Value,"cm", oDoc.UnitsOfMeasure.LengthUnits),0) ' alternativ nur Länge und Breite kombiniert 'iProperties.Value("Custom", "LxB") = Round(SheetMetal.FlatExtentsLength,0) & "x" & Round(SheetMetal.FlatExtentsWidth,0) 'iProperties.Value("Custom", "t") = Round(oDoc.UnitsOfMeasure.ConvertUnits(oCompDef.Thickness.Value,"cm", oDoc.UnitsOfMeasure.LengthUnits),0) End If Else ' normales Bauteil ' Abmessungen in ein iProp kombiniert iProperties.Value("Custom", "Zuschnitt") = Round(Measure.PreciseExtentsLength,0) & "x" & Round(Measure.PreciseExtentsWidth,0) & "x" & Round(Measure.PreciseExtentsHeight,0) ' alternativ jede Abmessung einzeln 'iProperties.Value("Custom", "Länge") = Round(Measure.PreciseExtentsLength, 0) 'iProperties.Value("Custom", "Breite") = Round(Measure.PreciseExtentsWidth,0) 'iProperties.Value("Custom", "Höhe") = Round(Measure.PreciseExtentsHeight,0) End If