指定对象选择目标的大小。 支持的平台:仅窗口 属性值只读:不 类型:长 对象选择目标的高度(以像素为单位)。可以输入 0 到 50 之间的值。 言论此属性的初始值为 3。 注意:此属性的值存储在 PICKBOX 系统变量中。
例子工 务 局: Sub Example_PickBoxSize() ' This example reads and modifies the preference value that controls ' the size of the object selection target. ' When finished, this example resets the preference value back to ' its original value. Dim ACADPref As AcadPreferencesSelection Dim originalValue As Variant, newValue As Variant ' Get the selection preferences object Set ACADPref = ThisDrawing.Application.Preferences.Selection ' Read and display the original value originalValue = ACADPref.PickBoxSize MsgBox "The PickBoxSize preference is set to: " & originalValue ' Modify the PickBoxSize preference by setting it to 5 ACADPref.PickBoxSize = 5 newValue = ACADPref.PickBoxSize MsgBox "The PickBoxSize 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.PickBoxSize = originalValue MsgBox "The PickBoxSize preference was reset back to: " & originalValue End Sub Visual LISP: (vl-load-com) (defun c:Example_PickBoxSize() ;; This example reads and modifies the preference value that controls ;; the size of the object selection target. ;; When finished, this example resets the preference value back to ;; its original value. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Read and display the original value (setq originalValue (vla-get-PickBoxSize (vla-get-Selection preferences))) (alert (strcat "The PickBoxSize preference is set to: " (itoa originalValue))) ;; Modify the PickBoxSize preference by setting it to 5 (vla-put-PickBoxSize (vla-get-Selection preferences) 5) (setq newValue (vla-get-PickBoxSize (vla-get-Selection preferences))) (alert (strcat "The PickBoxSize preference has been set to: " (itoa newValue))) ;; 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-PickBoxSize (vla-get-Selection preferences) originalValue) (alert (strcat "The PickBoxSize preference was reset back to: " (itoa originalValue))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:33
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.