-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCOMTools.cs
More file actions
1652 lines (1494 loc) · 62.4 KB
/
Copy pathCOMTools.cs
File metadata and controls
1652 lines (1494 loc) · 62.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.AutoCAD.ApplicationServices;
using System.Reflection;
using System.Drawing;
namespace DotNetARX
{
/// <summary>
/// 文字的字体样式
/// </summary>
public enum FontStyle
{
/// <summary>
/// 常规
/// </summary>
Regular,
/// <summary>
/// 斜体
/// </summary>
Italic,
/// <summary>
/// 加粗
/// </summary>
Bold,
/// <summary>
/// 加粗斜体
/// </summary>
BoldItalic
}
/// <summary>
/// 如何获取自动对齐点
/// </summary>
public enum AlignmentPointAcquisition
{
/// <summary>
/// 自动获取自动对齐点
/// </summary>
Automatic,
/// <summary>
/// 用户必须使用shift键获取自动对齐点
/// </summary>
ShiftToAcquire
}
/// <summary>
/// 指定若图形包含第三方应用程序所创建的自定义对象时,是否以及何时由 AutoCAD 按需加载该应用程序
/// </summary>
public enum ARXDemandLoad
{
/// <summary>
/// 关闭按需加载
/// </summary>
Disabled,
/// <summary>
/// 在打开包含自定义对象的图形时按需加载源应用程序
/// </summary>
OnObjectDetect,
/// <summary>
/// 在调用应用程序的某个命令时按需加载源应用程序
/// </summary>
CmdInvoke
}
/// <summary>
/// 指定外部参照对象的按需加载性能
/// </summary>
public enum XRefDemandLoad
{
/// <summary>
/// 关闭按需加载,加载整个参照图形
/// </summary>
Disabled,
/// <summary>
/// 打开按需加载来提高AutoCAD性能
/// </summary>
LoadEnabled,
/// <summary>
/// 打开按需加载但使用参照图形的临时副本
/// </summary>
EnabledWithCopy
}
/// <summary>
/// 控制图形中由第三方应用程序所创建对象的显示
/// </summary>
public enum ProxyImage
{
/// <summary>
/// 不显示代理对象
/// </summary>
NotShow,
/// <summary>
/// 显示所有代理对象的图形图像
/// </summary>
Show,
/// <summary>
/// 仅显示所有代理对象的边框
/// </summary>
BoundingBox
}
/// <summary>
/// 指定图形的保存类型
/// </summary>
public enum SaveAsType
{
/// <summary>
/// AutoCAD R14 DWG (*.dwg)
/// </summary>
acR14_dwg = 8,
/// <summary>
/// AutoCAD 2000 DWG (*.dwg)
/// </summary>
ac2000_dwg = 12,
/// <summary>
/// AutoCAD 2000 DXF (*.dxf)
/// </summary>
ac2000_dxf = 13,
/// <summary>
/// AutoCAD 2000 图形样板文件 (*.dwt)
/// </summary>
ac2000_Template = 14,
/// <summary>
/// AutoCAD 2004 DWG (*.dwg)
/// </summary>
ac2004_dwg = 24,
/// <summary>
/// AutoCAD 2004 DXF (*.dxf)
/// </summary>
ac2004_dxf = 25,
/// <summary>
/// AutoCAD 2004 图形样板文件 (*.dwt)
/// </summary>
ac2004_Template = 26,
/// <summary>
/// AutoCAD 2007 DWG (*.dwg)
/// </summary>
ac2007_dwg = 36,
/// <summary>
/// AutoCAD 2007 DXF (*.dxf)
/// </summary>
ac2007_dxf = 37,
/// <summary>
/// AutoCAD 2007 图形样板文件 (*.dwt)
/// </summary>
ac2007_Template = 38,
/// <summary>
/// AutoCAD 2010 DWG (*.dwg)
/// </summary>
ac2010_dwg = 48,
/// <summary>
/// AutoCAD 2010 DXF (*.dxf)
/// </summary>
ac2010_dxf,
/// <summary>
/// AutoCAD 2010 图形样板文件 (*.dwt)
/// </summary>
ac2010_Template,
/// <summary>
/// 与当前图形版本格式相同
/// </summary>
acNative = 36,
/// <summary>
/// 图形类型未知或无效
/// </summary>
acUnknown = -1,
}
/// <summary>
/// 指定OLE对象的打印质量
/// </summary>
public enum OleQuality
{
/// <summary>
/// 线条
/// </summary>
LineArt,
/// <summary>
/// 文字
/// </summary>
Text,
/// <summary>
/// 图形
/// </summary>
Graphics,
/// <summary>
/// 照片
/// </summary>
Photo,
/// <summary>
/// 高质量照片
/// </summary>
HighPhoto
}
/// <summary>
/// 确定在创建新图形时对象颜色属性是否与打印样式名称关联
/// </summary>
public enum PlotPolicy
{
/// <summary>
/// 为新图形或早期的AutoCAD版本下的图形指定颜色相关打印样式
/// </summary>
Legacy,
/// <summary>
/// 为新图形或早期的AutoCAD版本下的图形指定命名打印样式
/// </summary>
Named
}
/// <summary>
/// 指定当由于I/O 端口冲突造成向设备的输出必须通过系统打印机缓冲时是否警告用户
/// </summary>
public enum PrinterSpoolAlert
{
/// <summary>
/// 始终警告并创建错误日志
/// </summary>
AlwaysAlert,
/// <summary>
/// 仅第一次警告但创建所有错误日志
/// </summary>
AlertOnce,
/// <summary>
/// 从不警告但创建所有错误日志
/// </summary>
NeverAlertLogOnce,
/// <summary>
/// 从不警告也从不创建任何错误日志
/// </summary>
NeverAlert
}
/// <summary>
/// 确定在 AutoCAD 设计中心源图形未分配插入单位的对象自动使用的单位
/// </summary>
public enum InsertUnits
{
/// <summary>
/// 不指定(无单位)
/// </summary>
Unitless,
/// <summary>
/// 英寸
/// </summary>
Inches,
/// <summary>
/// 英尺
/// </summary>
Feet,
/// <summary>
/// 英里
/// </summary>
Miles,
/// <summary>
/// 毫米
/// </summary>
Millimeters,
/// <summary>
/// 厘米
/// </summary>
Centimeters,
/// <summary>
/// 米
/// </summary>
Meters,
/// <summary>
/// 公里
/// </summary>
Kilometers,
/// <summary>
/// 微英寸
/// </summary>
Microinches,
/// <summary>
/// 英里
/// </summary>
Mils,
/// <summary>
/// 码
/// </summary>
Yards,
/// <summary>
/// 埃
/// </summary>
Angstroms,
/// <summary>
/// 纳米
/// </summary>
Nanometers,
/// <summary>
/// 微米
/// </summary>
Microns,
/// <summary>
/// 分米
/// </summary>
Decimeters,
/// <summary>
/// 十米
/// </summary>
Decameters,
/// <summary>
/// 百米
/// </summary>
Hectometers,
/// <summary>
/// 百万公里
/// </summary>
Gigameters,
/// <summary>
/// 天文单位
/// </summary>
AstronomicalUnits,
/// <summary>
/// 光年
/// </summary>
LightYears,
/// <summary>
/// 秒差距
/// </summary>
Parsecs
}
/// <summary>
/// 指定 Windows 标准或 AutoCAD 传统快捷键
/// </summary>
public enum KeyboardAccelerator
{
/// <summary>
/// 使用 AutoCAD 传统键盘设置
/// </summary>
PreferenceClassic,
/// <summary>
/// 使用 Windows 标准键盘设置
/// </summary>
PreferenceCustom
}
/// <summary>
/// 控制 AutoCAD 如何响应坐标数据的输入
/// </summary>
public enum KeyboardPriority
{
/// <summary>
/// 当输入坐标时,严格遵照对象捕捉模式
/// </summary>
RunningObjSnap,
/// <summary>
/// 当输入坐标时,严格遵照键盘输入模式
/// </summary>
Entry,
/// <summary>
/// 当输入坐标时,严格按照键盘输入模式。但当坐标是通过脚本输入时,遵照对象捕捉模式
/// </summary>
EntryExceptScripts
}
/// <summary>
/// 决定处于命令模式 (有一个命令正在执行) 时绘图区域中右键单击的功能
/// </summary>
public enum DrawingAreaSCMCommand
{
/// <summary>
/// 禁用命令快捷菜单,结果为当命令期间按右键为回车
/// </summary>
Enter,
/// <summary>
/// 启用命令快捷菜单
/// </summary>
EnableSCM,
/// <summary>
/// 只在命令行提示中选项当前有效时启用命令快捷菜单。在命令行提示中,选项是在方括号[]中。如果没有有效的选项,右键为回车
/// </summary>
EnableSCMOptions
}
/// <summary>
/// 决定处于默认模式 (未选中对象且无命令在执行) 时绘图区域中右键单击的功能
/// </summary>
public enum DrawingAreaSCMDefault
{
/// <summary>
/// 禁用默认快捷菜单
/// </summary>
RepeatLastCommand,
/// <summary>
/// 启用默认快捷菜单
/// </summary>
SCM
}
/// <summary>
/// 决定处于编辑模式 (选中一个或多个对象且无命令在执行) 时绘图区域中右键单击的功能
/// </summary>
public enum DrawingAreaSCMEdit
{
/// <summary>
/// 禁用编辑快捷菜单
/// </summary>
EdRepeatLastCommand,
/// <summary>
/// 启用编辑快捷菜单
/// </summary>
EdSCM
}
/// <summary>
/// 封装COM的Preferences类,该类指定当前 AutoCAD 设置
/// </summary>
public static class Preferences
{
//获取Preferences对象(COM类)
static Type AcadPreferences = Type.GetTypeFromHandle(Type.GetTypeHandle(Application.Preferences));
/// <summary>
/// 获取“选项”对话框对应选项卡上选项的属性值
/// </summary>
/// <param name="ProjectName">选项卡名称</param>
/// <param name="PropertyName">属性名称</param>
/// <returns>返回选项的属性值</returns>
public static object GetProperties(string ProjectName, string PropertyName)
{
try
{
//通过后期绑定的方式调用Preferences对象的ProjectName属性
object obj = AcadPreferences.InvokeMember(ProjectName, BindingFlags.GetProperty, null, Application.Preferences, new object[0]);
//获取ProjectName属性对应的COM类
Type AcadPreferencesUnknown = Type.GetTypeFromHandle(Type.GetTypeHandle(obj));
//获取ProjectName属性对应的COM类的PropertyName属性
return (object)AcadPreferencesUnknown.InvokeMember(PropertyName, BindingFlags.GetProperty, null, obj, new object[0]);
}
catch
{
return null;
}
}
/// <summary>
/// 设置“选项”对话框对应选项卡上选项的属性值
/// </summary>
/// <param name="ProjectName">选项卡名称</param>
/// <param name="PropertyName">属性名称</param>
/// <param name="Value">属性值</param>
/// <returns>如果属性设置成功,则返回true,否则返回false</returns>
public static bool SetProperties(string ProjectName, string PropertyName, object Value)
{
try
{
object obj = AcadPreferences.InvokeMember(ProjectName, BindingFlags.GetProperty, null, Application.Preferences, new object[0]);
Type AcadPreferencesUnknown = Type.GetTypeFromHandle(Type.GetTypeHandle(obj));
AcadPreferencesUnknown.InvokeMember(PropertyName, BindingFlags.SetProperty, null, obj, new object[1] { Value });
return true;
}
catch
{
return false;
}
}
/// <summary>
/// “选项”对话框“显示”选项卡的所有选项
/// </summary>
public static class Display
{
/// <summary>
/// 获取或设置自动追踪矢量的颜色
/// </summary>
public static Color AutoTrackingVecColor
{
get { return ColorTranslator.FromOle(Convert.ToInt32(Preferences.GetProperties("Display", "AutoTrackingVecColor"))); }
set { Preferences.SetProperties("Display", "AutoTrackingVecColor", ColorTranslator.ToOle(value)); }
}
/// <summary>
/// 获取或设置十字光标的大小(屏幕大小的百分比)
/// </summary>
public static int CursorSize
{
get { return (int)Preferences.GetProperties("Display", "CursorSize"); }
set { Preferences.SetProperties("Display", "CursorSize", value); }
}
/// <summary>
/// 获取或设置是否在图形编辑器中显示模型和布局选项卡
/// </summary>
public static bool DisplayLayoutTabs
{
get { return (bool)Preferences.GetProperties("Display", "DisplayLayoutTabs"); }
set { Preferences.SetProperties("Display", "DisplayLayoutTabs", value); }
}
/// <summary>
/// 获取或设置是否在图形窗口的右边显示屏幕菜单。
/// </summary>
public static bool DisplayScreenMenu
{
get { return (bool)Preferences.GetProperties("Display", "DisplayScreenMenu"); }
set { Preferences.SetProperties("Display", "DisplayScreenMenu", value); }
}
/// <summary>
/// 获取或设置是否在图形窗口的下边和右边显示滚动条
/// </summary>
public static bool DisplayScrollBars
{
get { return (bool)Preferences.GetProperties("Display", "DisplayScrollBars"); }
set { Preferences.SetProperties("Display", "DisplayScrollBars", value); }
}
/// <summary>
/// 获取或设置命令窗口所显示的文字行数
/// </summary>
public static int DockedVisibleLines
{
get { return (int)Preferences.GetProperties("Display", "DockedVisibleLines"); }
set { Preferences.SetProperties("Display", "DockedVisibleLines", value); }
}
/// <summary>
/// 获取或设置图纸空间布局的背景颜色
/// </summary>
public static Color GraphicsWinLayoutBackgrndColor
{
get { return ColorTranslator.FromOle(Convert.ToInt32(Preferences.GetProperties("Display", "GraphicsWinLayoutBackgrndColor"))); }
set { Preferences.SetProperties("Display", "GraphicsWinLayoutBackgrndColor", ColorTranslator.ToOle(value)); }
}
/// <summary>
/// 获取或设置模型空间窗口的背景颜色
/// </summary>
public static Color GraphicsWinModelBackgrndColor
{
get { return ColorTranslator.FromOle(Convert.ToInt32(Preferences.GetProperties("Display", "GraphicsWinModelBackgrndColor"))); }
set { Preferences.SetProperties("Display", "GraphicsWinModelBackgrndColor", ColorTranslator.ToOle(value)); }
}
/// <summary>
/// 获取或设置保留在内存中的文本窗口中的文字行数
/// </summary>
public static int HistoryLines
{
get { return (int)Preferences.GetProperties("Display", "HistoryLines"); }
set { Preferences.SetProperties("Display", "HistoryLines", value); }
}
/// <summary>
/// 获取或设置是否在选择过程中显示光栅图像
/// </summary>
public static bool ImageFrameHighlight
{
get { return (bool)Preferences.GetProperties("Display", "ImageFrameHighlight"); }
set { Preferences.SetProperties("Display", "ImageFrameHighlight", value); }
}
/// <summary>
/// 获取或设置是否自动为新布局创建视口
/// </summary>
public static bool LayoutCreateViewport
{
get { return (bool)Preferences.GetProperties("Display", "LayoutCreateViewport"); }
set { Preferences.SetProperties("Display", "LayoutCreateViewport", value); }
}
/// <summary>
/// 获取或设置图纸空间布局中十字光标和文字的颜色
/// </summary>
public static Color LayoutCrosshairColor
{
get { return ColorTranslator.FromOle(Convert.ToInt32(Preferences.GetProperties("Display", "LayoutCrosshairColor"))); }
set { Preferences.SetProperties("Display", "LayoutCrosshairColor", ColorTranslator.ToOle(value)); }
}
/// <summary>
/// 获取或设置是否在布局中显示页边距
/// </summary>
public static bool LayoutDisplayMargins
{
get { return (bool)Preferences.GetProperties("Display", "LayoutDisplayMargins"); }
set { Preferences.SetProperties("Display", "LayoutDisplayMargins", value); }
}
/// <summary>
/// 获取或设置是否在布局中显示图纸背景
/// </summary>
public static bool LayoutDisplayPaper
{
get { return (bool)Preferences.GetProperties("Display", "LayoutDisplayPaper"); }
set { Preferences.SetProperties("Display", "LayoutDisplayPaper", value); }
}
/// <summary>
/// 获取或设置是否在布局中显示图纸背景阴影
/// </summary>
public static bool LayoutDisplayPaperShadow
{
get { return (bool)Preferences.GetProperties("Display", "LayoutDisplayPaperShadow"); }
set { Preferences.SetProperties("Display", "LayoutDisplayPaperShadow", value); }
}
/// <summary>
/// 获取或设置是否在创建新布局时显示“打印设置”对话框
/// </summary>
public static bool LayoutShowPlotSetup
{
get { return (bool)Preferences.GetProperties("Display", "LayoutShowPlotSetup"); }
set { Preferences.SetProperties("Display", "LayoutShowPlotSetup", value); }
}
/// <summary>
/// 获取或设置在AutoCAD 启动时是否布满整个屏幕
/// </summary>
public static bool MaxAutoCADWindow
{
get { return (bool)Preferences.GetProperties("Display", "MaxAutoCADWindow"); }
set { Preferences.SetProperties("Display", "MaxAutoCADWindow", value); }
}
/// <summary>
/// 获取或设置模型空间十字光标和文字的颜色
/// </summary>
public static Color ModelCrosshairColor
{
get { return ColorTranslator.FromOle(Convert.ToInt32(Preferences.GetProperties("Display", "ModelCrosshairColor"))); }
set { Preferences.SetProperties("Display", "ModelCrosshairColor", ColorTranslator.ToOle(value)); }
}
/// <summary>
/// 获取或设置是否在实时平移和缩放时显示光栅图像
/// </summary>
public static bool ShowRasterImage
{
get { return (bool)Preferences.GetProperties("Display", "ShowRasterImage"); }
set { Preferences.SetProperties("Display", "ShowRasterImage", value); }
}
/// <summary>
/// 获取或设置文字的字号
/// </summary>
public static int TextFontSize
{
get { return (int)Preferences.GetProperties("Display", "TextFontSize"); }
set { Preferences.SetProperties("Display", "TextFontSize", value); }
}
/// <summary>
/// 获取或设置文字的字体
/// </summary>
public static string TextFont
{
get { return (string)Preferences.GetProperties("Display", "TextFont"); }
set { Preferences.SetProperties("Display", "TextFont", value); }
}
/// <summary>
/// 获取或设置文字的字体样式
/// </summary>
public static FontStyle TextFontStyle
{
get { return (FontStyle)Preferences.GetProperties("Display", "TextFontStyle"); }
set { Preferences.SetProperties("Display", "TextFontStyle", value); }
}
/// <summary>
/// 获取或设置文本窗口的背景颜色
/// </summary>
public static Color TextWinBackgrndColor
{
get { return ColorTranslator.FromOle(Convert.ToInt32(Preferences.GetProperties("Display", "TextWinBackgrndColor"))); }
set { Preferences.SetProperties("Display", "TextWinBackgrndColor", ColorTranslator.ToOle(value)); }
}
/// <summary>
/// 获取或设置文本窗口的文字颜色
/// </summary>
public static Color TextWinTextColor
{
get { return ColorTranslator.FromOle(Convert.ToInt32(Preferences.GetProperties("Display", "TextWinTextColor"))); }
set { Preferences.SetProperties("Display", "TextWinTextColor", ColorTranslator.ToOle(value)); }
}
/// <summary>
/// 获取或设置是否以真彩色显示光栅和渲染图像
/// </summary>
public static bool TrueColorImages
{
get { return (bool)Preferences.GetProperties("Display", "TrueColorImages"); }
set { Preferences.SetProperties("Display", "TrueColorImages", value); }
}
/// <summary>
/// 获取或设置照对象的褪色度百分比
/// </summary>
public static int XRefFadeIntensity
{
get { return (int)Preferences.GetProperties("Display", "XRefFadeIntensity"); }
set { Preferences.SetProperties("Display", "XRefFadeIntensity", value); }
}
}
/// <summary>
/// “选项”对话框“文件”选项卡的所有选项
/// </summary>
public static class Files
{
/// <summary>
/// 获取或设置AutoCAD 进程的活动配置
/// </summary>
public static string ActiveProfile
{
get { return (string)Preferences.GetProperties("Profiles", "ActiveProfile"); }
set { Preferences.SetProperties("Profiles", "ActiveProfile", value); }
}
/// <summary>
/// 当 AutoCAD 找不到源字体并且字体映射文件中未指定替换字体时所使用的字体文件的位置
/// </summary>
public static string AltFontFile
{
get { return (string)Preferences.GetProperties("Files", "AltFontFile"); }
set { Preferences.SetProperties("Files", "AltFontFile", value); }
}
/// <summary>
/// 获取或设置与标准 AutoCAD 数字化仪菜单交换的替换菜单的路径
/// </summary>
public static string AltTabletMenuFile
{
get { return (string)Preferences.GetProperties("Files", "AltTabletMenuFile"); }
set { Preferences.SetProperties("Files", "AltTabletMenuFile", value); }
}
/// <summary>
/// 获取或设置自动保存所创建文件的路径
/// </summary>
public static string AutoSavePath
{
get { return (string)Preferences.GetProperties("Files", "AutoSavePath"); }
set { Preferences.SetProperties("Files", "AutoSavePath", value); }
}
/// <summary>
/// 获取或设置配色系统路径
/// </summary>
public static string ColorBookPath
{
get { return (string)Preferences.GetProperties("Files", "ColorBookPath"); }
set { Preferences.SetProperties("Files", "ColorBookPath", value); }
}
/// <summary>
/// 获取或设置用于保存硬件设备驱动程序信息的配置文件的位置
/// </summary>
public static string ConfigFile
{
get { return (string)Preferences.GetProperties("Files", "ConfigFile"); }
}
/// <summary>
/// 获取或设置自定义词典
/// </summary>
public static string CustomDictionary
{
get { return (string)Preferences.GetProperties("Files", "CustomDictionary"); }
set { Preferences.SetProperties("Files", "CustomDictionary", value); }
}
/// <summary>
/// 获取或设置默认 Internet 地址
/// </summary>
public static string DefaultInternetURL
{
get { return (string)Preferences.GetProperties("Files", "DefaultInternetURL"); }
set { Preferences.SetProperties("Files", "DefaultInternetURL", value); }
}
/// <summary>
/// 获取或设置AutoCAD 查找视频显示、定点设备、打印机和绘图仪所用 ADI 设备驱动程序的目录
/// </summary>
public static string DriversPath
{
get { return (string)Preferences.GetProperties("Files", "DriversPath"); }
set { Preferences.SetProperties("Files", "DriversPath", value); }
}
/// <summary>
/// 获取或设置用于定义当 AutoCAD 不能找到字体时替换字体的文件位置
/// </summary>
public static string FontFileMap
{
get { return (string)Preferences.GetProperties("Files", "FontFileMap"); }
set { Preferences.SetProperties("Files", "FontFileMap", value); }
}
/// <summary>
/// 获取或设置AutoCAD 帮助文件的位置
/// </summary>
public static string HelpFilePath
{
get { return (string)Preferences.GetProperties("Files", "HelpFilePath"); }
set { Preferences.SetProperties("Files", "HelpFilePath", value); }
}
/// <summary>
/// 获取或设置日志文件的位置
/// </summary>
public static string LogFilePath
{
get { return (string)Preferences.GetProperties("Files", "LogFilePath"); }
set { Preferences.SetProperties("Files", "LogFilePath", value); }
}
/// <summary>
/// 获取或设置用于拼写检查的当前词典
/// </summary>
public static string MainDictionary
{
get { return (string)Preferences.GetProperties("Files", "MainDictionary"); }
set { Preferences.SetProperties("Files", "MainDictionary", value); }
}
/// <summary>
/// 获取或设置进程的 AutoCAD 菜单或自定义文件的位置
/// </summary>
public static string MenuFile
{
get { return (string)Preferences.GetProperties("Files", "MenuFile"); }
set { Preferences.SetProperties("Files", "MenuFile", value); }
}
/// <summary>
/// 获取或设置页面设置中的替代样板文件的位置
/// </summary>
public static string PageSetupOverridesTemplateFile
{
get { return (string)Preferences.GetProperties("Files", "ageSetupOverridesTemplateFile"); }
set { Preferences.SetProperties("Files", "ageSetupOverridesTemplateFile", value); }
}
/// <summary>
/// 获取或设置打印日志文件的位置
/// </summary>
public static string PlotLogFilePath
{
get { return (string)Preferences.GetProperties("Files", "lotLogFilePath"); }
set { Preferences.SetProperties("Files", "lotLogFilePath", value); }
}
/// <summary>
/// 获取或设置acad.psf 文件中自定义前导部分的名称
/// </summary>
public static string PostScriptPrologFile
{
get { return (string)Preferences.GetProperties("Files", "ostScriptPrologFile"); }
set { Preferences.SetProperties("Files", "ostScriptPrologFile", value); }
}
/// <summary>
/// 获取或设置打印机配置文件的位置
/// </summary>
public static string PrinterConfigPath
{
get { return (string)Preferences.GetProperties("Files", "rinterConfigPath"); }
set { Preferences.SetProperties("Files", "rinterConfigPath", value); }
}
/// <summary>
/// 获取或设置打印机描述文件的位置
/// </summary>
public static string PrinterDescPath
{
get { return (string)Preferences.GetProperties("Files", "rinterDescPath"); }
set { Preferences.SetProperties("Files", "rinterDescPath", value); }
}
/// <summary>
/// 获取或设置打印机样式表文件的位置
/// </summary>
public static string PrinterStyleSheetPath
{
get { return (string)Preferences.GetProperties("Files", "rinterStyleSheetPath"); }
set { Preferences.SetProperties("Files", "rinterStyleSheetPath", value); }
}
/// <summary>
/// 获取或设置用作临时打印文件名的替换名称
/// </summary>
public static string PrintFile
{
get { return (string)Preferences.GetProperties("Files", "rintFile"); }
set { Preferences.SetProperties("Files", "rintFile", value); }
}
/// <summary>
/// 获取或设置后台打印文件的目录
/// </summary>
public static string PrintSpoolerPath
{
get { return (string)Preferences.GetProperties("Files", "rintSpoolerPath"); }
set { Preferences.SetProperties("Files", "rintSpoolerPath", value); }
}
/// <summary>
/// 获取或设置用于后台打印的应用程序
/// </summary>
public static string PrintSpoolExecutable
{
get { return (string)Preferences.GetProperties("Files", "rintSpoolExecutable"); }
set { Preferences.SetProperties("Files", "rintSpoolExecutable", value); }
}
/// <summary>
/// 获取或设置QNew命令的图形样板文件的位置
/// </summary>
public static string QNewTemplateFile
{
get { return (string)Preferences.GetProperties("Files", "QNewTemplateFile"); }
set { Preferences.SetProperties("Files", "QNewTemplateFile", value); }
}
/// <summary>
/// 获取或设置AutoCAD 搜索支持文件的目录
/// </summary>
public static string SupportPath
{
get { return (string)Preferences.GetProperties("Files", "SupportPath"); }
set { Preferences.SetProperties("Files", "SupportPath", value); }
}
/// <summary>
/// 获取或设置AutoCAD用于保存临时文件的目录
/// </summary>
public static string TempFilePath
{
get { return (string)Preferences.GetProperties("Files", "TempFilePath"); }
set { Preferences.SetProperties("Files", "TempFilePath", value); }
}
/// <summary>
/// 获取或设置“启动”向导所使用样板文件的路径
/// </summary>
public static string TemplateDWGPath
{
get { return (string)Preferences.GetProperties("Files", "TemplateDWGPath"); }
set { Preferences.SetProperties("Files", "TemplateDWGPath", value); }
}
/// <summary>
/// 获取或设置外部参照文件的位置
/// </summary>
public static string TempXRefPath
{
get { return (string)Preferences.GetProperties("Files", "TempXRefPath"); }
set { Preferences.SetProperties("Files", "TempXRefPath", value); }
}
/// <summary>
/// 获取或设置MTEXT 命令所使用文字编辑器的名称
/// </summary>
public static string TextEditor
{
get { return (string)Preferences.GetProperties("Files", "TextEditor"); }
set { Preferences.SetProperties("Files", "TextEditor", value); }
}
/// <summary>
/// 获取或设置AutoCAD 搜索渲染纹理贴图的目录
/// </summary>
public static string TextureMapPath
{
get { return (string)Preferences.GetProperties("Files", "TextureMapPath"); }
set { Preferences.SetProperties("Files", "TextureMapPath", value); }
}
/// <summary>
/// 获取或设置工具选项板路径
/// </summary>
public static string ToolPalettePath
{
get { return (string)Preferences.GetProperties("Files", "ToolPalettePath"); }
set { Preferences.SetProperties("Files", "ToolPalettePath", value); }
}
/// <summary>
/// 获取或设置工作空间文件的路径
/// </summary>
public static string WorkspacePath
{
get { return (string)Preferences.GetProperties("Files", "WorkspacePath"); }
set { Preferences.SetProperties("Files", "WorkspacePath", value); }
}
}
/// <summary>
/// “选项”对话框“绘图”选项卡的所有选项