Table of Contents

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

JsonModelDictionary

Filament

Filament consumption per extruder drive (in mm)

public ObservableCollection<float> Filament { get; }

Property Value

ObservableCollection<float>

FileName

The filename of the G-code file

public string FileName { get; set; }

Property Value

string

GeneratedBy

Name of the application that generated this file

public string? GeneratedBy { get; set; }

Property Value

string

Height

Build height of the G-code job or 0 if not found (in mm)

public float Height { get; set; }

Property Value

float

LastModified

Value indicating when the file was last modified or null if unknown

[JsonConverter(typeof(JsonOptionalShortDateTimeConverter))]
public DateTime? LastModified { get; set; }

Property Value

DateTime?

LayerHeight

Height of each other layer or 0 if not found (in mm)

public float LayerHeight { get; set; }

Property Value

float

NumLayers

Number of total layers or 0 if unknown

public int NumLayers { get; set; }

Property Value

int

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

long

Thumbnails

Collection of thumbnails parsed from Gcode

[SbcProperty(true)]
public StaticModelCollection<ThumbnailInfo> Thumbnails { get; }

Property Value

StaticModelCollection<ThumbnailInfo>

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

from IStaticModelObject

Other 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

jsonElement JsonElement

Element to update this intance from

ignoreSbcProperties bool

Whether 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

reader Utf8JsonReader

Reader to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data