ShapeItemSetMetadata Method |
Set the Shape item's metadata. Inserts the metadata if key is not found, otherwise modifies existing data.
Namespace: Tekla.Structures.Catalogs
Assembly: Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
public bool SetMetadata( string key, ShapeMetadataTypeEnum type, Object value, string label, string description )
Parameters
- key
- Type: SystemString
The key of metadata. - type
- Type: Tekla.Structures.CatalogsShapeMetadataTypeEnum
The type of metadata. - value
- Type: SystemObject
The value of metadata. - label
- Type: SystemString
The label of metadata. - description
- Type: SystemString
The description of metadata.
Return Value
Type: BooleanTrue if success or False
Examples
public void SetMetadataTest() { var polymesh = CreateSomeValidBrep(); var shapeItem = new ShapeItem { Name = "TestFileName", ShapeFacetedBrep = polymesh, UpAxis = ShapeUpAxis.Z_Axis }; shapeItem.Insert(); shapeItem.SetMetadata("test", ShapeMetadataTypeEnum.Text, "testvalue", "", ""); }
See Also