mxcad 1.0.378 → 1.0.380

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/dist/mxcad.d.ts CHANGED
@@ -8961,6 +8961,131 @@ export declare class McDbMxRegion extends McDbEntity {
8961
8961
  */
8962
8962
  copyData(fromRegion: McDbMxRegion): boolean;
8963
8963
  }
8964
+ /**
8965
+ * 视口对象
8966
+ * @example
8967
+ * ```ts
8968
+ * ```
8969
+ */
8970
+ export declare class McDbViewport extends McDbEntity {
8971
+ /**
8972
+ * 构造函数。
8973
+ * @param imp 内部对象。
8974
+ */
8975
+ constructor(x?: object);
8976
+ /**
8977
+ * 设置高度
8978
+ * @example
8979
+ * ```ts
8980
+ * ```
8981
+ */
8982
+ set height(val: number);
8983
+ /**
8984
+ * 获取宽度
8985
+ * @example
8986
+ * ```ts
8987
+ * ```
8988
+ */
8989
+ get height(): number;
8990
+ /**
8991
+ * 设置宽度
8992
+ * @example
8993
+ * ```ts
8994
+ * ```
8995
+ */
8996
+ set width(val: number);
8997
+ /**
8998
+ * 获取高度
8999
+ * @example
9000
+ * ```ts
9001
+ * ```
9002
+ */
9003
+ get width(): number;
9004
+ /**
9005
+ * 设置视口中心位置
9006
+ * @example
9007
+ * ```ts
9008
+ * ```
9009
+ */
9010
+ set centerPoint(vec: McGePoint3d);
9011
+ /**
9012
+ * 获取视口中心位置
9013
+ * @example
9014
+ * ```ts
9015
+ * ```
9016
+ */
9017
+ get centerPoint(): McGePoint3d;
9018
+ /**
9019
+ * 设置视口目标位置
9020
+ * @example
9021
+ * ```ts
9022
+ * ```
9023
+ */
9024
+ set viewTarget(vec: McGePoint3d);
9025
+ /**
9026
+ * 获取视口目标位置
9027
+ * @example
9028
+ * ```ts
9029
+ * ```
9030
+ */
9031
+ get viewTarget(): McGePoint3d;
9032
+ /**
9033
+ * 设置视口方向
9034
+ * @example
9035
+ * ```ts
9036
+ * ```
9037
+ */
9038
+ set viewDirection(vec: McGeVector3d);
9039
+ /**
9040
+ * 获取视口方向
9041
+ * @example
9042
+ * ```ts
9043
+ * ```
9044
+ */
9045
+ get viewDirection(): McGeVector3d;
9046
+ /**
9047
+ * 设置可视高度
9048
+ * @example
9049
+ * ```ts
9050
+ * ```
9051
+ */
9052
+ set viewHeight(val: number);
9053
+ /**
9054
+ * 获取可视高度
9055
+ * @example
9056
+ * ```ts
9057
+ * ```
9058
+ */
9059
+ get viewHeight(): number;
9060
+ /**
9061
+ * 设置视口可视位置
9062
+ * @example
9063
+ * ```ts
9064
+ * ```
9065
+ */
9066
+ set viewCenter(vec: McGePoint3d);
9067
+ /**
9068
+ * 获取视口可视位置
9069
+ * @example
9070
+ * ```ts
9071
+ * ```
9072
+ */
9073
+ get viewCenter(): McGePoint3d;
9074
+ /**
9075
+ * 设置可视区域旋转角度
9076
+ * @example
9077
+ * ```ts
9078
+ * ```
9079
+ */
9080
+ set twistAngle(val: number);
9081
+ /**
9082
+ * 获取可视区域旋转角度
9083
+ * @example
9084
+ * ```ts
9085
+ * ```
9086
+ */
9087
+ get twistAngle(): number;
9088
+ }
8964
9089
  /**
8965
9090
  * Dxf组码
8966
9091
  * @public
@@ -9246,7 +9371,7 @@ export declare class McCmColor {
9246
9371
  * @example
9247
9372
  * ```ts
9248
9373
  * import { McCmColor } from "mxcad"
9249
- *
9374
+ * McCmColor(red,green,blue,alpha)
9250
9375
  * const red_color:McCmColor = new McCmColor(255, 0, 0);
9251
9376
  *
9252
9377
  * const colorObj = { red:0, green:255, blue:0};
@@ -12415,6 +12540,30 @@ export declare class McObject {
12415
12540
  */
