ShapeItemGetMetadata Method

Get the Shape item's metadata.

Namespace:  Tekla.Structures.Catalogs
Assembly:  Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
public bool GetMetadata(
	string key,
	ref ShapeMetadataTypeEnum type,
	ref Object value,
	ref string label,
	ref 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: Boolean
True 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", "teststring", "");

    object value = null;
    ShapeMetadataTypeEnum type = ShapeMetadataTypeEnum.Text;
    string label = string.Empty;
    string desc = string.Empty;
    shapeItem.GetMetadata("test", ref type, ref value, ref label, ref desc);
}
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next