Click or drag to resize

MetadataManagerGetMaxId Method

Get Max Metadata ID

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public int GetMaxId()

Return Value

Type: Int32
Max ID
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
    if (vizcore3d.Model.IsOpen() == false) return;

    string path = "C:\\UserData\\ASSEMBLY.dwg";

    int id = vizcore3d.Metadata.GetMaxId();
    string name = System.IO.Path.GetFileName(path);
    byte[] buffer = System.IO.File.ReadAllBytes(path);

    bool result = vizcore3d.Metadata.Add(
        id          /* METADATA ID */
        , name      /* METADATA NAME */
        , buffer    /* METADATA BINARY */
        );
}
See Also