12416
12541
  getSysVarDouble(varName: string): number;
12417
12542
  /**
12543
+ * 进入块编辑状态
12544
+ */
12545
+ startBlockEdit(idBlockRecord: McObjectId): boolean;
12546
+ /**
12547
+ * 退出块编辑状态
12548
+ */
12549
+ endBlockEdit(): boolean;
12550
+ /**
12551
+ * 当前是否正在块编辑
12552
+ */
12553
+ isBlockEditing(): boolean;
12554
+ /**
12555
+ * 开始进入视口编辑状态
12556
+ */
12557
+ startViewPortEdit(idBlockRecord: McObjectId): boolean;
12558
+ /**
12559
+ * 退出视口编辑状态
12560
+ */
12561
+ endViewPortEdit(): boolean;
12562
+ /**
12563
+ * 当前是否正视口编辑
12564
+ */
12565
+ isViewPortEditing(): boolean;
12566
+ /**
12418
12567
  * 获取系统变量的点数值
12419
12568
  * @param varName 变量名称
12420
12569
  * @returns 变量的点数值
@@ -12695,7 +12844,7 @@ export declare class McObject {
12695
12844
  * | dimtfac | 146 | 与通过 DIMTXT 系统变量设置一样,指定分数和公差值的文字高度相对于标注文字高度的比例因子。|
12696
12845
  * | dimtm | 48 | 为标注文字设置最小(即最低)公差限制。|
12697
12846
  * | dimtp | 47 | 为标注文字设置最大(即最高)公差限制。|
12698
- * | dimtsz | 142 | 指定线性标注、半径标注以及直径标注中绘制的代替箭头的小斜线的尺寸。|
12847
+ * | dimtsz | 142 | DIMTSZ = 0使用标准的实心箭头,DIMTSZ > 0 标注的箭头被替换为倾斜线(建筑标记),而 DIMTSZ 的数值就是这条倾斜线的长度|
12699
12848
  * | dimtvp | 145 | 控制标注文字在尺寸线上方或下方的垂直位置。|
12700
12849
  * | dimtxt | 140 | 指定标注文字的高度(除非当前文字样式具有固定的高度)。|
12701
12850
  * | dimaltrnd | 148 | 舍入换算标注单位。|
@@ -13090,6 +13239,14 @@ export declare class McObject {
13090
13239
  * const mxcad:McObject = MxCpp.getCurrentMxCAD()
13091
13240
  * mxcad.drawMText(0, -100, "控件:\\P多行文字测试", 50, 400, 0, 1);
13092
13241
  * ```
13242
+ * ```ts 绘下标,下标方法
13243
+ * let mxcad = MxCpp.getCurrentMxCAD();
13244
+ * mxcad.newFile();
13245
+ * mxcad.drawMText(0,0,"\\A1;平方方法下标: m{\\H0.7x;\\S^2;}",15,500,0.0,7);
13246
+ * mxcad.drawMText(0,30,"\\A2;平方方法上标: m{\\H0.3x;\\S 2^;}",15,500,0.0,7);
13247
+ * mxcad.zoomAll();
13248
+ * mxcad.updateDisplay();
13249
+ * ```
13093
13250
  */
13094
13251
  drawMText(dPosX: number, dPosY: number, sContents: string, dHeight: number, dWidth: number, dRotation: number, iAttachment: McDb.AttachmentPoint): McObjectId;
13095
13252
  /**
@@ -14276,11 +14433,11 @@ export declare class MxCooperate {
14276
14433
  /**
14277
14434
  *创建协同工作
14278
14435
  */
14279
- createWrok(retCall?: (wrokId: number) => void): number;
14436
+ createWrok(retCall?: (wrokId: number) => void, sWorkName?: string): number;
14280
14437
  /**
14281
14438
  *得到当前正在协同的工作名列表
14282
14439
  */
14283
- getWorks(retCall: (workNames: number[]) => void): number;
14440
+ getWorks(retCall: (works: any[]) => void): number;
14284
14441
  /**
14285
14442
  *创建协同工作
14286
14443
  */
