blark.solution.Project

class blark.solution.Project(name: str, saved_path: PurePath, local_path: Path | None, guid: str, solution_guid: str, loaded: TwincatTsProject | None = None)[source]

Bases: object

A stub container for a TwinCAT project (.tsproj) file.

This only contains metadata about the tsproj and allows for full project loading by way of .load().

Methods

__init__(name, saved_path, local_path, guid, ...)

from_filename(filename)

Create a stub project loader from the given filename.

load()

Load the project into a TwincatTsProject.

Attributes

loaded

The loaded project.

name

The project name.

saved_path

The path according to the solution:r likely a Windows-formatted path which is case-insensitive.

local_path

The corresponding local filename.

guid

The globally unique identifier for the project.

solution_guid

The unique identifier for the solution.

name: str

The project name.

saved_path: PurePath

The path according to the solution:r likely a Windows-formatted path which is case-insensitive.

local_path: Path | None

The corresponding local filename.

guid: str

The globally unique identifier for the project.

solution_guid: str

The unique identifier for the solution.

loaded: TwincatTsProject | None = None

The loaded project.

classmethod from_filename(filename: str | Path) Self[source]

Create a stub project loader from the given filename.

Parameters:
filenameAnyPath
Returns:
Project
load() TwincatTsProject[source]

Load the project into a TwincatTsProject.

__init__(name: str, saved_path: PurePath, local_path: Path | None, guid: str, solution_guid: str, loaded: TwincatTsProject | None = None) None