Class GCodeFileInfo
- Namespace
- DuetAPI.ObjectModel
- Assembly
- DuetAPI.dll
Holds information about a G-code file
public class GCodeFileInfo : ModelObject, INotifyPropertyChanging, IStaticModelObject, IModelObject, ICloneable, INotifyPropertyChanged
- Inheritance
-
GCodeFileInfo
- Implements
- Inherited Members
Constructors
GCodeFileInfo()
public GCodeFileInfo()
Properties
CustomInfo
User-defined key-value pairs
[SbcProperty(true)]
public JsonModelDictionary CustomInfo { get; }
Property Value
Filament
Filament consumption per extruder drive (in mm)
public ObservableCollection<float> Filament { get; }
Property Value
FileName
The filename of the G-code file
public string FileName { get; set; }
Property Value
GeneratedBy
Name of the application that generated this file
public string? GeneratedBy { get; set; }
Property Value
Height
Build height of the G-code job or 0 if not found (in mm)
public float Height { get; set; }
Property Value
LastModified
Value indicating when the file was last modified or null if unknown
[JsonConverter(typeof(JsonOptionalShortDateTimeConverter))]
public DateTime? LastModified { get; set; }
Property Value
LayerHeight
Height of each other layer or 0 if not found (in mm)
public float LayerHeight { get; set; }
Property Value
NumLayers
Number of total layers or 0 if unknown
public int NumLayers { get; set; }
Property Value
PrintTime
Estimated print time (in s)
public long? PrintTime { get; set; }
Property Value
- long?
SimulatedTime
Estimated print time from G-code simulation (in s)
public long? SimulatedTime { get; set; }
Property Value
- long?
Size
Size of the file
public long Size { get; set; }
Property Value
Thumbnails
Collection of thumbnails parsed from Gcode
[SbcProperty(true)]
public StaticModelCollection<ThumbnailInfo> Thumbnails { get; }
Property Value
Methods
Assign(IStaticModelObject)
Assign the properties from another instance. This is required to update model properties which do not have a setter
public void Assign(IStaticModelObject from)
Parameters
fromIStaticModelObjectOther instance
Clone()
Clone this instance
public object Clone()
Returns
- object
Cloned instance
Remarks
This method is auto-generated
UpdateFromJson(JsonElement, bool)
Update this instance from a given JSON element
public void UpdateFromJson(JsonElement jsonElement, bool ignoreSbcProperties)
Parameters
jsonElementJsonElementElement to update this intance from
ignoreSbcPropertiesboolWhether SBC properties are ignored
Remarks
This method is auto-generated
Exceptions
- JsonException
Failed to deserialize data
UpdateFromJsonReader(ref Utf8JsonReader, bool)
Update this instance from a given JSON element
public void UpdateFromJsonReader(ref Utf8JsonReader reader, bool ignoreSbcProperties)
Parameters
readerUtf8JsonReaderReader to update this intance from
ignoreSbcPropertiesboolWhether SBC properties are ignored
Remarks
This method is auto-generated
Exceptions
- JsonException
Failed to deserialize data