@@ -15233,6 +15390,7 @@ export interface ITableData {
15233
15390
  export interface ITableStyle {
15234
15391
  name: string;
15235
15392
  textHeight: number;
15393
+ outerBorderColor?: number;
15236
15394
  borderColor: number;
15237
15395
  textColor: number;
15238
15396
  backgroundColor?: number | null;
@@ -15266,6 +15424,7 @@ export interface ITableStyle {
15266
15424
  */
15267
15425
  borderLineType?: string;
15268
15426
  }
15427
+ export type ITableStyleInfo = Partial<Omit<ITableStyle, "name">>;
15269
15428
  /**
15270
15429
  * 表格尺寸接口
15271
15430
  */
@@ -15338,6 +15497,10 @@ export declare class McDbXlsxTable extends McDbCustomEntity {
15338
15497
  * */
15339
15498
  get colWidth(): number;
15340
15499
  set colWidth(val: number);
15500
+ private _style;
15501
+ get style(): Partial<Omit<ITableStyle, "name">> | null;
15502
+ /** 设置该表格样式 */
15503
+ setStyle(style: ITableStyleInfo): void;
15341
15504
  private _position;
15342
15505
  /** 表格位置和尺寸 - 渲染必需 */
15343
15506
  get position(): McGePoint3d;
package/dist/mxcad.es.js CHANGED
@@ -15080,7 +15080,7 @@ win.McDrawObjectEvent_asciiToUTF8 = function (hexstr) {
15080
15080
  return MxG2312Obj.decodeFromGb2312Imp(hexstr);
15081
15081
  };
15082
15082
 
15083
- const version$1 = "1.0.377";
15083
+ const version$1 = "1.0.379";
15084
15084
 
15085
15085
  var isSharedArrayBuffer = "SharedArrayBuffer" in window;
15086
15086
  var isCdn = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src);
@@ -19817,6 +19817,87 @@ var McDbMxRegion = /*#__PURE__*/function (_McDbEntity12) {
19817
19817
  }]);
19818
19818
  return McDbMxRegion;
19819
19819
  }(McDbEntity);
19820
+ var McDbViewport = /*#__PURE__*/function (_McDbEntity13) {
19821
+ _inherits$1(McDbViewport, _McDbEntity13);
19822
+ var _super28 = _createSuper$9(McDbViewport);
19823
+ function McDbViewport(x) {
19824
+ var _this24;
19825
+ _classCallCheck$1(this, McDbViewport);
19826
+ if (x instanceof Object) {
19827
+ _this24 = _super28.call(this, x);
19828
+ } else {
19829
+ _this24 = _super28.call(this);
19830
+ _this24.initTempObject(new MxCpp.mxcadassemblyimp.MdDbViewport());
19831
+ }
19832
+ return _possibleConstructorReturn$1(_this24);
19833
+ }
19834
+ _createClass$1(McDbViewport, [{
19835
+ key: "height",
19836
+ get: function get() {
19837
+ return this.imp.height();
19838
+ },
19839
+ set: function set(val) {
19840
+ this.imp.setHeight(val);
19841
+ }
19842
+ }, {
19843
+ key: "width",
19844
+ get: function get() {
19845
+ return this.imp.width();
19846
+ },
19847
+ set: function set(val) {
19848
+ this.imp.setWidth(val);
19849
+ }
19850
+ }, {
19851
+ key: "centerPoint",
19852
+ get: function get() {
19853
+ return new McGePoint3d(this.imp.centerPoint());
19854
+ },
19855
+ set: function set(vec) {
19856
+ this.imp.setCenterPoint(vec.imp);
19857
+ }
19858
+ }, {
19859
+ key: "viewTarget",
19860
+ get: function get() {
19861
+ return new McGePoint3d(this.imp.viewTarget());
19862
+ },
19863
+ set: function set(vec) {
19864
+ this.imp.setViewTarget(vec.imp);
19865
+ }
19866
+ }, {
19867
+ key: "viewDirection",
19868
+ get: function get() {
19869
+ return new McGeVector3d(this.imp.viewDirection());
19870
+ },
19871
+ set: function set(vec) {
19872
+ this.imp.setViewDirection(vec.imp);
19873
+ }
19874
+ }, {
19875
+ key: "viewHeight",
19876
+ get: function get() {
19877
+ return this.imp.viewHeight();
19878
+ },
19879
+ set: function set(val) {
19880
+ this.imp.setViewHeight(val);
19881
+ }
19882
+ }, {
19883
+ key: "viewCenter",
19884
+ get: function get() {
19885
+ return new McGePoint3d(this.imp.viewCenter());
19886
+ },
19887
+ set: function set(vec) {
19888
+ this.imp.setViewCenter(vec.imp);
19889
+ }
19890
+ }, {
19891
+ key: "twistAngle",
19892
+ get: function get() {
19893
+ return this.imp.twistAngle();
19894
+ },
19895
+ set: function set(val) {
19896
+ this.imp.setTwistAngle(val);
19897
+ }
19898
+ }]);
19899
+ return McDbViewport;
19900
+ }(McDbEntity);
19820
19901
 
