@mlightcad/data-model 1.0.0

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.
Files changed (301) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +116 -0
  3. package/dist/data-model.js +19887 -0
  4. package/dist/data-model.umd.cjs +5 -0
  5. package/lib/base/AcDbHostApplicationServices.d.ts +30 -0
  6. package/lib/base/AcDbHostApplicationServices.d.ts.map +1 -0
  7. package/lib/base/AcDbHostApplicationServices.js +54 -0
  8. package/lib/base/AcDbHostApplicationServices.js.map +1 -0
  9. package/lib/base/AcDbObject.d.ts +70 -0
  10. package/lib/base/AcDbObject.d.ts.map +1 -0
  11. package/lib/base/AcDbObject.js +113 -0
  12. package/lib/base/AcDbObject.js.map +1 -0
  13. package/lib/base/index.d.ts +3 -0
  14. package/lib/base/index.d.ts.map +1 -0
  15. package/lib/base/index.js +3 -0
  16. package/lib/base/index.js.map +1 -0
  17. package/lib/converter/AcDbBatchProcessing.d.ts +43 -0
  18. package/lib/converter/AcDbBatchProcessing.d.ts.map +1 -0
  19. package/lib/converter/AcDbBatchProcessing.js +165 -0
  20. package/lib/converter/AcDbBatchProcessing.js.map +1 -0
  21. package/lib/converter/AcDbDxfConverter.d.ts +39 -0
  22. package/lib/converter/AcDbDxfConverter.d.ts.map +1 -0
  23. package/lib/converter/AcDbDxfConverter.js +567 -0
  24. package/lib/converter/AcDbDxfConverter.js.map +1 -0
  25. package/lib/converter/AcDbDxfParseWorker.d.ts +2 -0
  26. package/lib/converter/AcDbDxfParseWorker.d.ts.map +1 -0
  27. package/lib/converter/AcDbDxfParseWorker.js +6 -0
  28. package/lib/converter/AcDbDxfParseWorker.js.map +1 -0
  29. package/lib/converter/AcDbEntitiyConverter.d.ts +36 -0
  30. package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -0
  31. package/lib/converter/AcDbEntitiyConverter.js +491 -0
  32. package/lib/converter/AcDbEntitiyConverter.js.map +1 -0
  33. package/lib/converter/AcDbObjectConverter.d.ts +9 -0
  34. package/lib/converter/AcDbObjectConverter.d.ts.map +1 -0
  35. package/lib/converter/AcDbObjectConverter.js +30 -0
  36. package/lib/converter/AcDbObjectConverter.js.map +1 -0
  37. package/lib/converter/index.d.ts +3 -0
  38. package/lib/converter/index.d.ts.map +1 -0
  39. package/lib/converter/index.js +3 -0
  40. package/lib/converter/index.js.map +1 -0
  41. package/lib/database/AcDbBlockTable.d.ts +15 -0
  42. package/lib/database/AcDbBlockTable.d.ts.map +1 -0
  43. package/lib/database/AcDbBlockTable.js +46 -0
  44. package/lib/database/AcDbBlockTable.js.map +1 -0
  45. package/lib/database/AcDbBlockTableRecord.d.ts +49 -0
  46. package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -0
  47. package/lib/database/AcDbBlockTableRecord.js +108 -0
  48. package/lib/database/AcDbBlockTableRecord.js.map +1 -0
  49. package/lib/database/AcDbDatabase.d.ts +211 -0
  50. package/lib/database/AcDbDatabase.d.ts.map +1 -0
  51. package/lib/database/AcDbDatabase.js +395 -0
  52. package/lib/database/AcDbDatabase.js.map +1 -0
  53. package/lib/database/AcDbDatabaseConverter.d.ts +120 -0
  54. package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -0
  55. package/lib/database/AcDbDatabaseConverter.js +376 -0
  56. package/lib/database/AcDbDatabaseConverter.js.map +1 -0
  57. package/lib/database/AcDbDatabaseConverterManager.d.ts +59 -0
  58. package/lib/database/AcDbDatabaseConverterManager.d.ts.map +1 -0
  59. package/lib/database/AcDbDatabaseConverterManager.js +98 -0
  60. package/lib/database/AcDbDatabaseConverterManager.js.map +1 -0
  61. package/lib/database/AcDbDatabaseConverterRegister.d.ts +54 -0
  62. package/lib/database/AcDbDatabaseConverterRegister.d.ts.map +1 -0
  63. package/lib/database/AcDbDatabaseConverterRegister.js +84 -0
  64. package/lib/database/AcDbDatabaseConverterRegister.js.map +1 -0
  65. package/lib/database/AcDbDimStyleTable.d.ts +11 -0
  66. package/lib/database/AcDbDimStyleTable.d.ts.map +1 -0
  67. package/lib/database/AcDbDimStyleTable.js +29 -0
  68. package/lib/database/AcDbDimStyleTable.js.map +1 -0
  69. package/lib/database/AcDbDimStyleTableRecord.d.ts +682 -0
  70. package/lib/database/AcDbDimStyleTableRecord.d.ts.map +1 -0
  71. package/lib/database/AcDbDimStyleTableRecord.js +1250 -0
  72. package/lib/database/AcDbDimStyleTableRecord.js.map +1 -0
  73. package/lib/database/AcDbLayerTable.d.ts +14 -0
  74. package/lib/database/AcDbLayerTable.d.ts.map +1 -0
  75. package/lib/database/AcDbLayerTable.js +55 -0
  76. package/lib/database/AcDbLayerTable.js.map +1 -0
  77. package/lib/database/AcDbLayerTableRecord.d.ts +98 -0
  78. package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -0
  79. package/lib/database/AcDbLayerTableRecord.js +235 -0
  80. package/lib/database/AcDbLayerTableRecord.js.map +1 -0
  81. package/lib/database/AcDbLinetypeTable.d.ts +11 -0
  82. package/lib/database/AcDbLinetypeTable.d.ts.map +1 -0
  83. package/lib/database/AcDbLinetypeTable.js +29 -0
  84. package/lib/database/AcDbLinetypeTable.js.map +1 -0
  85. package/lib/database/AcDbLinetypeTableRecord.d.ts +47 -0
  86. package/lib/database/AcDbLinetypeTableRecord.d.ts.map +1 -0
  87. package/lib/database/AcDbLinetypeTableRecord.js +97 -0
  88. package/lib/database/AcDbLinetypeTableRecord.js.map +1 -0
  89. package/lib/database/AcDbSymbolTable.d.ts +74 -0
  90. package/lib/database/AcDbSymbolTable.d.ts.map +1 -0
  91. package/lib/database/AcDbSymbolTable.js +136 -0
  92. package/lib/database/AcDbSymbolTable.js.map +1 -0
  93. package/lib/database/AcDbSymbolTableRecord.d.ts +16 -0
  94. package/lib/database/AcDbSymbolTableRecord.d.ts.map +1 -0
  95. package/lib/database/AcDbSymbolTableRecord.js +44 -0
  96. package/lib/database/AcDbSymbolTableRecord.js.map +1 -0
  97. package/lib/database/AcDbTextStyleTable.d.ts +14 -0
  98. package/lib/database/AcDbTextStyleTable.d.ts.map +1 -0
  99. package/lib/database/AcDbTextStyleTable.js +78 -0
  100. package/lib/database/AcDbTextStyleTable.js.map +1 -0
  101. package/lib/database/AcDbTextStyleTableRecord.d.ts +67 -0
  102. package/lib/database/AcDbTextStyleTableRecord.d.ts.map +1 -0
  103. package/lib/database/AcDbTextStyleTableRecord.js +166 -0
  104. package/lib/database/AcDbTextStyleTableRecord.js.map +1 -0
  105. package/lib/database/AcDbViewportTable.d.ts +11 -0
  106. package/lib/database/AcDbViewportTable.d.ts.map +1 -0
  107. package/lib/database/AcDbViewportTable.js +29 -0
  108. package/lib/database/AcDbViewportTable.js.map +1 -0
  109. package/lib/database/AcDbViewportTableRecord.d.ts +89 -0
  110. package/lib/database/AcDbViewportTableRecord.d.ts.map +1 -0
  111. package/lib/database/AcDbViewportTableRecord.js +262 -0
  112. package/lib/database/AcDbViewportTableRecord.js.map +1 -0
  113. package/lib/database/index.d.ts +18 -0
  114. package/lib/database/index.d.ts.map +1 -0
  115. package/lib/database/index.js +18 -0
  116. package/lib/database/index.js.map +1 -0
  117. package/lib/entity/AcDbArc.d.ts +67 -0
  118. package/lib/entity/AcDbArc.d.ts.map +1 -0
  119. package/lib/entity/AcDbArc.js +154 -0
  120. package/lib/entity/AcDbArc.js.map +1 -0
  121. package/lib/entity/AcDbBlockReference.d.ts +54 -0
  122. package/lib/entity/AcDbBlockReference.d.ts.map +1 -0
  123. package/lib/entity/AcDbBlockReference.js +168 -0
  124. package/lib/entity/AcDbBlockReference.js.map +1 -0
  125. package/lib/entity/AcDbCircle.d.ts +51 -0
  126. package/lib/entity/AcDbCircle.d.ts.map +1 -0
  127. package/lib/entity/AcDbCircle.js +115 -0
  128. package/lib/entity/AcDbCircle.js.map +1 -0
  129. package/lib/entity/AcDbCurve.d.ts +9 -0
  130. package/lib/entity/AcDbCurve.d.ts.map +1 -0
  131. package/lib/entity/AcDbCurve.js +25 -0
  132. package/lib/entity/AcDbCurve.js.map +1 -0
  133. package/lib/entity/AcDbEllipse.d.ts +53 -0
  134. package/lib/entity/AcDbEllipse.d.ts.map +1 -0
  135. package/lib/entity/AcDbEllipse.js +119 -0
  136. package/lib/entity/AcDbEllipse.js.map +1 -0
  137. package/lib/entity/AcDbEntity.d.ts +103 -0
  138. package/lib/entity/AcDbEntity.d.ts.map +1 -0
  139. package/lib/entity/AcDbEntity.js +292 -0
  140. package/lib/entity/AcDbEntity.js.map +1 -0
  141. package/lib/entity/AcDbHatch.d.ts +116 -0
  142. package/lib/entity/AcDbHatch.d.ts.map +1 -0
  143. package/lib/entity/AcDbHatch.js +200 -0
  144. package/lib/entity/AcDbHatch.js.map +1 -0
  145. package/lib/entity/AcDbLeader.d.ts +94 -0
  146. package/lib/entity/AcDbLeader.d.ts.map +1 -0
  147. package/lib/entity/AcDbLeader.js +217 -0
  148. package/lib/entity/AcDbLeader.js.map +1 -0
  149. package/lib/entity/AcDbLine.d.ts +55 -0
  150. package/lib/entity/AcDbLine.d.ts.map +1 -0
  151. package/lib/entity/AcDbLine.js +158 -0
  152. package/lib/entity/AcDbLine.js.map +1 -0
  153. package/lib/entity/AcDbMText.d.ts +119 -0
  154. package/lib/entity/AcDbMText.d.ts.map +1 -0
  155. package/lib/entity/AcDbMText.js +300 -0
  156. package/lib/entity/AcDbMText.js.map +1 -0
  157. package/lib/entity/AcDbPoint.d.ts +32 -0
  158. package/lib/entity/AcDbPoint.d.ts.map +1 -0
  159. package/lib/entity/AcDbPoint.js +75 -0
  160. package/lib/entity/AcDbPoint.js.map +1 -0
  161. package/lib/entity/AcDbPolyline.d.ts +72 -0
  162. package/lib/entity/AcDbPolyline.d.ts.map +1 -0
  163. package/lib/entity/AcDbPolyline.js +154 -0
  164. package/lib/entity/AcDbPolyline.js.map +1 -0
  165. package/lib/entity/AcDbRasterImage.d.ts +163 -0
  166. package/lib/entity/AcDbRasterImage.d.ts.map +1 -0
  167. package/lib/entity/AcDbRasterImage.js +406 -0
  168. package/lib/entity/AcDbRasterImage.js.map +1 -0
  169. package/lib/entity/AcDbRay.d.ts +42 -0
  170. package/lib/entity/AcDbRay.d.ts.map +1 -0
  171. package/lib/entity/AcDbRay.js +102 -0
  172. package/lib/entity/AcDbRay.js.map +1 -0
  173. package/lib/entity/AcDbSpline.d.ts +37 -0
  174. package/lib/entity/AcDbSpline.d.ts.map +1 -0
  175. package/lib/entity/AcDbSpline.js +71 -0
  176. package/lib/entity/AcDbSpline.js.map +1 -0
  177. package/lib/entity/AcDbTable.d.ts +141 -0
  178. package/lib/entity/AcDbTable.d.ts.map +1 -0
  179. package/lib/entity/AcDbTable.js +358 -0
  180. package/lib/entity/AcDbTable.js.map +1 -0
  181. package/lib/entity/AcDbText.d.ts +110 -0
  182. package/lib/entity/AcDbText.d.ts.map +1 -0
  183. package/lib/entity/AcDbText.js +255 -0
  184. package/lib/entity/AcDbText.js.map +1 -0
  185. package/lib/entity/AcDbTrace.d.ts +64 -0
  186. package/lib/entity/AcDbTrace.d.ts.map +1 -0
  187. package/lib/entity/AcDbTrace.js +145 -0
  188. package/lib/entity/AcDbTrace.js.map +1 -0
  189. package/lib/entity/AcDbViewport.d.ts +58 -0
  190. package/lib/entity/AcDbViewport.d.ts.map +1 -0
  191. package/lib/entity/AcDbViewport.js +179 -0
  192. package/lib/entity/AcDbViewport.js.map +1 -0
  193. package/lib/entity/AcDbWipeout.d.ts +9 -0
  194. package/lib/entity/AcDbWipeout.d.ts.map +1 -0
  195. package/lib/entity/AcDbWipeout.js +40 -0
  196. package/lib/entity/AcDbWipeout.js.map +1 -0
  197. package/lib/entity/AcDbXline.d.ts +42 -0
  198. package/lib/entity/AcDbXline.d.ts.map +1 -0
  199. package/lib/entity/AcDbXline.js +102 -0
  200. package/lib/entity/AcDbXline.js.map +1 -0
  201. package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +46 -0
  202. package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +1 -0
  203. package/lib/entity/dimension/AcDb3PointAngularDimension.js +111 -0
  204. package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +1 -0
  205. package/lib/entity/dimension/AcDbAlignedDimension.d.ts +77 -0
  206. package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +1 -0
  207. package/lib/entity/dimension/AcDbAlignedDimension.js +203 -0
  208. package/lib/entity/dimension/AcDbAlignedDimension.js.map +1 -0
  209. package/lib/entity/dimension/AcDbArcDimension.d.ts +46 -0
  210. package/lib/entity/dimension/AcDbArcDimension.d.ts.map +1 -0
  211. package/lib/entity/dimension/AcDbArcDimension.js +111 -0
  212. package/lib/entity/dimension/AcDbArcDimension.js.map +1 -0
  213. package/lib/entity/dimension/AcDbDiametricDimension.d.ts +69 -0
  214. package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +1 -0
  215. package/lib/entity/dimension/AcDbDiametricDimension.js +199 -0
  216. package/lib/entity/dimension/AcDbDiametricDimension.js.map +1 -0
  217. package/lib/entity/dimension/AcDbDimension.d.ts +161 -0
  218. package/lib/entity/dimension/AcDbDimension.d.ts.map +1 -0
  219. package/lib/entity/dimension/AcDbDimension.js +375 -0
  220. package/lib/entity/dimension/AcDbDimension.js.map +1 -0
  221. package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +44 -0
  222. package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +1 -0
  223. package/lib/entity/dimension/AcDbOrdinateDimension.js +99 -0
  224. package/lib/entity/dimension/AcDbOrdinateDimension.js.map +1 -0
  225. package/lib/entity/dimension/AcDbRadialDimension.d.ts +69 -0
  226. package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +1 -0
  227. package/lib/entity/dimension/AcDbRadialDimension.js +148 -0
  228. package/lib/entity/dimension/AcDbRadialDimension.js.map +1 -0
  229. package/lib/entity/dimension/index.d.ts +8 -0
  230. package/lib/entity/dimension/index.d.ts.map +1 -0
  231. package/lib/entity/dimension/index.js +8 -0
  232. package/lib/entity/dimension/index.js.map +1 -0
  233. package/lib/entity/index.d.ts +23 -0
  234. package/lib/entity/index.d.ts.map +1 -0
  235. package/lib/entity/index.js +23 -0
  236. package/lib/entity/index.js.map +1 -0
  237. package/lib/index.d.ts +10 -0
  238. package/lib/index.d.ts.map +1 -0
  239. package/lib/index.js +10 -0
  240. package/lib/index.js.map +1 -0
  241. package/lib/misc/AcDbAngleUnits.d.ts +8 -0
  242. package/lib/misc/AcDbAngleUnits.d.ts.map +1 -0
  243. package/lib/misc/AcDbAngleUnits.js +9 -0
  244. package/lib/misc/AcDbAngleUnits.js.map +1 -0
  245. package/lib/misc/AcDbConstants.d.ts +4 -0
  246. package/lib/misc/AcDbConstants.d.ts.map +1 -0
  247. package/lib/misc/AcDbConstants.js +4 -0
  248. package/lib/misc/AcDbConstants.js.map +1 -0
  249. package/lib/misc/AcDbDimArrowType.d.ts +86 -0
  250. package/lib/misc/AcDbDimArrowType.d.ts.map +1 -0
  251. package/lib/misc/AcDbDimArrowType.js +87 -0
  252. package/lib/misc/AcDbDimArrowType.js.map +1 -0
  253. package/lib/misc/AcDbObjectIterator.d.ts +16 -0
  254. package/lib/misc/AcDbObjectIterator.d.ts.map +1 -0
  255. package/lib/misc/AcDbObjectIterator.js +28 -0
  256. package/lib/misc/AcDbObjectIterator.js.map +1 -0
  257. package/lib/misc/AcDbOsnapMode.d.ts +43 -0
  258. package/lib/misc/AcDbOsnapMode.d.ts.map +1 -0
  259. package/lib/misc/AcDbOsnapMode.js +44 -0
  260. package/lib/misc/AcDbOsnapMode.js.map +1 -0
  261. package/lib/misc/AcDbRenderingCache.d.ts +61 -0
  262. package/lib/misc/AcDbRenderingCache.d.ts.map +1 -0
  263. package/lib/misc/AcDbRenderingCache.js +154 -0
  264. package/lib/misc/AcDbRenderingCache.js.map +1 -0
  265. package/lib/misc/AcDbUnitsValue.d.ts +51 -0
  266. package/lib/misc/AcDbUnitsValue.d.ts.map +1 -0
  267. package/lib/misc/AcDbUnitsValue.js +71 -0
  268. package/lib/misc/AcDbUnitsValue.js.map +1 -0
  269. package/lib/misc/index.d.ts +8 -0
  270. package/lib/misc/index.d.ts.map +1 -0
  271. package/lib/misc/index.js +8 -0
  272. package/lib/misc/index.js.map +1 -0
  273. package/lib/object/AcDbDictionary.d.ts +80 -0
  274. package/lib/object/AcDbDictionary.d.ts.map +1 -0
  275. package/lib/object/AcDbDictionary.js +144 -0
  276. package/lib/object/AcDbDictionary.js.map +1 -0
  277. package/lib/object/AcDbRasterImageDef.d.ts +25 -0
  278. package/lib/object/AcDbRasterImageDef.d.ts.map +1 -0
  279. package/lib/object/AcDbRasterImageDef.js +54 -0
  280. package/lib/object/AcDbRasterImageDef.js.map +1 -0
  281. package/lib/object/index.d.ts +4 -0
  282. package/lib/object/index.d.ts.map +1 -0
  283. package/lib/object/index.js +4 -0
  284. package/lib/object/index.js.map +1 -0
  285. package/lib/object/layout/AcDbLayout.d.ts +51 -0
  286. package/lib/object/layout/AcDbLayout.d.ts.map +1 -0
  287. package/lib/object/layout/AcDbLayout.js +120 -0
  288. package/lib/object/layout/AcDbLayout.js.map +1 -0
  289. package/lib/object/layout/AcDbLayoutDictionary.d.ts +19 -0
  290. package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +1 -0
  291. package/lib/object/layout/AcDbLayoutDictionary.js +94 -0
  292. package/lib/object/layout/AcDbLayoutDictionary.js.map +1 -0
  293. package/lib/object/layout/AcDbLayoutManager.d.ts +101 -0
  294. package/lib/object/layout/AcDbLayoutManager.d.ts.map +1 -0
  295. package/lib/object/layout/AcDbLayoutManager.js +154 -0
  296. package/lib/object/layout/AcDbLayoutManager.js.map +1 -0
  297. package/lib/object/layout/index.d.ts +4 -0
  298. package/lib/object/layout/index.d.ts.map +1 -0
  299. package/lib/object/layout/index.js +4 -0
  300. package/lib/object/layout/index.js.map +1 -0
  301. package/package.json +46 -0
