シンボル名に拡張文字セットを含めてよいかどうか、または 32 文字以上でもよいかどうかを決定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: ブール型
このプロパティの初期値は True です。
拡張シンボル名は 255 文字まで可能であり、A~Z、0~9、空白、半角カナ、全角文字(一部不可)、および Microsoft Windows や AutoCAD が他の目的で使用しないすべての特殊文字を含むことができます。
制限付きシンボル名は 31 文字まで可能であり、A~Z、0~9、ドル記号($)、アンダースコア(_)、ハイフン(-)、半角カナ、全角文字(一部不可)を含むことができます。
このプロパティは、シンボル テーブルに格納されている非グラフィックス オブジェクト(線種や画層など)の名前に適用されます。
VBA:
Sub Example_AllowLongSymbolNames() ' This example reads and modifies the preference value that controls ' whether symbol names include extended character sets or more ' than 31 characters. ' ' When finished, this example resets the preference value back to ' its original value. Dim ACADPref As AcadDatabasePreferences Dim originalValue As Variant, newValue As Variant ' Get the user preferences object Set ACADPref = ThisDrawing.preferences ' Read and display the original value originalValue = ACADPref.AllowLongSymbolNames MsgBox "The AllowLongSymbolNames preference is set to: " & originalValue ' Modify the AllowLongSymbolNames preference by toggling the value ACADPref.AllowLongSymbolNames = Not (ACADPref.AllowLongSymbolNames) newValue = ACADPref.AllowLongSymbolNames MsgBox "The AllowLongSymbolNames preference has been set to: " & newValue ' Reset the preference back to its original value ' ' * Note: Comment out this last section to leave the change to ' this preference in effect ACADPref.AllowLongSymbolNames = originalValue MsgBox "The AllowLongSymbolNames preference was reset back to: " & originalValue End Sub
Visual LISP:
(vl-load-com) (defun c:Example_AllowLongSymbolNames() ;; This example reads and modifies the preference value that controls ;; whether symbol names include extended character sets or more ;; than 31 characters. ;; ;; When finished, this example resets the preference value back to ;; its original value. (setq acadObj (vlax-get-acad-object)) ;; Get the drafting preferences object (setq ACADPref (vla-get-Preferences doc)) ;; Read and display the original value (setq originalValue (vla-get-AllowLongSymbolNames ACADPref)) (alert (strcat "The AllowLongSymbolNames preference is set to: " (if (= originalValue :vlax-true) "1" "0"))) ;; Modify the AllowLongSymbolNames preference by toggling the value (vla-put-AllowLongSymbolNames ACADPref (if (= originalValue :vlax-true) :vlax-false :vlax-true)) (setq newValue (vla-get-AllowLongSymbolNames ACADPref)) (alert (strcat "The AllowLongSymbolNames preference has been set to: " (if (= newValue :vlax-true) "1" "0"))) ;; Reset the preference back to its original value ;; ;; * Note: Comment out this last section to leave the change to ;; this preference in effect (vla-put-AllowLongSymbolNames ACADPref originalValue) (alert (strcat "The AllowLongSymbolNames preference was reset back to: " (if (= originalValue :vlax-true) "1" "0"))) )