19821
19902
  function _createSuper$8(t) { var r = _isNativeReflectConstruct$9(); return function () { var e, o = _getPrototypeOf$1(t); if (r) { var s = _getPrototypeOf$1(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn$1(this, e); }; }
19822
19903
  function _isNativeReflectConstruct$9() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$9 = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -22978,6 +23059,11 @@ var McObject = /*#__PURE__*/function () {
22978
23059
  var arrayBufferView = new Uint8Array(arrayBuffer);
22979
23060
  arrayBufferView.set(binaryData);
22980
23061
  mxmemory.clear();
23062
+ if (typeof filename === "string") {
23063
+ if (!/\.mxweb$/i.test(filename)) {
23064
+ filename += ".mxweb";
23065
+ }
23066
+ }
22981
23067
  MxTools.postMemoryFile(arrayBufferView, sSaveProgramUrl, filename || "temp.mxweb", call, param);
22982
23068
  return true;
22983
23069
  }
@@ -23075,6 +23161,36 @@ var McObject = /*#__PURE__*/function () {
23075
23161
  value: function getSysVarDouble(varName) {
23076
23162
  return this.imp.GetSysVarDouble(varName);
23077
23163
  }
23164
+ }, {
23165
+ key: "startBlockEdit",
23166
+ value: function startBlockEdit(idBlockRecord) {
23167
+ return this.imp.startBlockEdit(idBlockRecord.id);
23168
+ }
23169
+ }, {
23170
+ key: "endBlockEdit",
23171
+ value: function endBlockEdit() {
23172
+ return this.imp.endBlockEdit();
23173
+ }
23174
+ }, {
23175
+ key: "isBlockEditing",
23176
+ value: function isBlockEditing() {
23177
+ return this.imp.isBlockEditing();
23178
+ }
23179
+ }, {
23180
+ key: "startViewPortEdit",
23181
+ value: function startViewPortEdit(idBlockRecord) {
23182
+ return this.imp.startViewPortEdit(idBlockRecord.id);
23183
+ }
23184
+ }, {
23185
+ key: "endViewPortEdit",
23186
+ value: function endViewPortEdit() {
23187
+ return this.imp.endViewPortEdit();
23188
+ }
23189
+ }, {
23190
+ key: "isViewPortEditing",
23191
+ value: function isViewPortEditing() {
23192
+ return this.imp.isViewPortEditing();
23193
+ }
23078
23194
  }, {
23079
23195
  key: "getSysVarPoint",
23080
23196
  value: function getSysVarPoint(varName) {
@@ -23891,6 +24007,12 @@ var McAppType = /*#__PURE__*/function () {
23891
24007
  this.classNameToCreateCalls["McDbProxyEntity"] = function () {
23892
24008
  return new McDbProxyEntity();
23893
24009
  };
24010
+ this.objectIdToObjectCalls["McDbViewport"] = function (lIdIndex) {
24011
+ return new McDbViewport(_this8.imp.ObjectIdToMdDbViewport(lIdIndex));
24012
+ };
24013
+ this.classNameToCreateCalls["McDbViewport"] = function () {
24014
+ return new McDbViewport();
24015
+ };
23894
24016
  this.objectIdToObjectCalls["McDbRasterImage"] = function (lIdIndex) {
23895
24017
  return new McDbRasterImage(_this8.imp.ObjectIdToMdDbRasterImage(lIdIndex));
23896
24018
  };
@@ -24467,7 +24589,7 @@ var MxCooperate = /*#__PURE__*/function () {
24467
24589
  }
24468
24590
  _createClass$1(MxCooperate, [{
24469
24591
  key: "createWrok",
24470
- value: function createWrok(retCall) {
24592
+ value: function createWrok(retCall, sWorkName) {
24471
24593
  var win = window;
24472
24594
  win["coordinate_createWrok"] = function (_id, param) {
24473
24595
  win["coordinate_createWrok"] = void 0;
@@ -24479,7 +24601,8 @@ var MxCooperate = /*#__PURE__*/function () {
24479
24601
  retCall && retCall(0);
24480
24602
  }
24481
24603
  };
24482
- return this.mxcad.getImp().cooperate_createWrok();
24604
+ if (!sWorkName) sWorkName = "";
24605
+ return this.mxcad.getImp().cooperate_createWrok(sWorkName);
24483
24606
  }
24484
24607
  }, {
24485
24608
  key: "getWorks",
@@ -29355,10 +29478,10 @@ var TableDrawer = /*#__PURE__*/function () {
29355
29478
  var lastColX = actualColPositions[colCount];
29356
29479
  var borderLineWeight = style.borderLineWeight !== void 0 ? style.borderLineWeight : 0.25;
29357
29480
  var borderLineType = style.borderLineType || "Continuous";
29358
- this.drawLine(draw, new McGePoint3d(position.x, position.y, position.z), new McGePoint3d(lastColX, position.y, position.z), style.borderColor, mat, borderLineWeight, borderLineType);
29359
- this.drawLine(draw, new McGePoint3d(lastColX, position.y, position.z), new McGePoint3d(lastColX, lastRowY, position.z), style.borderColor, mat, borderLineWeight, borderLineType);
29360
- this.drawLine(draw, new McGePoint3d(lastColX, lastRowY, position.z), new McGePoint3d(position.x, lastRowY, position.z), style.borderColor, mat, borderLineWeight, borderLineType);
29361
- this.drawLine(draw, new McGePoint3d(position.x, lastRowY, position.z), new McGePoint3d(position.x, position.y, position.z), style.borderColor, mat, borderLineWeight, borderLineType);
29481
+ this.drawLine(draw, new McGePoint3d(position.x, position.y, position.z), new McGePoint3d(lastColX, position.y, position.z), style.outerBorderColor || style.borderColor, mat, borderLineWeight, borderLineType);
29482
+ this.drawLine(draw, new McGePoint3d(lastColX, position.y, position.z), new McGePoint3d(lastColX, lastRowY, position.z), style.outerBorderColor || style.borderColor, mat, borderLineWeight, borderLineType);
29483
+ this.drawLine(draw, new McGePoint3d(lastColX, lastRowY, position.z), new McGePoint3d(position.x, lastRowY, position.z), style.outerBorderColor || style.borderColor, mat, borderLineWeight, borderLineType);
29484
+ this.drawLine(draw, new McGePoint3d(position.x, lastRowY, position.z), new McGePoint3d(position.x, position.y, position.z), style.outerBorderColor || style.borderColor, mat, borderLineWeight, borderLineType);
29362
29485
  for (var i = 1; i < colCount; i++) {
29363
29486
  var x = actualColPositions[i];
29364
29487
  for (var r = 0; r < rowCount; r++) {
@@ -29906,11 +30029,11 @@ var CellStyleHelper = /*#__PURE__*/function () {
29906
30029
  return CellStyleHelper;
29907
30030
  }();
29908
30031
 
29909
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
29910
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29911
30032
  function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
29912
30033
  function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
29913
30034
  function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
30035
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
30036
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29914
30037
  function _createSuper$2(t) { var r = _isNativeReflectConstruct$3(); return function () { var e, o = _getPrototypeOf$1(t); if (r) { var s = _getPrototypeOf$1(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn$1(this, e); }; }
29915
30038
  function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { return !!t; })(); }
29916
30039
  function transformVectorByMatrix(matrix, vec) {
@@ -29954,6 +30077,7 @@ var McDbXlsxTable = /*#__PURE__*/function (_McDbCustomEntity) {
29954
30077
  _defineProperty(_assertThisInitialized$1(_this), "matrix", new McGeMatrix3d());
29955
30078
  _defineProperty(_assertThisInitialized$1(_this), "_rowHeight", 20);
29956
30079
  _defineProperty(_assertThisInitialized$1(_this), "_colWidth", 50);
30080
+ _defineProperty(_assertThisInitialized$1(_this), "_style", null);
29957
30081
  _defineProperty(_assertThisInitialized$1(_this), "_position", new McGePoint3d(0, 0, 0));
29958
30082
  _defineProperty(_assertThisInitialized$1(_this), "_renderDirection", TableRenderDirection.BottomRight);
29959
30083
  _defineProperty(_assertThisInitialized$1(_this), "_styleName", "");
@@ -29994,6 +30118,17 @@ var McDbXlsxTable = /*#__PURE__*/function (_McDbCustomEntity) {
29994
30118
  this.assertWrite();
29995
30119
  this._colWidth = val;
29996
30120
  }
30121
+ }, {
30122
+ key: "style",
30123
+ get: function get() {
30124
+ return this._style;
30125
+ }
30126
+ }, {
30127
+ key: "setStyle",
30128
+ value: function setStyle(style) {
30129
+ this.assertWrite();
30130
+ this._style = _objectSpread(_objectSpread({}, this._style), style);
30131
+ }
29997
30132
  }, {
29998
30133
  key: "position",
29999
30134
  get: function get() {
@@ -30218,6 +30353,8 @@ var McDbXlsxTable = /*#__PURE__*/function (_McDbCustomEntity) {
30218
30353
  var renderDirectionStr = filter.readString("renderDirection").val;
30219
30354
  this._renderDirection = renderDirectionStr ? renderDirectionStr : TableRenderDirection.BottomRight;
30220
30355
  this._xlsxData = filter.readString("xlsxData").val;
30356
+ var style = filter.readString("style").val;
30357
+ if (style) this._style = JSON.parse(style);
30221
30358
  var matrix = filter.readString("matrix").val;
30222
30359
  var matrixData = JSON.parse(matrix);
30223
30360
  for (var index = 0; index < matrixData.length; index++) {
@@ -30263,6 +30400,9 @@ var McDbXlsxTable = /*#__PURE__*/function (_McDbCustomEntity) {
30263
30400
  filter.writePoint("position", this.position);
30264
30401
  filter.writeString("styleName", this.styleName);
30265
30402
  filter.writeString("renderDirection", this._renderDirection);
30403
+ if (this._style) {
30404
+ filter.writeString("style", JSON.stringify(this._style));
30405
+ }
30266
30406
  filter.writeString("xlsxData", this._xlsxData);
30267
30407
  filter.writeString("selectedCells", JSON.stringify(this._selectedCells));
30268
30408
  var matrix = [];
@@ -30479,6 +30619,9 @@ var McDbXlsxTable = /*#__PURE__*/function (_McDbCustomEntity) {
30479
30619
  if (!style) {
30480
30620
  return;
30481
30621
  }
30622
+ if (this._style) {
30623
+ style = _objectSpread(_objectSpread({}, style), this._style);
30624
+ }
30482
30625
  var tablePosition = {
30483
30626
  x: this.position.x,
30484
30627
  y: this.position.y,
@@ -38474,9 +38617,10 @@ function Mx_Cooperate_OnEvent() {
38474
38617
  }
38475
38618
  function Mx_Cooperate_Create() {
38476
38619
  var cooperate = MxCpp.mxcad.getCooperate();
38620
+ var workName = "TestWork";
38477
38621
  cooperate.createWrok(function (workid) {
38478
38622
  if (workid > 0) {
38479
- console.log("create cooperate ok,work name:" + workid);
38623
+ console.log("create cooperate ok,work name:" + workName + ",id:" + workid);
38480
38624
  } else {
38481
38625
  var lErrorCode = -workid;
38482
38626
  console.log("create cooperate failed,error code:" + lErrorCode);
@@ -38484,16 +38628,17 @@ function Mx_Cooperate_Create() {
38484
38628
  console.log("create cooperate Has been created");
38485
38629
  }
38486
38630
  }
38487
- });
38631
+ }, workName);
38488
38632
  Mx_Cooperate_OnEvent();
38489
38633
  }
38490
38634
  function Mx_Cooperate_Join() {
38491
38635
  var cooperate = MxCpp.mxcad.getCooperate();
38492
38636
  cooperate.getWorks(function (works) {
38493
38637
  if (works.length > 0) {
38494
- cooperate.joinWork(works[0], function (iRet) {
38638
+ console.log(JSON.stringify(works[0]));
38639
+ cooperate.joinWork(works[0].work_id, function (iRet) {
38495
38640
  if (iRet == 0) {
38496
- console.log("join cooperate ok,work name:" + works[0]);
38641
+ console.log("join cooperate ok,work name:" + JSON.stringify(works[0]));
38497
38642
  } else {
38498
38643
  console.log("join cooperate failed,error code:" + iRet);
38499
38644
  if (iRet == 17) {
@@ -46298,7 +46443,109 @@ function _Mx_PasteClipboard() {
46298
46443
  }));
46299
46444
  return _Mx_PasteClipboard.apply(this, arguments);
46300
46445
  }
46446
+ function Mx_StartBlockEdit() {
46447
+ return _Mx_StartBlockEdit.apply(this, arguments);
46448
+ }
46449
+ function _Mx_StartBlockEdit() {
46450
+ _Mx_StartBlockEdit = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee28() {
46451
+ var retIds, id, ent;
46452
+ return regenerator.wrap(function _callee28$(_context38) {
46453
+ while (1) switch (_context38.prev = _context38.next) {
46454
+ case 0:
46455
+ _context38.next = 2;
46456
+ return MxCADUtility.selectEnt("\u9009\u62E9\u9700\u8981\u88AB\u7F16\u8F91\u7684\u5757\u5F15\u7528", new MxCADResbuf([DxfCode.kEntityType, "INSERT"]));
46457
+ case 2:
46458
+ retIds = _context38.sent;
46459
+ if (!(retIds.length == 0)) {
46460
+ _context38.next = 5;
46461
+ break;
46462
+ }
46463
+ return _context38.abrupt("return");
46464
+ case 5:
46465
+ id = retIds[0];
46466
+ ent = id.getMcDbEntity();
46467
+ if (ent instanceof McDbBlockReference) {
46468
+ MxCpp.mxcad.startBlockEdit(ent.blockTableRecordId);
46469
+ }
46470
+ case 8:
46471
+ case "end":
46472
+ return _context38.stop();
46473
+ }
46474
+ }, _callee28);
46475
+ }));
46476
+ return _Mx_StartBlockEdit.apply(this, arguments);
46477
+ }
46478
+ function Mx_EndBlockEdit() {
46479
+ return _Mx_EndBlockEdit.apply(this, arguments);
46480
+ }
46481
+ function _Mx_EndBlockEdit() {
46482
+ _Mx_EndBlockEdit = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee29() {
46483
+ return regenerator.wrap(function _callee29$(_context39) {
46484
+ while (1) switch (_context39.prev = _context39.next) {
46485
+ case 0:
46486
+ MxCpp.mxcad.endBlockEdit();
46487
+ case 1:
46488
+ case "end":
46489
+ return _context39.stop();
46490
+ }
46491
+ }, _callee29);
46492
+ }));
46493
+ return _Mx_EndBlockEdit.apply(this, arguments);
46494
+ }
46495
+ function Mx_StartViewPortEdit() {
46496
+ return _Mx_StartViewPortEdit.apply(this, arguments);
46497
+ }
46498
+ function _Mx_StartViewPortEdit() {
46499
+ _Mx_StartViewPortEdit = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee30() {
46500
+ var retIds, id, ent;
46501
+ return regenerator.wrap(function _callee30$(_context40) {
46502
+ while (1) switch (_context40.prev = _context40.next) {
46503
+ case 0:
46504
+ _context40.next = 2;
46505
+ return MxCADUtility.selectEnt("\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u89C6\u53E3", new MxCADResbuf([DxfCode.kEntityType, "VIEWPORT"]));
46506
+ case 2:
46507
+ retIds = _context40.sent;
46508
+ if (!(retIds.length == 0)) {
46509
+ _context40.next = 5;
46510
+ break;
46511
+ }
46512
+ return _context40.abrupt("return");
46513
+ case 5:
46514
+ id = retIds[0];
46515
+ ent = id.getMcDbEntity();
46516
+ if (ent instanceof McDbViewport) {
46517
+ MxCpp.mxcad.startViewPortEdit(id);
46518
+ }
46519
+ case 8:
46520
+ case "end":
46521
+ return _context40.stop();
46522
+ }
46523
+ }, _callee30);
46524
+ }));
46525
+ return _Mx_StartViewPortEdit.apply(this, arguments);
46526
+ }
46527
+ function Mx_EndViewPortEdit() {
46528
+ return _Mx_EndViewPortEdit.apply(this, arguments);
46529
+ }
46530
+ function _Mx_EndViewPortEdit() {
46531
+ _Mx_EndViewPortEdit = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee31() {
46532
+ return regenerator.wrap(function _callee31$(_context41) {
46533
+ while (1) switch (_context41.prev = _context41.next) {
46534
+ case 0:
46535
+ MxCpp.mxcad.endViewPortEdit();
46536
+ case 1:
46537
+ case "end":
46538
+ return _context41.stop();
46539
+ }
46540
+ }, _callee31);
46541
+ }));
46542
+ return _Mx_EndViewPortEdit.apply(this, arguments);
46543
+ }
46301
46544
  MxFun.on("init", function () {
46545
+ MxFun.addCommand("Mx_StartBlockEdit", Mx_StartBlockEdit);
46546
+ MxFun.addCommand("Mx_EndBlockEdit", Mx_EndBlockEdit);
46547
+ MxFun.addCommand("Mx_StartViewPortEdit", Mx_StartViewPortEdit);
46548
+ MxFun.addCommand("Mx_EndViewPortEdit", Mx_EndViewPortEdit);
46302
46549
  MxFun.addCommand("Mx_Erase", Mx_Erase);
46303
46550
  MxFun.addCommand("Mx_Copy", Mx_Copy, MxType.MxCommandFlag.MCRX_CMD_NO_CLEAR_SELECT);
46304
46551
  MxFun.addCommand("Mx_Move", Mx_Move, MxType.MxCommandFlag.MCRX_CMD_NO_CLEAR_SELECT);
@@ -103890,6 +104137,7 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
103890
104137
  McDbXline,
103891
104138
  McDbRay,
103892
104139
  McDbMxRegion,
104140
+ McDbViewport,
103893
104141
  FetchAttributes,
103894
104142
  McObjectTempDraw,
103895
104143
  McObject,
@@ -103949,4 +104197,4 @@ globalThis.Buffer = buffer$1.Buffer;
103949
104197
  globalThis.Buffer.alloc = buffer$1.Buffer.alloc;
103950
104198
  globalThis.Buffer.from = buffer$1.Buffer.from;
103951
104199
 
103952
- export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, MLineJustificationType, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDiametricDimension, McDbDictionary, McDbDimStyleTable, McDbDimStyleTableRecord, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch$1 as McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMLine, McDbMText, McDbMxRegion, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRadialDimension, McDbRasterImage, McDbRasterImageDef, McDbRay, McDbRotatedDimension, McDbSpatialFilter, McDbSpline, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbWipeout, McDbXline, McDbXlsxTable, McDbXrecord, McGeBound, McGeDoubleArray, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McObjectTempDraw, McRxObject, MxCADBaseCustomElement, MxCADBaseCustomText, MxCADCloneType, MxCADMText, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADTempForbiddenIntelliSelect, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrPointTransform, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCADWorldDrawType, MxCanvas2Image, MxCheckTheBrowser, MxCompare, MxCooperate, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxModifyColor, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTIFFLoader, MxTools, Mx_About, Mx_Erase, TableRenderDirection, _ML_String, b64Decode, b64Encode, crateHexString, createCursor, createMcCmColor, createMxCad, mxcad as default, downloadFile, downloadFileFromUrl, drawArc, drawCircle, drawEllipticalArc, drawLine, drawMText, drawPolyLine, drawPolygon, drawRectang, drawText, getColorUtils, getFileFromUrl, getFilterImp, getJsonFromUrl, loadMxCADassembly, mx_gcj02_To_gps84, mx_gps84_To_gcj02, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };
104200
+ export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, MLineJustificationType, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDiametricDimension, McDbDictionary, McDbDimStyleTable, McDbDimStyleTableRecord, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch$1 as McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMLine, McDbMText, McDbMxRegion, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRadialDimension, McDbRasterImage, McDbRasterImageDef, McDbRay, McDbRotatedDimension, McDbSpatialFilter, McDbSpline, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbViewport, McDbWipeout, McDbXline, McDbXlsxTable, McDbXrecord, McGeBound, McGeDoubleArray, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McObjectTempDraw, McRxObject, MxCADBaseCustomElement, MxCADBaseCustomText, MxCADCloneType, MxCADMText, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADTempForbiddenIntelliSelect, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrPointTransform, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCADWorldDrawType, MxCanvas2Image, MxCheckTheBrowser, MxCompare, MxCooperate, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxModifyColor, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTIFFLoader, MxTools, Mx_About, Mx_Erase, TableRenderDirection, _ML_String, b64Decode, b64Encode, crateHexString, createCursor, createMcCmColor, createMxCad, mxcad as default, downloadFile, downloadFileFromUrl, drawArc, drawCircle, drawEllipticalArc, drawLine, drawMText, drawPolyLine, drawPolygon, drawRectang, drawText, getColorUtils, getFileFromUrl, getFilterImp, getJsonFromUrl, loadMxCADassembly, mx_gcj02_To_gps84, mx_gps84_To_gcj02, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };