@mlightcad/data-model 1.3.0 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/dist/data-model.cjs +0 -5
- package/dist/data-model.js +0 -25305
- package/dist/dxf-parser-worker.js +0 -1669
- package/lib/base/AcDbHostApplicationServices.d.ts +0 -96
- package/lib/base/AcDbHostApplicationServices.d.ts.map +0 -1
- package/lib/base/AcDbHostApplicationServices.js +0 -118
- package/lib/base/AcDbHostApplicationServices.js.map +0 -1
- package/lib/base/AcDbObject.d.ts +0 -205
- package/lib/base/AcDbObject.d.ts.map +0 -1
- package/lib/base/AcDbObject.js +0 -236
- package/lib/base/AcDbObject.js.map +0 -1
- package/lib/base/index.d.ts +0 -3
- package/lib/base/index.d.ts.map +0 -1
- package/lib/base/index.js +0 -3
- package/lib/base/index.js.map +0 -1
- package/lib/converter/AcDbBatchProcessing.d.ts +0 -146
- package/lib/converter/AcDbBatchProcessing.d.ts.map +0 -1
- package/lib/converter/AcDbBatchProcessing.js +0 -272
- package/lib/converter/AcDbBatchProcessing.js.map +0 -1
- package/lib/converter/AcDbDxfConverter.d.ts +0 -272
- package/lib/converter/AcDbDxfConverter.d.ts.map +0 -1
- package/lib/converter/AcDbDxfConverter.js +0 -872
- package/lib/converter/AcDbDxfConverter.js.map +0 -1
- package/lib/converter/AcDbDxfParser.d.ts +0 -23
- package/lib/converter/AcDbDxfParser.d.ts.map +0 -1
- package/lib/converter/AcDbDxfParser.js +0 -83
- package/lib/converter/AcDbDxfParser.js.map +0 -1
- package/lib/converter/AcDbEntitiyConverter.d.ts +0 -159
- package/lib/converter/AcDbEntitiyConverter.d.ts.map +0 -1
- package/lib/converter/AcDbEntitiyConverter.js +0 -659
- package/lib/converter/AcDbEntitiyConverter.js.map +0 -1
- package/lib/converter/AcDbObjectConverter.d.ts +0 -61
- package/lib/converter/AcDbObjectConverter.d.ts.map +0 -1
- package/lib/converter/AcDbObjectConverter.js +0 -91
- package/lib/converter/AcDbObjectConverter.js.map +0 -1
- package/lib/converter/index.d.ts +0 -4
- package/lib/converter/index.d.ts.map +0 -1
- package/lib/converter/index.js +0 -4
- package/lib/converter/index.js.map +0 -1
- package/lib/converter/worker/AcDbBaseWorker.d.ts +0 -36
- package/lib/converter/worker/AcDbBaseWorker.d.ts.map +0 -1
- package/lib/converter/worker/AcDbBaseWorker.js +0 -93
- package/lib/converter/worker/AcDbBaseWorker.js.map +0 -1
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts +0 -11
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts.map +0 -1
- package/lib/converter/worker/AcDbDxfParserWorker.js +0 -75
- package/lib/converter/worker/AcDbDxfParserWorker.js.map +0 -1
- package/lib/converter/worker/AcDbWorkerManager.d.ts +0 -107
- package/lib/converter/worker/AcDbWorkerManager.d.ts.map +0 -1
- package/lib/converter/worker/AcDbWorkerManager.js +0 -360
- package/lib/converter/worker/AcDbWorkerManager.js.map +0 -1
- package/lib/converter/worker/index.d.ts +0 -3
- package/lib/converter/worker/index.d.ts.map +0 -1
- package/lib/converter/worker/index.js +0 -3
- package/lib/converter/worker/index.js.map +0 -1
- package/lib/database/AcDbBlockTable.d.ts +0 -56
- package/lib/database/AcDbBlockTable.d.ts.map +0 -1
- package/lib/database/AcDbBlockTable.js +0 -98
- package/lib/database/AcDbBlockTable.js.map +0 -1
- package/lib/database/AcDbBlockTableRecord.d.ts +0 -185
- package/lib/database/AcDbBlockTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbBlockTableRecord.js +0 -261
- package/lib/database/AcDbBlockTableRecord.js.map +0 -1
- package/lib/database/AcDbDatabase.d.ts +0 -575
- package/lib/database/AcDbDatabase.d.ts.map +0 -1
- package/lib/database/AcDbDatabase.js +0 -833
- package/lib/database/AcDbDatabase.js.map +0 -1
- package/lib/database/AcDbDatabaseConverter.d.ts +0 -292
- package/lib/database/AcDbDatabaseConverter.d.ts.map +0 -1
- package/lib/database/AcDbDatabaseConverter.js +0 -447
- package/lib/database/AcDbDatabaseConverter.js.map +0 -1
- package/lib/database/AcDbDatabaseConverterManager.d.ts +0 -141
- package/lib/database/AcDbDatabaseConverterManager.d.ts.map +0 -1
- package/lib/database/AcDbDatabaseConverterManager.js +0 -173
- package/lib/database/AcDbDatabaseConverterManager.js.map +0 -1
- package/lib/database/AcDbDimStyleTable.d.ts +0 -31
- package/lib/database/AcDbDimStyleTable.d.ts.map +0 -1
- package/lib/database/AcDbDimStyleTable.js +0 -49
- package/lib/database/AcDbDimStyleTable.js.map +0 -1
- package/lib/database/AcDbDimStyleTableRecord.d.ts +0 -797
- package/lib/database/AcDbDimStyleTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbDimStyleTableRecord.js +0 -1294
- package/lib/database/AcDbDimStyleTableRecord.js.map +0 -1
- package/lib/database/AcDbDwgVersion.d.ts +0 -32
- package/lib/database/AcDbDwgVersion.d.ts.map +0 -1
- package/lib/database/AcDbDwgVersion.js +0 -76
- package/lib/database/AcDbDwgVersion.js.map +0 -1
- package/lib/database/AcDbLayerTable.d.ts +0 -51
- package/lib/database/AcDbLayerTable.d.ts.map +0 -1
- package/lib/database/AcDbLayerTable.js +0 -92
- package/lib/database/AcDbLayerTable.js.map +0 -1
- package/lib/database/AcDbLayerTableRecord.d.ts +0 -278
- package/lib/database/AcDbLayerTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbLayerTableRecord.js +0 -397
- package/lib/database/AcDbLayerTableRecord.js.map +0 -1
- package/lib/database/AcDbLinetypeTable.d.ts +0 -30
- package/lib/database/AcDbLinetypeTable.d.ts.map +0 -1
- package/lib/database/AcDbLinetypeTable.js +0 -48
- package/lib/database/AcDbLinetypeTable.js.map +0 -1
- package/lib/database/AcDbLinetypeTableRecord.d.ts +0 -79
- package/lib/database/AcDbLinetypeTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbLinetypeTableRecord.js +0 -129
- package/lib/database/AcDbLinetypeTableRecord.js.map +0 -1
- package/lib/database/AcDbSymbolTable.d.ts +0 -199
- package/lib/database/AcDbSymbolTable.d.ts.map +0 -1
- package/lib/database/AcDbSymbolTable.js +0 -264
- package/lib/database/AcDbSymbolTable.js.map +0 -1
- package/lib/database/AcDbSymbolTableRecord.d.ts +0 -61
- package/lib/database/AcDbSymbolTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbSymbolTableRecord.js +0 -82
- package/lib/database/AcDbSymbolTableRecord.js.map +0 -1
- package/lib/database/AcDbTextStyleTable.d.ts +0 -48
- package/lib/database/AcDbTextStyleTable.d.ts.map +0 -1
- package/lib/database/AcDbTextStyleTable.js +0 -112
- package/lib/database/AcDbTextStyleTable.js.map +0 -1
- package/lib/database/AcDbTextStyleTableRecord.d.ts +0 -179
- package/lib/database/AcDbTextStyleTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbTextStyleTableRecord.js +0 -276
- package/lib/database/AcDbTextStyleTableRecord.js.map +0 -1
- package/lib/database/AcDbViewportTable.d.ts +0 -31
- package/lib/database/AcDbViewportTable.d.ts.map +0 -1
- package/lib/database/AcDbViewportTable.js +0 -49
- package/lib/database/AcDbViewportTable.js.map +0 -1
- package/lib/database/AcDbViewportTableRecord.d.ts +0 -154
- package/lib/database/AcDbViewportTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbViewportTableRecord.js +0 -318
- package/lib/database/AcDbViewportTableRecord.js.map +0 -1
- package/lib/database/index.d.ts +0 -19
- package/lib/database/index.d.ts.map +0 -1
- package/lib/database/index.js +0 -19
- package/lib/database/index.js.map +0 -1
- package/lib/entity/AcDbArc.d.ts +0 -254
- package/lib/entity/AcDbArc.d.ts.map +0 -1
- package/lib/entity/AcDbArc.js +0 -340
- package/lib/entity/AcDbArc.js.map +0 -1
- package/lib/entity/AcDbBlockReference.d.ts +0 -190
- package/lib/entity/AcDbBlockReference.d.ts.map +0 -1
- package/lib/entity/AcDbBlockReference.js +0 -302
- package/lib/entity/AcDbBlockReference.js.map +0 -1
- package/lib/entity/AcDbCircle.d.ts +0 -186
- package/lib/entity/AcDbCircle.d.ts.map +0 -1
- package/lib/entity/AcDbCircle.js +0 -249
- package/lib/entity/AcDbCircle.js.map +0 -1
- package/lib/entity/AcDbCurve.d.ts +0 -42
- package/lib/entity/AcDbCurve.d.ts.map +0 -1
- package/lib/entity/AcDbCurve.js +0 -44
- package/lib/entity/AcDbCurve.js.map +0 -1
- package/lib/entity/AcDbEllipse.d.ts +0 -207
- package/lib/entity/AcDbEllipse.d.ts.map +0 -1
- package/lib/entity/AcDbEllipse.js +0 -272
- package/lib/entity/AcDbEllipse.js.map +0 -1
- package/lib/entity/AcDbEntity.d.ts +0 -385
- package/lib/entity/AcDbEntity.d.ts.map +0 -1
- package/lib/entity/AcDbEntity.js +0 -561
- package/lib/entity/AcDbEntity.js.map +0 -1
- package/lib/entity/AcDbFace.d.ts +0 -151
- package/lib/entity/AcDbFace.d.ts.map +0 -1
- package/lib/entity/AcDbFace.js +0 -224
- package/lib/entity/AcDbFace.js.map +0 -1
- package/lib/entity/AcDbHatch.d.ts +0 -174
- package/lib/entity/AcDbHatch.d.ts.map +0 -1
- package/lib/entity/AcDbHatch.js +0 -250
- package/lib/entity/AcDbHatch.js.map +0 -1
- package/lib/entity/AcDbLeader.d.ts +0 -243
- package/lib/entity/AcDbLeader.d.ts.map +0 -1
- package/lib/entity/AcDbLeader.js +0 -358
- package/lib/entity/AcDbLeader.js.map +0 -1
- package/lib/entity/AcDbLine.d.ts +0 -198
- package/lib/entity/AcDbLine.d.ts.map +0 -1
- package/lib/entity/AcDbLine.js +0 -300
- package/lib/entity/AcDbLine.js.map +0 -1
- package/lib/entity/AcDbMText.d.ts +0 -248
- package/lib/entity/AcDbMText.d.ts.map +0 -1
- package/lib/entity/AcDbMText.js +0 -414
- package/lib/entity/AcDbMText.js.map +0 -1
- package/lib/entity/AcDbPoint.d.ts +0 -113
- package/lib/entity/AcDbPoint.d.ts.map +0 -1
- package/lib/entity/AcDbPoint.js +0 -155
- package/lib/entity/AcDbPoint.js.map +0 -1
- package/lib/entity/AcDbPolyline.d.ts +0 -221
- package/lib/entity/AcDbPolyline.d.ts.map +0 -1
- package/lib/entity/AcDbPolyline.js +0 -301
- package/lib/entity/AcDbPolyline.js.map +0 -1
- package/lib/entity/AcDbRasterImage.d.ts +0 -216
- package/lib/entity/AcDbRasterImage.d.ts.map +0 -1
- package/lib/entity/AcDbRasterImage.js +0 -451
- package/lib/entity/AcDbRasterImage.js.map +0 -1
- package/lib/entity/AcDbRay.d.ts +0 -150
- package/lib/entity/AcDbRay.d.ts.map +0 -1
- package/lib/entity/AcDbRay.js +0 -208
- package/lib/entity/AcDbRay.js.map +0 -1
- package/lib/entity/AcDbSpline.d.ts +0 -135
- package/lib/entity/AcDbSpline.d.ts.map +0 -1
- package/lib/entity/AcDbSpline.js +0 -142
- package/lib/entity/AcDbSpline.js.map +0 -1
- package/lib/entity/AcDbTable.d.ts +0 -260
- package/lib/entity/AcDbTable.d.ts.map +0 -1
- package/lib/entity/AcDbTable.js +0 -452
- package/lib/entity/AcDbTable.js.map +0 -1
- package/lib/entity/AcDbText.d.ts +0 -388
- package/lib/entity/AcDbText.d.ts.map +0 -1
- package/lib/entity/AcDbText.js +0 -523
- package/lib/entity/AcDbText.js.map +0 -1
- package/lib/entity/AcDbTrace.d.ts +0 -193
- package/lib/entity/AcDbTrace.d.ts.map +0 -1
- package/lib/entity/AcDbTrace.js +0 -271
- package/lib/entity/AcDbTrace.js.map +0 -1
- package/lib/entity/AcDbViewport.d.ts +0 -173
- package/lib/entity/AcDbViewport.d.ts.map +0 -1
- package/lib/entity/AcDbViewport.js +0 -295
- package/lib/entity/AcDbViewport.js.map +0 -1
- package/lib/entity/AcDbWipeout.d.ts +0 -39
- package/lib/entity/AcDbWipeout.d.ts.map +0 -1
- package/lib/entity/AcDbWipeout.js +0 -70
- package/lib/entity/AcDbWipeout.js.map +0 -1
- package/lib/entity/AcDbXline.d.ts +0 -151
- package/lib/entity/AcDbXline.d.ts.map +0 -1
- package/lib/entity/AcDbXline.js +0 -209
- package/lib/entity/AcDbXline.js.map +0 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +0 -92
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.js +0 -157
- package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts +0 -220
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbAlignedDimension.js +0 -341
- package/lib/entity/dimension/AcDbAlignedDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbArcDimension.d.ts +0 -94
- package/lib/entity/dimension/AcDbArcDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbArcDimension.js +0 -159
- package/lib/entity/dimension/AcDbArcDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts +0 -145
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbDiametricDimension.js +0 -275
- package/lib/entity/dimension/AcDbDiametricDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbDimension.d.ts +0 -257
- package/lib/entity/dimension/AcDbDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbDimension.js +0 -466
- package/lib/entity/dimension/AcDbDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +0 -78
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.js +0 -133
- package/lib/entity/dimension/AcDbOrdinateDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbRadialDimension.d.ts +0 -214
- package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbRadialDimension.js +0 -288
- package/lib/entity/dimension/AcDbRadialDimension.js.map +0 -1
- package/lib/entity/dimension/index.d.ts +0 -8
- package/lib/entity/dimension/index.d.ts.map +0 -1
- package/lib/entity/dimension/index.js +0 -8
- package/lib/entity/dimension/index.js.map +0 -1
- package/lib/entity/index.d.ts +0 -24
- package/lib/entity/index.d.ts.map +0 -1
- package/lib/entity/index.js +0 -24
- package/lib/entity/index.js.map +0 -1
- package/lib/index.d.ts +0 -10
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -10
- package/lib/index.js.map +0 -1
- package/lib/misc/AcDbAngleUnits.d.ts +0 -20
- package/lib/misc/AcDbAngleUnits.d.ts.map +0 -1
- package/lib/misc/AcDbAngleUnits.js +0 -21
- package/lib/misc/AcDbAngleUnits.js.map +0 -1
- package/lib/misc/AcDbCodePage.d.ts +0 -50
- package/lib/misc/AcDbCodePage.d.ts.map +0 -1
- package/lib/misc/AcDbCodePage.js +0 -100
- package/lib/misc/AcDbCodePage.js.map +0 -1
- package/lib/misc/AcDbConstants.d.ts +0 -24
- package/lib/misc/AcDbConstants.d.ts.map +0 -1
- package/lib/misc/AcDbConstants.js +0 -24
- package/lib/misc/AcDbConstants.js.map +0 -1
- package/lib/misc/AcDbDimArrowType.d.ts +0 -89
- package/lib/misc/AcDbDimArrowType.d.ts.map +0 -1
- package/lib/misc/AcDbDimArrowType.js +0 -90
- package/lib/misc/AcDbDimArrowType.js.map +0 -1
- package/lib/misc/AcDbObjectIterator.d.ts +0 -55
- package/lib/misc/AcDbObjectIterator.d.ts.map +0 -1
- package/lib/misc/AcDbObjectIterator.js +0 -67
- package/lib/misc/AcDbObjectIterator.js.map +0 -1
- package/lib/misc/AcDbOsnapMode.d.ts +0 -51
- package/lib/misc/AcDbOsnapMode.d.ts.map +0 -1
- package/lib/misc/AcDbOsnapMode.js +0 -52
- package/lib/misc/AcDbOsnapMode.js.map +0 -1
- package/lib/misc/AcDbRenderingCache.d.ts +0 -141
- package/lib/misc/AcDbRenderingCache.d.ts.map +0 -1
- package/lib/misc/AcDbRenderingCache.js +0 -239
- package/lib/misc/AcDbRenderingCache.js.map +0 -1
- package/lib/misc/AcDbUnitsValue.d.ts +0 -101
- package/lib/misc/AcDbUnitsValue.d.ts.map +0 -1
- package/lib/misc/AcDbUnitsValue.js +0 -121
- package/lib/misc/AcDbUnitsValue.js.map +0 -1
- package/lib/misc/index.d.ts +0 -9
- package/lib/misc/index.d.ts.map +0 -1
- package/lib/misc/index.js +0 -9
- package/lib/misc/index.js.map +0 -1
- package/lib/object/AcDbDictionary.d.ts +0 -178
- package/lib/object/AcDbDictionary.d.ts.map +0 -1
- package/lib/object/AcDbDictionary.js +0 -264
- package/lib/object/AcDbDictionary.js.map +0 -1
- package/lib/object/AcDbRasterImageDef.d.ts +0 -54
- package/lib/object/AcDbRasterImageDef.d.ts.map +0 -1
- package/lib/object/AcDbRasterImageDef.js +0 -82
- package/lib/object/AcDbRasterImageDef.js.map +0 -1
- package/lib/object/index.d.ts +0 -4
- package/lib/object/index.d.ts.map +0 -1
- package/lib/object/index.js +0 -4
- package/lib/object/index.js.map +0 -1
- package/lib/object/layout/AcDbLayout.d.ts +0 -190
- package/lib/object/layout/AcDbLayout.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayout.js +0 -253
- package/lib/object/layout/AcDbLayout.js.map +0 -1
- package/lib/object/layout/AcDbLayoutDictionary.d.ts +0 -47
- package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayoutDictionary.js +0 -122
- package/lib/object/layout/AcDbLayoutDictionary.js.map +0 -1
- package/lib/object/layout/AcDbLayoutManager.d.ts +0 -188
- package/lib/object/layout/AcDbLayoutManager.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayoutManager.js +0 -245
- package/lib/object/layout/AcDbLayoutManager.js.map +0 -1
- package/lib/object/layout/index.d.ts +0 -4
- package/lib/object/layout/index.d.ts.map +0 -1
- package/lib/object/layout/index.js +0 -4
- package/lib/object/layout/index.js.map +0 -1
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __values = (this && this.__values) || function(o) {
|
|
17
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
18
|
-
if (m) return m.call(o);
|
|
19
|
-
if (o && typeof o.length === "number") return {
|
|
20
|
-
next: function () {
|
|
21
|
-
if (o && i >= o.length) o = void 0;
|
|
22
|
-
return { value: o && o[i++], done: !o };
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
26
|
-
};
|
|
27
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
28
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
29
|
-
if (!m) return o;
|
|
30
|
-
var i = m.call(o), r, ar = [], e;
|
|
31
|
-
try {
|
|
32
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
33
|
-
}
|
|
34
|
-
catch (error) { e = { error: error }; }
|
|
35
|
-
finally {
|
|
36
|
-
try {
|
|
37
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
38
|
-
}
|
|
39
|
-
finally { if (e) throw e.error; }
|
|
40
|
-
}
|
|
41
|
-
return ar;
|
|
42
|
-
};
|
|
43
|
-
import { AcDbDictionary } from '../AcDbDictionary';
|
|
44
|
-
/**
|
|
45
|
-
* Dictionary for storing and managing AcDbLayout objects.
|
|
46
|
-
*
|
|
47
|
-
* This class extends AcDbDictionary to provide specialized functionality
|
|
48
|
-
* for managing layout objects, including searching by block table record ID
|
|
49
|
-
* and tracking the maximum tab order.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* const layoutDict = new AcDbLayoutDictionary(database);
|
|
54
|
-
* const layout = layoutDict.getBtrIdAt('some-block-id');
|
|
55
|
-
* const maxOrder = layoutDict.maxTabOrder;
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
var AcDbLayoutDictionary = /** @class */ (function (_super) {
|
|
59
|
-
__extends(AcDbLayoutDictionary, _super);
|
|
60
|
-
function AcDbLayoutDictionary() {
|
|
61
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Searches the dictionary for a layout associated with the specified block table record ID.
|
|
65
|
-
*
|
|
66
|
-
* @param id - The block table record ID to search for
|
|
67
|
-
* @returns The layout associated with the block table record ID, or undefined if not found
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```typescript
|
|
71
|
-
* const layout = layoutDict.getBtrIdAt('some-block-id');
|
|
72
|
-
* if (layout) {
|
|
73
|
-
* console.log('Found layout:', layout.layoutName);
|
|
74
|
-
* }
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
AcDbLayoutDictionary.prototype.getBtrIdAt = function (id) {
|
|
78
|
-
var e_1, _a;
|
|
79
|
-
try {
|
|
80
|
-
for (var _b = __values(this._recordsByName), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
81
|
-
var _d = __read(_c.value, 2), _ = _d[0], layout = _d[1];
|
|
82
|
-
if (layout.blockTableRecordId == id)
|
|
83
|
-
return layout;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
87
|
-
finally {
|
|
88
|
-
try {
|
|
89
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
90
|
-
}
|
|
91
|
-
finally { if (e_1) throw e_1.error; }
|
|
92
|
-
}
|
|
93
|
-
return undefined;
|
|
94
|
-
};
|
|
95
|
-
Object.defineProperty(AcDbLayoutDictionary.prototype, "maxTabOrder", {
|
|
96
|
-
/**
|
|
97
|
-
* Gets the maximum tab order value of layouts in the layout dictionary.
|
|
98
|
-
*
|
|
99
|
-
* @returns The maximum tab order value, or -1 if no layouts exist
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```typescript
|
|
103
|
-
* const maxOrder = layoutDict.maxTabOrder;
|
|
104
|
-
* console.log('Maximum tab order:', maxOrder);
|
|
105
|
-
* ```
|
|
106
|
-
*/
|
|
107
|
-
get: function () {
|
|
108
|
-
var maxValue = -1;
|
|
109
|
-
this._recordsByName.forEach(function (layout) {
|
|
110
|
-
if (layout.tabOrder > maxValue) {
|
|
111
|
-
maxValue = layout.tabOrder;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
return maxValue;
|
|
115
|
-
},
|
|
116
|
-
enumerable: false,
|
|
117
|
-
configurable: true
|
|
118
|
-
});
|
|
119
|
-
return AcDbLayoutDictionary;
|
|
120
|
-
}(AcDbDictionary));
|
|
121
|
-
export { AcDbLayoutDictionary };
|
|
122
|
-
//# sourceMappingURL=AcDbLayoutDictionary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbLayoutDictionary.js","sourceRoot":"","sources":["../../../src/object/layout/AcDbLayoutDictionary.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGlD;;;;;;;;;;;;;GAaG;AACH;IAA0C,wCAA0B;IAApE;;IA0CA,CAAC;IAzCC;;;;;;;;;;;;;OAaG;IACH,yCAAU,GAAV,UAAW,EAAgB;;;YACzB,KAA0B,IAAA,KAAA,SAAA,IAAI,CAAC,cAAc,CAAA,gBAAA,4BAAE,CAAC;gBAArC,IAAA,KAAA,mBAAW,EAAV,CAAC,QAAA,EAAE,MAAM,QAAA;gBACnB,IAAI,MAAM,CAAC,kBAAkB,IAAI,EAAE;oBAAE,OAAO,MAAM,CAAA;YACpD,CAAC;;;;;;;;;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAaD,sBAAI,6CAAW;QAXf;;;;;;;;;;WAUG;aACH;YACE,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAA;YACjB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAA,MAAM;gBAChC,IAAI,MAAM,CAAC,QAAQ,GAAG,QAAQ,EAAE,CAAC;oBAC/B,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAA;gBAC5B,CAAC;YACH,CAAC,CAAC,CAAA;YACF,OAAO,QAAQ,CAAA;QACjB,CAAC;;;OAAA;IACH,2BAAC;AAAD,CAAC,AA1CD,CAA0C,cAAc,GA0CvD"}
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { AcCmEventManager } from '@mlightcad/common';
|
|
2
|
-
import { AcDbObjectId } from '../../base';
|
|
3
|
-
import { AcDbBlockTableRecord, AcDbDatabase } from '../../database';
|
|
4
|
-
import { AcDbLayout } from './AcDbLayout';
|
|
5
|
-
/**
|
|
6
|
-
* Event arguments for layout-related events.
|
|
7
|
-
*/
|
|
8
|
-
export interface AcDbLayoutEventArgs {
|
|
9
|
-
/** The layout involved in the event */
|
|
10
|
-
layout: AcDbLayout;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Event arguments for layout-renamed events.
|
|
14
|
-
*/
|
|
15
|
-
export interface AcDbLayoutRenamedEventArgs {
|
|
16
|
-
/** The layout involved in the event */
|
|
17
|
-
layout: AcDbLayout;
|
|
18
|
-
/** The old name of the layout */
|
|
19
|
-
oldName: string;
|
|
20
|
-
/** The new name of the layout */
|
|
21
|
-
newName: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Manages layout objects in a drawing database.
|
|
25
|
-
*
|
|
26
|
-
* This class provides functionality for managing layouts, including creating,
|
|
27
|
-
* finding, renaming, and switching between layouts. It also provides event
|
|
28
|
-
* notifications when layouts are switched.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```typescript
|
|
32
|
-
* const layoutManager = new AcDbLayoutManager();
|
|
33
|
-
* const layoutCount = layoutManager.countLayouts();
|
|
34
|
-
* const activeLayout = layoutManager.findActiveLayout();
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare class AcDbLayoutManager {
|
|
38
|
-
/**
|
|
39
|
-
* Events that can be triggered by the layout manager.
|
|
40
|
-
*
|
|
41
|
-
* These events allow applications to respond to layout changes.
|
|
42
|
-
*/
|
|
43
|
-
readonly events: {
|
|
44
|
-
/** Fired when the layout is created */
|
|
45
|
-
layoutCreated: AcCmEventManager<AcDbLayoutEventArgs>;
|
|
46
|
-
/** Fired when the layout is removed */
|
|
47
|
-
layoutRemoved: AcCmEventManager<AcDbLayoutEventArgs>;
|
|
48
|
-
/** Fired when the layout is renamed */
|
|
49
|
-
layoutRenamed: AcCmEventManager<AcDbLayoutRenamedEventArgs>;
|
|
50
|
-
/** Fired when the layout is switched */
|
|
51
|
-
layoutSwitched: AcCmEventManager<AcDbLayoutEventArgs>;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Gets the number of layouts in the layout dictionary.
|
|
55
|
-
*
|
|
56
|
-
* This includes the Model tab, which is always present.
|
|
57
|
-
*
|
|
58
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
59
|
-
* @returns The number of layouts in the dictionary
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```typescript
|
|
63
|
-
* const count = layoutManager.countLayouts();
|
|
64
|
-
* console.log(`Number of layouts: ${count}`);
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
countLayouts(db?: AcDbDatabase): number;
|
|
68
|
-
/**
|
|
69
|
-
* Finds a layout by name in the database.
|
|
70
|
-
*
|
|
71
|
-
* @param name - Name of the layout to find
|
|
72
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
73
|
-
* @returns The layout object, or undefined if not found
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```typescript
|
|
77
|
-
* const layout = layoutManager.findLayoutNamed('A4 Landscape');
|
|
78
|
-
* if (layout) {
|
|
79
|
-
* console.log('Found layout:', layout.layoutName);
|
|
80
|
-
* }
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
findLayoutNamed(name: string, db?: AcDbDatabase): AcDbLayout | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* Gets the name of the active layout in the database.
|
|
86
|
-
*
|
|
87
|
-
* @returns The name of the active layout, or 'Model' if no layout is active
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
* ```typescript
|
|
91
|
-
* const activeLayoutName = layoutManager.findActiveLayout();
|
|
92
|
-
* console.log('Active layout:', activeLayoutName);
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
findActiveLayout(): string;
|
|
96
|
-
/**
|
|
97
|
-
* Makes the layout object associated with the given object ID the current layout.
|
|
98
|
-
*
|
|
99
|
-
* @param id - Object ID for the layout object to make current
|
|
100
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
101
|
-
* @returns True if setting the current layout was successful, false otherwise
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* ```typescript
|
|
105
|
-
* const success = layoutManager.setCurrentLayoutId('some-layout-id');
|
|
106
|
-
* if (success) {
|
|
107
|
-
* console.log('Layout switched successfully');
|
|
108
|
-
* }
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
setCurrentLayoutId(id: AcDbObjectId, db?: AcDbDatabase): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Makes the layout object associated with the given block table record ID the current layout.
|
|
114
|
-
*
|
|
115
|
-
* @param id - Block table record ID for the layout object to make current
|
|
116
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
117
|
-
* @returns True if setting the current layout was successful, false otherwise
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```typescript
|
|
121
|
-
* const success = layoutManager.setCurrentLayoutBtrId('some-block-id');
|
|
122
|
-
* ```
|
|
123
|
-
*/
|
|
124
|
-
setCurrentLayoutBtrId(id: AcDbObjectId, db?: AcDbDatabase): boolean;
|
|
125
|
-
/**
|
|
126
|
-
* Sets the layout named 'name' as the current layout in the database.
|
|
127
|
-
*
|
|
128
|
-
* @param name - Name of the layout to make current
|
|
129
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
130
|
-
* @returns True if setting the current layout was successful, false otherwise
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* ```typescript
|
|
134
|
-
* const success = layoutManager.setCurrentLayout('A4 Landscape');
|
|
135
|
-
* ```
|
|
136
|
-
*/
|
|
137
|
-
setCurrentLayout(name: string, db?: AcDbDatabase): boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Renames a layout in the database.
|
|
140
|
-
*
|
|
141
|
-
* @param oldName - Current name of the layout to rename
|
|
142
|
-
* @param newName - New name for the layout
|
|
143
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
144
|
-
* @returns True if the layout was renamed successfully, false otherwise
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* ```typescript
|
|
148
|
-
* const success = layoutManager.renameLayout('Old Name', 'New Name');
|
|
149
|
-
* ```
|
|
150
|
-
*/
|
|
151
|
-
renameLayout(oldName: string, newName: string, db?: AcDbDatabase): boolean;
|
|
152
|
-
/**
|
|
153
|
-
* Return true if the layout named 'name' is found in the database 'db' (or the
|
|
154
|
-
* workingDatabase if 'db' isn't provided).
|
|
155
|
-
* @param name Input name of layout to find.
|
|
156
|
-
* @param db Input drawing database to use. Default is the current database.
|
|
157
|
-
* @returns Return true if the layout named name is found in the database 'db'
|
|
158
|
-
* (or the workingDatabase if 'db' isn't provided).
|
|
159
|
-
*/
|
|
160
|
-
layoutExists(name: string, db?: AcDbDatabase): boolean;
|
|
161
|
-
/**
|
|
162
|
-
* Delete the layout named 'name' from the database 'db' (or the workingDatabase
|
|
163
|
-
* if 'db' isn't provided).
|
|
164
|
-
* @param name Input name of layout to delete.
|
|
165
|
-
* @param db Input drawing database to use. Default is the current database.
|
|
166
|
-
* @returns
|
|
167
|
-
*/
|
|
168
|
-
deleteLayout(name: string, db?: AcDbDatabase): boolean;
|
|
169
|
-
/**
|
|
170
|
-
* Create a new AcDbLayout object given a unique layout name.
|
|
171
|
-
* @param name Input name to give new AcDbLayout object
|
|
172
|
-
* @param db Input drawing database to use. Default is the current database.
|
|
173
|
-
* @returns Return newly created layout and its associated block table record.
|
|
174
|
-
*/
|
|
175
|
-
createLayout(name: string, db?: AcDbDatabase): {
|
|
176
|
-
layout: AcDbLayout;
|
|
177
|
-
btr: AcDbBlockTableRecord;
|
|
178
|
-
};
|
|
179
|
-
/**
|
|
180
|
-
* Get active layout in the database 'db' (or the workingDatabase if 'db' isn't provided).
|
|
181
|
-
* @param db Input drawing database to use. Default is the current database.
|
|
182
|
-
* @returns Return active layout if found. Otherwise, return undefined.
|
|
183
|
-
*/
|
|
184
|
-
getActiveLayout(db?: AcDbDatabase): AcDbLayout | undefined;
|
|
185
|
-
private getWorkingDatabase;
|
|
186
|
-
private setCurrentLayoutInternal;
|
|
187
|
-
}
|
|
188
|
-
//# sourceMappingURL=AcDbLayoutManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbLayoutManager.d.ts","sourceRoot":"","sources":["../../../src/object/layout/AcDbLayoutManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAA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AAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY;IAI5C;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY;IAe5C;;;;;OAKG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY;;;;IAoB5C;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,EAAE,YAAY;IAKjC,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,wBAAwB;CAajC"}
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { AcCmEventManager } from '@mlightcad/common';
|
|
2
|
-
import { acdbHostApplicationServices } from '../../base';
|
|
3
|
-
import { AcDbBlockTableRecord } from '../../database';
|
|
4
|
-
import { AcDbLayout } from './AcDbLayout';
|
|
5
|
-
/**
|
|
6
|
-
* Manages layout objects in a drawing database.
|
|
7
|
-
*
|
|
8
|
-
* This class provides functionality for managing layouts, including creating,
|
|
9
|
-
* finding, renaming, and switching between layouts. It also provides event
|
|
10
|
-
* notifications when layouts are switched.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* const layoutManager = new AcDbLayoutManager();
|
|
15
|
-
* const layoutCount = layoutManager.countLayouts();
|
|
16
|
-
* const activeLayout = layoutManager.findActiveLayout();
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
var AcDbLayoutManager = /** @class */ (function () {
|
|
20
|
-
function AcDbLayoutManager() {
|
|
21
|
-
/**
|
|
22
|
-
* Events that can be triggered by the layout manager.
|
|
23
|
-
*
|
|
24
|
-
* These events allow applications to respond to layout changes.
|
|
25
|
-
*/
|
|
26
|
-
this.events = {
|
|
27
|
-
/** Fired when the layout is created */
|
|
28
|
-
layoutCreated: new AcCmEventManager(),
|
|
29
|
-
/** Fired when the layout is removed */
|
|
30
|
-
layoutRemoved: new AcCmEventManager(),
|
|
31
|
-
/** Fired when the layout is renamed */
|
|
32
|
-
layoutRenamed: new AcCmEventManager(),
|
|
33
|
-
/** Fired when the layout is switched */
|
|
34
|
-
layoutSwitched: new AcCmEventManager()
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Gets the number of layouts in the layout dictionary.
|
|
39
|
-
*
|
|
40
|
-
* This includes the Model tab, which is always present.
|
|
41
|
-
*
|
|
42
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
43
|
-
* @returns The number of layouts in the dictionary
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
* const count = layoutManager.countLayouts();
|
|
48
|
-
* console.log(`Number of layouts: ${count}`);
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
AcDbLayoutManager.prototype.countLayouts = function (db) {
|
|
52
|
-
return this.getWorkingDatabase(db).dictionaries.layouts.numEntries;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Finds a layout by name in the database.
|
|
56
|
-
*
|
|
57
|
-
* @param name - Name of the layout to find
|
|
58
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
59
|
-
* @returns The layout object, or undefined if not found
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```typescript
|
|
63
|
-
* const layout = layoutManager.findLayoutNamed('A4 Landscape');
|
|
64
|
-
* if (layout) {
|
|
65
|
-
* console.log('Found layout:', layout.layoutName);
|
|
66
|
-
* }
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
AcDbLayoutManager.prototype.findLayoutNamed = function (name, db) {
|
|
70
|
-
return this.getWorkingDatabase(db).dictionaries.layouts.getAt(name);
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Gets the name of the active layout in the database.
|
|
74
|
-
*
|
|
75
|
-
* @returns The name of the active layout, or 'Model' if no layout is active
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* ```typescript
|
|
79
|
-
* const activeLayoutName = layoutManager.findActiveLayout();
|
|
80
|
-
* console.log('Active layout:', activeLayoutName);
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
AcDbLayoutManager.prototype.findActiveLayout = function () {
|
|
84
|
-
var layout = this.getActiveLayout();
|
|
85
|
-
return layout ? layout.layoutName : 'Model';
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Makes the layout object associated with the given object ID the current layout.
|
|
89
|
-
*
|
|
90
|
-
* @param id - Object ID for the layout object to make current
|
|
91
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
92
|
-
* @returns True if setting the current layout was successful, false otherwise
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```typescript
|
|
96
|
-
* const success = layoutManager.setCurrentLayoutId('some-layout-id');
|
|
97
|
-
* if (success) {
|
|
98
|
-
* console.log('Layout switched successfully');
|
|
99
|
-
* }
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
AcDbLayoutManager.prototype.setCurrentLayoutId = function (id, db) {
|
|
103
|
-
var currentDb = this.getWorkingDatabase(db);
|
|
104
|
-
var layout = currentDb.dictionaries.layouts.getIdAt(id);
|
|
105
|
-
return this.setCurrentLayoutInternal(layout, currentDb);
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Makes the layout object associated with the given block table record ID the current layout.
|
|
109
|
-
*
|
|
110
|
-
* @param id - Block table record ID for the layout object to make current
|
|
111
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
112
|
-
* @returns True if setting the current layout was successful, false otherwise
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
* ```typescript
|
|
116
|
-
* const success = layoutManager.setCurrentLayoutBtrId('some-block-id');
|
|
117
|
-
* ```
|
|
118
|
-
*/
|
|
119
|
-
AcDbLayoutManager.prototype.setCurrentLayoutBtrId = function (id, db) {
|
|
120
|
-
var currentDb = this.getWorkingDatabase(db);
|
|
121
|
-
var layout = currentDb.dictionaries.layouts.getBtrIdAt(id);
|
|
122
|
-
return this.setCurrentLayoutInternal(layout, currentDb);
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Sets the layout named 'name' as the current layout in the database.
|
|
126
|
-
*
|
|
127
|
-
* @param name - Name of the layout to make current
|
|
128
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
129
|
-
* @returns True if setting the current layout was successful, false otherwise
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```typescript
|
|
133
|
-
* const success = layoutManager.setCurrentLayout('A4 Landscape');
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
AcDbLayoutManager.prototype.setCurrentLayout = function (name, db) {
|
|
137
|
-
var currentDb = this.getWorkingDatabase(db);
|
|
138
|
-
var layout = currentDb.dictionaries.layouts.getAt(name);
|
|
139
|
-
return this.setCurrentLayoutInternal(layout, currentDb);
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Renames a layout in the database.
|
|
143
|
-
*
|
|
144
|
-
* @param oldName - Current name of the layout to rename
|
|
145
|
-
* @param newName - New name for the layout
|
|
146
|
-
* @param db - Drawing database to use (defaults to the current database)
|
|
147
|
-
* @returns True if the layout was renamed successfully, false otherwise
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```typescript
|
|
151
|
-
* const success = layoutManager.renameLayout('Old Name', 'New Name');
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
AcDbLayoutManager.prototype.renameLayout = function (oldName, newName, db) {
|
|
155
|
-
var currentDb = this.getWorkingDatabase(db);
|
|
156
|
-
var layout = currentDb.dictionaries.layouts.getAt(oldName);
|
|
157
|
-
if (layout) {
|
|
158
|
-
layout.layoutName = newName;
|
|
159
|
-
this.events.layoutRenamed.dispatch({
|
|
160
|
-
layout: layout,
|
|
161
|
-
oldName: oldName,
|
|
162
|
-
newName: newName
|
|
163
|
-
});
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
return false;
|
|
167
|
-
};
|
|
168
|
-
/**
|
|
169
|
-
* Return true if the layout named 'name' is found in the database 'db' (or the
|
|
170
|
-
* workingDatabase if 'db' isn't provided).
|
|
171
|
-
* @param name Input name of layout to find.
|
|
172
|
-
* @param db Input drawing database to use. Default is the current database.
|
|
173
|
-
* @returns Return true if the layout named name is found in the database 'db'
|
|
174
|
-
* (or the workingDatabase if 'db' isn't provided).
|
|
175
|
-
*/
|
|
176
|
-
AcDbLayoutManager.prototype.layoutExists = function (name, db) {
|
|
177
|
-
return this.getWorkingDatabase(db).dictionaries.layouts.has(name);
|
|
178
|
-
};
|
|
179
|
-
/**
|
|
180
|
-
* Delete the layout named 'name' from the database 'db' (or the workingDatabase
|
|
181
|
-
* if 'db' isn't provided).
|
|
182
|
-
* @param name Input name of layout to delete.
|
|
183
|
-
* @param db Input drawing database to use. Default is the current database.
|
|
184
|
-
* @returns
|
|
185
|
-
*/
|
|
186
|
-
AcDbLayoutManager.prototype.deleteLayout = function (name, db) {
|
|
187
|
-
var layouts = this.getWorkingDatabase(db).dictionaries.layouts;
|
|
188
|
-
var layout = layouts.getAt(name);
|
|
189
|
-
var result = false;
|
|
190
|
-
if (layout) {
|
|
191
|
-
result = layouts.remove(name);
|
|
192
|
-
if (result) {
|
|
193
|
-
this.events.layoutRemoved.dispatch({
|
|
194
|
-
layout: layout
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return result;
|
|
199
|
-
};
|
|
200
|
-
/**
|
|
201
|
-
* Create a new AcDbLayout object given a unique layout name.
|
|
202
|
-
* @param name Input name to give new AcDbLayout object
|
|
203
|
-
* @param db Input drawing database to use. Default is the current database.
|
|
204
|
-
* @returns Return newly created layout and its associated block table record.
|
|
205
|
-
*/
|
|
206
|
-
AcDbLayoutManager.prototype.createLayout = function (name, db) {
|
|
207
|
-
var currentDb = this.getWorkingDatabase(db);
|
|
208
|
-
var layout = new AcDbLayout();
|
|
209
|
-
layout.layoutName = name;
|
|
210
|
-
layout.tabOrder = currentDb.dictionaries.layouts.maxTabOrder;
|
|
211
|
-
var btr = new AcDbBlockTableRecord();
|
|
212
|
-
btr.name = "*Paper_Space".concat(layout.tabOrder);
|
|
213
|
-
currentDb.tables.blockTable.add(btr);
|
|
214
|
-
currentDb.dictionaries.layouts.setAt(name, layout);
|
|
215
|
-
this.events.layoutCreated.dispatch({
|
|
216
|
-
layout: layout
|
|
217
|
-
});
|
|
218
|
-
return { layout: layout, btr: btr };
|
|
219
|
-
};
|
|
220
|
-
/**
|
|
221
|
-
* Get active layout in the database 'db' (or the workingDatabase if 'db' isn't provided).
|
|
222
|
-
* @param db Input drawing database to use. Default is the current database.
|
|
223
|
-
* @returns Return active layout if found. Otherwise, return undefined.
|
|
224
|
-
*/
|
|
225
|
-
AcDbLayoutManager.prototype.getActiveLayout = function (db) {
|
|
226
|
-
var currentDb = this.getWorkingDatabase(db);
|
|
227
|
-
return currentDb.dictionaries.layouts.getBtrIdAt(currentDb.currentSpaceId);
|
|
228
|
-
};
|
|
229
|
-
AcDbLayoutManager.prototype.getWorkingDatabase = function (db) {
|
|
230
|
-
return db || acdbHostApplicationServices().workingDatabase;
|
|
231
|
-
};
|
|
232
|
-
AcDbLayoutManager.prototype.setCurrentLayoutInternal = function (layout, currentDb) {
|
|
233
|
-
if (layout) {
|
|
234
|
-
this.events.layoutSwitched.dispatch({
|
|
235
|
-
layout: layout
|
|
236
|
-
});
|
|
237
|
-
currentDb.currentSpaceId = layout.blockTableRecordId;
|
|
238
|
-
return true;
|
|
239
|
-
}
|
|
240
|
-
return false;
|
|
241
|
-
};
|
|
242
|
-
return AcDbLayoutManager;
|
|
243
|
-
}());
|
|
244
|
-
export { AcDbLayoutManager };
|
|
245
|
-
//# sourceMappingURL=AcDbLayoutManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbLayoutManager.js","sourceRoot":"","sources":["../../../src/object/layout/AcDbLayoutManager.ts"],"names":[],"mappings":"AAAA,O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sourceRoot":"","sources":["../../../src/object/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
|