public static string[] GetObjectProperties(this File3dmObject obj)
        {
            var props = new string[5];

            props[0] = $"Name: {obj.Name}";
            props[1] = $"Layer: {obj.Attributes.LayerIndex}";
            props[2] = $"Type: {obj.Geometry.ObjectType}";
            props[3] = $"Id: {obj.Id}";
            props[4] = $"Material: {obj.Attributes.MaterialIndex}";

            return(props);
        }
예제 #2
0
    public void Bind(File3dmObject contextFile3dmObject)
    {
        File3dmObject = contextFile3dmObject;
        Values        = new List <ListStrings>();

        if (contextFile3dmObject.Attributes.UserStringCount == 0)
        {
            return;
        }

        var pairs = contextFile3dmObject.Attributes.GetUserStrings();
        var Keys  = pairs.AllKeys.ToList();

        foreach (var key in Keys)
        {
            var strings = pairs.GetValues(key);
            Values.Add(new ListStrings()
            {
                Key = key, Values = strings
            });
        }
    }