@@ -0,0 +1,80 @@
1
+ import { AcDbObject, AcDbObjectId } from '../base';
2
+ import { AcDbDatabase } from '../database';
3
+ import { AcDbObjectIterator } from '../misc';
4
+ /**
5
+ * A database-resident object dictionary, which maintains a map between text strings and database objects.
6
+ * An instance of this class represents a single object, such as Drawing Symbol Table, to which objects
7
+ * derived from AcDbObject may be added, accessed, and removed. Entries in an AcDbDictionary must be unique.
8
+ * Entries consist of a unique AcDbObject and string, which comprises the entry's key name. The key may be
9
+ * either an text string, or an asterisk ('*') as the first character in the string to signify an anonymous
10
+ * entry. An anonymous entry's key will be constructed internally by appending an 'A' plus a unique integer
11
+ * value to the asterisk; for example, '*A13'. When an object is placed in a dictionary, the dictionary is
12
+ * established as the object's owner, the lookup key string is associated with the object's object ID, and
13
+ * the dictionary itself is attached to the object as a persistent reactor so that the dictionary is notified
14
+ * when the object is erased.
15
+ */
16
+ export declare class AcDbDictionary<TObjectType extends AcDbObject = AcDbObject> extends AcDbObject {
17
+ protected _recordsByName: Map<string, TObjectType>;
18
+ protected _recordsById: Map<string, TObjectType>;
19
+ constructor(db: AcDbDatabase);
20
+ /**
21
+ * The number of entries in the dictionary.
22
+ */
23
+ get numEntries(): number;
24
+ /**
25
+ * Add a new entry specified by 'value' into the dictionary, if 'key' does not already exist in the
26
+ * dictionary. If the entry with 'key' already exists, the existing entry is erased.
27
+ * @param key Input string representing the object's search key name
28
+ * @param value Input the new object to add to the dictionary
29
+ */
30
+ setAt(key: string, value: TObjectType): void;
31
+ /**
32
+ * Remove the entry specified by 'name' from the dictionary.
33
+ * @param name Input string representing the entry's key (or name)
34
+ * @returns If the entry specified by object id exists in the dictionary and remove it correctly, return
35
+ * true. Otherwise, return false.
36
+ */
37
+ remove(name: string): boolean;
38
+ /**
39
+ * Remove the entry specified by object id from the dictionary.
40
+ * @param id Input id of the object to delete
41
+ * @returns If the entry specified by object id exists in the dictionary and remove it correctly, return
42
+ * true. Otherwise, return false.
43
+ */
44
+ removeId(id: string): boolean;
45
+ /**
46
+ * Remove all of records in the dictionary.
47
+ */
48
+ removeAll(): void;
49
+ /**
50
+ * Return true if the dictionary contains an object with the sepcified name. Otherwise it returns false.
51
+ * @param name Input name to search for
52
+ */
53
+ has(name: string): boolean;
54
+ /**
55
+ * Return true if the dictionary contains an object with the sepcified id. Otherwise it returns false.
56
+ * @param id Input object id to search for
57
+ */
58
+ hasId(id: string): boolean;
59
+ /**
60
+ * Search the dictionary for the object with the specified name. If found, it return the record.
61
+ * Otherwise, return undefined.
62
+ * @param name Input the name to search
63
+ * @returns If found the object with the specified name, return it. Otherwise, return undefined.
64
+ */
65
+ getAt(name: string): TObjectType | undefined;
66
+ /**
67
+ * Search the dictionary for the record with the specified id. If found, it returns the record.
68
+ * Otherwise, return undefined.
69
+ * @param id Input the id to search
70
+ * @returns If found the object with the specified id, return it. Otherwise, return undefined.
71
+ */
72
+ getIdAt(id: AcDbObjectId): TObjectType | undefined;
73
+ /**
74
+ * Create an iterator object that can be used to iterate through the contents of the symbol table.
75
+ *
76
+ * @returns Return an iterator object that can be used to iterate through the contents of the symbol table.
77
+ */
78
+ newIterator(): AcDbObjectIterator<TObjectType>;
79
+ }
80
+ //# sourceMappingURL=AcDbDictionary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbDictionary.d.ts","sourceRoot":"","sources":["../../src/object/AcDbDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE5C;;;;;;;;;;;GAWG;AACH,qBAAa,cAAc,CACzB,WAAW,SAAS,UAAU,GAAG,UAAU,CAC3C,SAAQ,UAAU;IAClB,SAAS,CAAC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAClD,SAAS,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;gBAEpC,EAAE,EAAE,YAAY;IAO5B;;OAEG;IACH,IAAI,UAAU,WAEb;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW;IAMrC;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM;IAUnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM;IAYnB;;OAEG;IACH,SAAS;IAKT;;;OAGG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM;IAIhB;;;OAGG;IACH,KAAK,CAAC,EAAE,EAAE,MAAM;IAIhB;;;;;OAKG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM;IAIlB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,EAAE,YAAY;IAIxB;;;;OAIG;IACH,WAAW,IAAI,kBAAkB,CAAC,WAAW,CAAC;CAG/C"}
@@ -0,0 +1,144 @@
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
+ import { AcDbObject } from '../base';
17
+ import { AcDbObjectIterator } from '../misc';
18
+ /**
19
+ * A database-resident object dictionary, which maintains a map between text strings and database objects.
20
+ * An instance of this class represents a single object, such as Drawing Symbol Table, to which objects
21
+ * derived from AcDbObject may be added, accessed, and removed. Entries in an AcDbDictionary must be unique.
22
+ * Entries consist of a unique AcDbObject and string, which comprises the entry's key name. The key may be
23
+ * either an text string, or an asterisk ('*') as the first character in the string to signify an anonymous
24
+ * entry. An anonymous entry's key will be constructed internally by appending an 'A' plus a unique integer
25
+ * value to the asterisk; for example, '*A13'. When an object is placed in a dictionary, the dictionary is
26
+ * established as the object's owner, the lookup key string is associated with the object's object ID, and
27
+ * the dictionary itself is attached to the object as a persistent reactor so that the dictionary is notified
28
+ * when the object is erased.
29
+ */
30
+ var AcDbDictionary = /** @class */ (function (_super) {
31
+ __extends(AcDbDictionary, _super);
32
+ function AcDbDictionary(db) {
33
+ var _this = _super.call(this) || this;
34
+ _this.database = db;
35
+ _this._recordsByName = new Map();
36
+ _this._recordsById = new Map();
37
+ return _this;
38
+ }
39
+ Object.defineProperty(AcDbDictionary.prototype, "numEntries", {
40
+ /**
41
+ * The number of entries in the dictionary.
42
+ */
43
+ get: function () {
44
+ return this._recordsByName.size;
45
+ },
46
+ enumerable: false,
47
+ configurable: true
48
+ });
49
+ /**
50
+ * Add a new entry specified by 'value' into the dictionary, if 'key' does not already exist in the
51
+ * dictionary. If the entry with 'key' already exists, the existing entry is erased.
52
+ * @param key Input string representing the object's search key name
53
+ * @param value Input the new object to add to the dictionary
54
+ */
55
+ AcDbDictionary.prototype.setAt = function (key, value) {
56
+ value.database = this.database;
57
+ this._recordsByName.set(key, value);
58
+ this._recordsById.set(value.objectId, value);
59
+ };
60
+ /**
61
+ * Remove the entry specified by 'name' from the dictionary.
62
+ * @param name Input string representing the entry's key (or name)
63
+ * @returns If the entry specified by object id exists in the dictionary and remove it correctly, return
64
+ * true. Otherwise, return false.
65
+ */
66
+ AcDbDictionary.prototype.remove = function (name) {
67
+ var object = this.getAt(name);
68
+ if (object) {
69
+ this._recordsByName.delete(name.toUpperCase());
70
+ this._recordsById.delete(this.objectId);
71
+ return true;
72
+ }
73
+ return false;
74
+ };
75
+ /**
76
+ * Remove the entry specified by object id from the dictionary.
77
+ * @param id Input id of the object to delete
78
+ * @returns If the entry specified by object id exists in the dictionary and remove it correctly, return
79
+ * true. Otherwise, return false.
80
+ */
81
+ AcDbDictionary.prototype.removeId = function (id) {
82
+ var _this = this;
83
+ var object = this.getIdAt(id);
84
+ if (object) {
85
+ this._recordsById.delete(this.objectId);
86
+ this._recordsByName.forEach(function (value, key) {
87
+ if (value === object)
88
+ _this._recordsByName.delete(key);
89
+ });
90
+ return true;
91
+ }
92
+ return false;
93
+ };
94
+ /**
95
+ * Remove all of records in the dictionary.
96
+ */
97
+ AcDbDictionary.prototype.removeAll = function () {
98
+ this._recordsByName.clear();
99
+ this._recordsById.clear();
100
+ };
101
+ /**
102
+ * Return true if the dictionary contains an object with the sepcified name. Otherwise it returns false.
103
+ * @param name Input name to search for
104
+ */
105
+ AcDbDictionary.prototype.has = function (name) {
106
+ return this._recordsByName.has(name.toUpperCase());
107
+ };
108
+ /**
109
+ * Return true if the dictionary contains an object with the sepcified id. Otherwise it returns false.
110
+ * @param id Input object id to search for
111
+ */
112
+ AcDbDictionary.prototype.hasId = function (id) {
113
+ return this._recordsById.has(id);
114
+ };
115
+ /**
116
+ * Search the dictionary for the object with the specified name. If found, it return the record.
117
+ * Otherwise, return undefined.
118
+ * @param name Input the name to search
119
+ * @returns If found the object with the specified name, return it. Otherwise, return undefined.
120
+ */
121
+ AcDbDictionary.prototype.getAt = function (name) {
122
+ return this._recordsByName.get(name);
123
+ };
124
+ /**
125
+ * Search the dictionary for the record with the specified id. If found, it returns the record.
126
+ * Otherwise, return undefined.
127
+ * @param id Input the id to search
128
+ * @returns If found the object with the specified id, return it. Otherwise, return undefined.
129
+ */
130
+ AcDbDictionary.prototype.getIdAt = function (id) {
131
+ return this._recordsById.get(id);
132
+ };
133
+ /**
134
+ * Create an iterator object that can be used to iterate through the contents of the symbol table.
135
+ *
136
+ * @returns Return an iterator object that can be used to iterate through the contents of the symbol table.
137
+ */
138
+ AcDbDictionary.prototype.newIterator = function () {
139
+ return new AcDbObjectIterator(this._recordsByName);
140
+ };
141
+ return AcDbDictionary;
142
+ }(AcDbObject));
143
+ export { AcDbDictionary };
144
+ //# sourceMappingURL=AcDbDictionary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbDictionary.js","sourceRoot":"","sources":["../../src/object/AcDbDictionary.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,25 @@
1
+ import { AcDbObject } from '../base';
2
+ /**
3
+ * The AcDbRasterImageDef object (or "image definition object") works with the AcDbRasterImage entity
4
+ * (or "image entity") to implement raster images inside AutoCAD. The relationship between these two
5
+ * classes is much like the relationship between an AutoCAD block definition object and a block insert
6
+ * entity.
7
+ *
8
+ * The image definition object plays a behind-the-scenes role like the block definition, maintaining
9
+ * links to the source image file and managing low-level image processing operations required to display
10
+ * and plot images. Image definition objects are stored in a special AcDbDictionary named
11
+ * ISM_RASTER_IMAGE_DICT.
12
+ */
13
+ export declare class AcDbRasterImageDef extends AcDbObject {
14
+ private _sourceFileName;
15
+ /**
16
+ * Consturct one instance of this class.
17
+ */
18
+ constructor();
19
+ /**
20
+ * The path name of the externally referenced image file name.
21
+ */
22
+ get sourceFileName(): string;
23
+ set sourceFileName(value: string);
24
+ }
25
+ //# sourceMappingURL=AcDbRasterImageDef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbRasterImageDef.d.ts","sourceRoot":"","sources":["../../src/object/AcDbRasterImageDef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC;;;;;;;;;;GAUG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;IAChD,OAAO,CAAC,eAAe,CAAQ;IAE/B;;OAEG;;IAMH;;OAEG;IACH,IAAI,cAAc,IAGQ,MAAM,CAD/B;IACD,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,EAE/B;CACF"}
@@ -0,0 +1,54 @@
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
+ import { AcDbObject } from '../base';
17
+ /**
18
+ * The AcDbRasterImageDef object (or "image definition object") works with the AcDbRasterImage entity
19
+ * (or "image entity") to implement raster images inside AutoCAD. The relationship between these two
20
+ * classes is much like the relationship between an AutoCAD block definition object and a block insert
21
+ * entity.
22
+ *
23
+ * The image definition object plays a behind-the-scenes role like the block definition, maintaining
24
+ * links to the source image file and managing low-level image processing operations required to display
25
+ * and plot images. Image definition objects are stored in a special AcDbDictionary named
26
+ * ISM_RASTER_IMAGE_DICT.
27
+ */
28
+ var AcDbRasterImageDef = /** @class */ (function (_super) {
29
+ __extends(AcDbRasterImageDef, _super);
30
+ /**
31
+ * Consturct one instance of this class.
32
+ */
33
+ function AcDbRasterImageDef() {
34
+ var _this = _super.call(this) || this;
35
+ _this._sourceFileName = '';
36
+ return _this;
37
+ }
38
+ Object.defineProperty(AcDbRasterImageDef.prototype, "sourceFileName", {
39
+ /**
40
+ * The path name of the externally referenced image file name.
41
+ */
42
+ get: function () {
43
+ return this._sourceFileName;
44
+ },
45
+ set: function (value) {
46
+ this._sourceFileName = value;
47
+ },
48
+ enumerable: false,
49
+ configurable: true
50
+ });
51
+ return AcDbRasterImageDef;
52
+ }(AcDbObject));
53
+ export { AcDbRasterImageDef };
54
+ //# sourceMappingURL=AcDbRasterImageDef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbRasterImageDef.js","sourceRoot":"","sources":["../../src/object/AcDbRasterImageDef.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC;;;;;;;;;;GAUG;AACH;IAAwC,sCAAU;IAGhD;;OAEG;IACH;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,eAAe,GAAG,EAAE,CAAA;;IAC3B,CAAC;IAKD,sBAAI,8CAAc;QAHlB;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,eAAe,CAAA;QAC7B,CAAC;aACD,UAAmB,KAAa;YAC9B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;QAC9B,CAAC;;;OAHA;IAIH,yBAAC;AAAD,CAAC,AApBD,CAAwC,UAAU,GAoBjD"}
@@ -0,0 +1,4 @@
1
+ export * from './layout';
2
+ export * from './AcDbDictionary';
3
+ export * from './AcDbRasterImageDef';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/object/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './layout';
2
+ export * from './AcDbDictionary';
3
+ export * from './AcDbRasterImageDef';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/object/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,51 @@
1
+ import { AcGeBox2d, AcGeBox3d } from '@mlightcad/geometry-engine';
2
+ import { AcDbObject } from '../../base';
3
+ /**
4
+ * This class represents object stored characteristics of each paperspace layout. Layout objects are
5
+ * stored in an AcDbDictionary object with an ACAD_LAYOUT key, allowing easy iteration and indexing.
6
+ */
7
+ export declare class AcDbLayout extends AcDbObject {
8
+ private _layoutName;
9
+ private _tabOrder;
10
+ private _tabSelected;
11
+ private _blockTableRecordId;
12
+ private _limits;
13
+ private _extents;
14
+ constructor();
15
+ /**
16
+ * The user-friendly layout name that is displayed in the tab control. Currently there is no restriction
17
+ * on the name except that the length of the name is limited to 256 characters.
18
+ */
19
+ get layoutName(): string;
20
+ set layoutName(value: string);
21
+ /**
22
+ * The tab order field, which controls the order in which the layouts are displayed in the tab control
23
+ * that is docked to the bottom of the viewport. The tab order should be unique and sequential for each
24
+ * layout in the database.
25
+ */
26
+ get tabOrder(): number;
27
+ set tabOrder(value: number);
28
+ /**
29
+ * A flag to indicate whether the layout tab is included in the selection set for operations that affect
30
+ * multiple tabs. The user can perform multiple selection via the user interface using shift-click.
31
+ */
32
+ get tabSelected(): boolean;
33
+ set tabSelected(value: boolean);
34
+ /**
35
+ * The associated block table record id of this layout.
36
+ */
37
+ get blockTableRecordId(): string;
38
+ set blockTableRecordId(value: string);
39
+ /**
40
+ * Limits for this layout (defined by LIMMAX while this layout is current)
41
+ */
42
+ get limits(): AcGeBox2d;
43
+ set limits(value: AcGeBox2d);
44
+ /**
45
+ * The current extents setting of the layout. This value may not be the actual extents of
46
+ * the geometry in the layout, it is just the value last saved in the layout.
47
+ */
48
+ get extents(): AcGeBox3d;
49
+ set extents(value: AcGeBox3d);
50
+ }
51
+ //# sourceMappingURL=AcDbLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbLayout.d.ts","sourceRoot":"","sources":["../../../src/object/layout/AcDbLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC;;;GAGG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,mBAAmB,CAAQ;IACnC,OAAO,CAAC,OAAO,CAAW;IAC1B,OAAO,CAAC,QAAQ,CAAW;;IAY3B;;;OAGG;IACH,IAAI,UAAU,IAGQ,MAAM,CAD3B;IACD,IAAI,UAAU,CAAC,KAAK,EAAE,MAAM,EAE3B;IAED;;;;OAIG;IACH,IAAI,QAAQ,IAGQ,MAAM,CADzB;IACD,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAEzB;IAED;;;OAGG;IACH,IAAI,WAAW,IAGQ,OAAO,CAD7B;IACD,IAAI,WAAW,CAAC,KAAK,EAAE,OAAO,EAE7B;IAED;;OAEG;IACH,IAAI,kBAAkB,IAGQ,MAAM,CADnC;IACD,IAAI,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAEnC;IAED;;OAEG;IACH,IAAI,MAAM,IAGQ,SAAS,CAD1B;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,SAAS,EAE1B;IAED;;;OAGG;IACH,IAAI,OAAO,IAGQ,SAAS,CAD3B;IACD,IAAI,OAAO,CAAC,KAAK,EAAE,SAAS,EAE3B;CACF"}
@@ -0,0 +1,120 @@
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
+ import { AcGeBox2d, AcGeBox3d } from '@mlightcad/geometry-engine';
17
+ import { AcDbObject } from '../../base';
18
+ /**
19
+ * This class represents object stored characteristics of each paperspace layout. Layout objects are
20
+ * stored in an AcDbDictionary object with an ACAD_LAYOUT key, allowing easy iteration and indexing.
21
+ */
22
+ var AcDbLayout = /** @class */ (function (_super) {
23
+ __extends(AcDbLayout, _super);
24
+ function AcDbLayout() {
25
+ var _this = _super.call(this) || this;
26
+ _this._tabOrder = -1;
27
+ _this._tabSelected = false;
28
+ _this._blockTableRecordId = '';
29
+ _this._layoutName = '';
30
+ _this._limits = new AcGeBox2d();
31
+ _this._extents = new AcGeBox3d();
32
+ return _this;
33
+ }
34
+ Object.defineProperty(AcDbLayout.prototype, "layoutName", {
35
+ /**
36
+ * The user-friendly layout name that is displayed in the tab control. Currently there is no restriction
37
+ * on the name except that the length of the name is limited to 256 characters.
38
+ */
39
+ get: function () {
40
+ return this._layoutName;
41
+ },
42
+ set: function (value) {
43
+ this._layoutName = value.length > 256 ? value.slice(0, 256) : value;
44
+ },
45
+ enumerable: false,
46
+ configurable: true
47
+ });
48
+ Object.defineProperty(AcDbLayout.prototype, "tabOrder", {
49
+ /**
50
+ * The tab order field, which controls the order in which the layouts are displayed in the tab control
51
+ * that is docked to the bottom of the viewport. The tab order should be unique and sequential for each
52
+ * layout in the database.
53
+ */
54
+ get: function () {
55
+ return this._tabOrder;
56
+ },
57
+ set: function (value) {
58
+ this._tabOrder = value;
59
+ },
60
+ enumerable: false,
61
+ configurable: true
62
+ });
63
+ Object.defineProperty(AcDbLayout.prototype, "tabSelected", {
64
+ /**
65
+ * A flag to indicate whether the layout tab is included in the selection set for operations that affect
66
+ * multiple tabs. The user can perform multiple selection via the user interface using shift-click.
67
+ */
68
+ get: function () {
69
+ return this._tabSelected;
70
+ },
71
+ set: function (value) {
72
+ this._tabSelected = value;
73
+ },
74
+ enumerable: false,
75
+ configurable: true
76
+ });
77
+ Object.defineProperty(AcDbLayout.prototype, "blockTableRecordId", {
78
+ /**
79
+ * The associated block table record id of this layout.
80
+ */
81
+ get: function () {
82
+ return this._blockTableRecordId;
83
+ },
84
+ set: function (value) {
85
+ this._blockTableRecordId = value;
86
+ },
87
+ enumerable: false,
88
+ configurable: true
89
+ });
90
+ Object.defineProperty(AcDbLayout.prototype, "limits", {
91
+ /**
92
+ * Limits for this layout (defined by LIMMAX while this layout is current)
93
+ */
94
+ get: function () {
95
+ return this._limits;
96
+ },
97
+ set: function (value) {
98
+ this._limits.copy(value);
99
+ },
100
+ enumerable: false,
101
+ configurable: true
102
+ });
103
+ Object.defineProperty(AcDbLayout.prototype, "extents", {
104
+ /**
105
+ * The current extents setting of the layout. This value may not be the actual extents of
106
+ * the geometry in the layout, it is just the value last saved in the layout.
107
+ */
108
+ get: function () {
109
+ return this._extents;
110
+ },
111
+ set: function (value) {
112
+ this._extents.copy(value);
113
+ },
114
+ enumerable: false,
115
+ configurable: true
116
+ });
117
+ return AcDbLayout;
118
+ }(AcDbObject));
119
+ export { AcDbLayout };
120
+ //# sourceMappingURL=AcDbLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbLayout.js","sourceRoot":"","sources":["../../../src/object/layout/AcDbLayout.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC;;;GAGG;AACH;IAAgC,8BAAU;IAQxC;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAA;QACnB,KAAI,CAAC,YAAY,GAAG,KAAK,CAAA;QACzB,KAAI,CAAC,mBAAmB,GAAG,EAAE,CAAA;QAC7B,KAAI,CAAC,WAAW,GAAG,EAAE,CAAA;QACrB,KAAI,CAAC,OAAO,GAAG,IAAI,SAAS,EAAE,CAAA;QAC9B,KAAI,CAAC,QAAQ,GAAG,IAAI,SAAS,EAAE,CAAA;;IACjC,CAAC;IAMD,sBAAI,kCAAU;QAJd;;;WAGG;aACH;YACE,OAAO,IAAI,CAAC,WAAW,CAAA;QACzB,CAAC;aACD,UAAe,KAAa;YAC1B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;QACrE,CAAC;;;OAHA;IAUD,sBAAI,gCAAQ;QALZ;;;;WAIG;aACH;YACE,OAAO,IAAI,CAAC,SAAS,CAAA;QACvB,CAAC;aACD,UAAa,KAAa;YACxB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;QACxB,CAAC;;;OAHA;IASD,sBAAI,mCAAW;QAJf;;;WAGG;aACH;YACE,OAAO,IAAI,CAAC,YAAY,CAAA;QAC1B,CAAC;aACD,UAAgB,KAAc;YAC5B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAA;QAC3B,CAAC;;;OAHA;IAQD,sBAAI,0CAAkB;QAHtB;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,mBAAmB,CAAA;QACjC,CAAC;aACD,UAAuB,KAAa;YAClC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAA;QAClC,CAAC;;;OAHA;IAQD,sBAAI,8BAAM;QAHV;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,OAAO,CAAA;QACrB,CAAC;aACD,UAAW,KAAgB;YACzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC1B,CAAC;;;OAHA;IASD,sBAAI,+BAAO;QAJX;;;WAGG;aACH;YACE,OAAO,IAAI,CAAC,QAAQ,CAAA;QACtB,CAAC;aACD,UAAY,KAAgB;YAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC3B,CAAC;;;OAHA;IAIH,iBAAC;AAAD,CAAC,AAlFD,CAAgC,UAAU,GAkFzC"}
@@ -0,0 +1,19 @@
1
+ import { AcDbObjectId } from '../../base';
2
+ import { AcDbDictionary } from '../AcDbDictionary';
3
+ import { AcDbLayout } from './AcDbLayout';
4
+ export declare class AcDbLayoutDictionary extends AcDbDictionary<AcDbLayout> {
5
+ /**
6
+ * Search the dictionary for the record with the specified block table record id. If found
7
+ * one layout associated with the block table record with the specified id, it returns the record.
8
+ * Otherwise, return undefined.
9
+ * @param id Input the id to search
10
+ * @returns If found one layout associated with the block table record with the specified id,
11
+ * it returns the record. Otherwise, return undefined.
12
+ */
13
+ getBtrIdAt(id: AcDbObjectId): AcDbLayout | undefined;
14
+ /**
15
+ * The maximum tabOrder value of layouts in layout dictionary.
16
+ */
17
+ get maxTabOrder(): number;
18
+ }
19
+ //# sourceMappingURL=AcDbLayoutDictionary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbLayoutDictionary.d.ts","sourceRoot":"","sources":["../../../src/object/layout/AcDbLayoutDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,UAAU,CAAC;IAClE;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,EAAE,YAAY;IAO3B;;OAEG;IACH,IAAI,WAAW,WAQd;CACF"}
@@ -0,0 +1,94 @@
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
+ var AcDbLayoutDictionary = /** @class */ (function (_super) {
45
+ __extends(AcDbLayoutDictionary, _super);
46
+ function AcDbLayoutDictionary() {
47
+ return _super !== null && _super.apply(this, arguments) || this;
48
+ }
49
+ /**
50
+ * Search the dictionary for the record with the specified block table record id. If found
51
+ * one layout associated with the block table record with the specified id, it returns the record.
52
+ * Otherwise, return undefined.
53
+ * @param id Input the id to search
54
+ * @returns If found one layout associated with the block table record with the specified id,
55
+ * it returns the record. Otherwise, return undefined.
56
+ */
57
+ AcDbLayoutDictionary.prototype.getBtrIdAt = function (id) {
58
+ var e_1, _a;
59
+ try {
60
+ for (var _b = __values(this._recordsByName), _c = _b.next(); !_c.done; _c = _b.next()) {
61
+ var _d = __read(_c.value, 2), _1 = _d[0], layout = _d[1];
62
+ if (layout.blockTableRecordId == id)
63
+ return layout;
64
+ }
65
+ }
66
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
67
+ finally {
68
+ try {
69
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
70
+ }
71
+ finally { if (e_1) throw e_1.error; }
72
+ }
73
+ return undefined;
74
+ };
75
+ Object.defineProperty(AcDbLayoutDictionary.prototype, "maxTabOrder", {
76
+ /**
77
+ * The maximum tabOrder value of layouts in layout dictionary.
78
+ */
79
+ get: function () {
80
+ var maxValue = -1;
81
+ this._recordsByName.forEach(function (layout) {
82
+ if (layout.tabOrder > maxValue) {
83
+ maxValue = layout.tabOrder;
84
+ }
85
+ });
86
+ return maxValue;
87
+ },
88
+ enumerable: false,
89
+ configurable: true
90
+ });
91
+ return AcDbLayoutDictionary;
92
+ }(AcDbDictionary));
93
+ export { AcDbLayoutDictionary };
94
+ //# sourceMappingURL=AcDbLayoutDictionary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbLayoutDictionary.js","sourceRoot":"","sources":["../../../src/object/layout/AcDbLayoutDictionary.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGlD;IAA0C,wCAA0B;IAApE;;IA4BA,CAAC;IA3BC;;;;;;;OAOG;IACH,yCAAU,GAAV,UAAW,EAAgB;;;YACzB,KAA0B,IAAA,KAAA,SAAA,IAAI,CAAC,cAAc,CAAA,gBAAA,4BAAE,CAAC;gBAArC,IAAA,KAAA,mBAAW,EAAV,EAAC,QAAA,EAAE,MAAM,QAAA;gBACnB,IAAI,MAAM,CAAC,kBAAkB,IAAI,EAAE;oBAAE,OAAO,MAAM,CAAA;YACpD,CAAC;;;;;;;;;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAKD,sBAAI,6CAAW;QAHf;;WAEG;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,AA5BD,CAA0C,cAAc,GA4BvD"}