acad-linetypes-textstyles

Installation
SKILL.md

AutoCAD Linetypes and Text Styles

Use this skill when creating, loading, or modifying linetypes and text styles — accessing linetype and text style tables, loading linetypes from .lin files, configuring linetype scale variables, creating text styles with TrueType or SHX fonts, and setting up complex linetypes that embed text or shape elements.

Linetype Table Access

Database db = doc.Database;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
    LinetypeTable ltt = (LinetypeTable)tr.GetObject(db.LinetypeTableId, OpenMode.ForRead);

    // Check if a linetype exists (case-insensitive)
    bool exists = ltt.Has("DASHED");

    // Get linetype by name
    ObjectId ltId = ltt["DASHED"];
    LinetypeTableRecord ltr = (LinetypeTableRecord)tr.GetObject(ltId, OpenMode.ForRead);
Installs
3
GitHub Stars
4
First Seen
May 15, 2026