Table of Contents

CadSheetSetLock

from OpenCAD2D.SheetSets import CadSheetSetLock

class CadSheetSetLock(System.Object) ยท CadSheetSetLock in the .NET reference

The lock file AutoCAD keeps beside a sheet set data file while the set is open for editing: Tower.DBL for Tower.dst, 58 bytes of text for the user "InuYasha" on the machine "INUYASHA-MEV", the lines ended \r\r\n as AutoCAD's own writer ends them (measured on AutoCAD 2021): [UserInfo], UserName=InuYasha, Machine=INUYASHA-MEV and an empty line. A set whose lock is another user's opens read-only, with the lock's words as the tooltip of the palette's lock icon ("Locked for Edit by InuYasha"). A lock of this user on this machine is taken as one's own, so that a lock left by a program that was killed does not shut its user out.

Properties and fields

Description

.NET

@property
def Description(self) -> str

Gets the words that say who holds the lock, as the lock icon's tooltip shows them: "Locked for Edit by InuYasha on INUYASHA-MEV".

IsMine

.NET

@property
def IsMine(self) -> bool

Gets whether the lock is this user's on this machine, the letter case of the names ignored.

Machine

.NET

@property
def Machine(self) -> str

Gets the machine the lock was taken on (Machine).

UserName

.NET

@property
def UserName(self) -> str

Gets the user who holds the lock (UserName).

Methods

PathOf

.NET

@staticmethod
def PathOf(dst: str) -> str

Gets the path of the lock file of a sheet set data file: the .dst's own path with .DBL in place of .dst.

Read

.NET

@staticmethod
def Read(dst: str) -> CadSheetSetLock

Reads the lock of a sheet set data file.

Release

.NET

@staticmethod
def Release(dst: str) -> bool

Lets go of the lock of a sheet set data file: deletes the lock file where it is this user's on this machine.

Take

.NET

@staticmethod
def Take(dst: str) -> None

Takes the lock of a sheet set data file for this user on this machine: writes the lock file, in place of one that is there.