Table of Contents

Class MachiningProject

Namespace
Hi.MachiningProcs
Assembly
HiNc.dll

Represents a milling project that manages the execution, simulation, and analysis of NC programs.

public class MachiningProject : IDisposable, IMakeXmlSource, IMachiningProjectGetter
Inheritance
MachiningProject
Implements
Inherited Members
Extension Methods

Constructors

MachiningProject(string)

Initializes a new instance with the specified directory.

public MachiningProject(string baseDirectory)

Parameters

baseDirectory string

Base directory for file operations

MachiningProject(XElement, string)

Initializes a new instance from XML data.

public MachiningProject(XElement src, string baseDirectory)

Parameters

src XElement

XML element containing configuration data

baseDirectory string

Base directory for resolving relative paths

Properties

ApiVersion

Gets the API version from the entry assembly.

public static Version ApiVersion { get; }

Property Value

Version

BaseDirectory

Gets the base directory where project files are located.

public string BaseDirectory { get; }

Property Value

string

DictionaryColorGuide

public DictionaryColorGuide DictionaryColorGuide { get; }

Property Value

DictionaryColorGuide

MachiningActRunnerConfig

Gets or sets the configuration for the milling act runner.

public MachiningActRunnerConfig MachiningActRunnerConfig { get; set; }

Property Value

MachiningActRunnerConfig

MachiningToolHouse

Gets or sets the machining tool house containing tool configurations.

public MachiningToolHouse MachiningToolHouse { get; set; }

Property Value

MachiningToolHouse

MachiningToolHouseFile

Gets or sets the file path to the milling tool house configuration.

public string MachiningToolHouseFile { get; set; }

Property Value

string

MillingGuide

Gets or sets the milling guide containing visualization and analysis configurations.

public MillingGuide MillingGuide { get; set; }

Property Value

MillingGuide

NcEnv

Gets or sets the NC environment settings.

public HardNcEnv NcEnv { get; set; }

Property Value

HardNcEnv

PlayerCommand

Gets the command to execute when playing the machining project.

public IShellCommand PlayerCommand { get; set; }

Property Value

IShellCommand

TimeMapping

Gets or sets the time mapping for synchronizing different time-based data streams.

public TimeMapping TimeMapping { get; set; }

Property Value

TimeMapping

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

GetMachiningProject()

Gets the MachiningProject instance.

public MachiningProject GetMachiningProject()

Returns

MachiningProject

The MachiningProject instance.

GetMillingEquipment()

public MachiningEquipment GetMillingEquipment()

Returns

MachiningEquipment

LoadFile(string)

Loads a machining project from the specified file path.

public static MachiningProject LoadFile(string projectFilePath)

Parameters

projectFilePath string

Path to the project file to load

Returns

MachiningProject

A new machining project instance loaded from the file

MakeXmlSource(string, string, bool)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if true, the extended file creation is suppressed.

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.