- UID
- 517
- 积分
- 935
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-14
- 最后登录
- 1970-1-1
|
发表于 2004-9-7 08:03:40
|
显示全部楼层
原物件可能原來有設定顏色/線型 OR 顏色/線型是隨層,我所說KEEP COLOR AND KEEP LTYPE應為保有目前看到的,但圖層合併了,即沒有選KEEP COLOR AND KEEP LTYPE改為隨層,選了"可能"要從物件所需圖層取顏色/線型。
顯示標準的 AutoCAD 顏色選取對話方塊
(acad_colordlg colornum [flag])
引數
colornum
在 0~256 (內含) 範圍中的整數,指定某 AutoCAD 顏色號碼,作為起始預設值。
flag
如果設定為 nil,停用 BYLAYER 及 BYBLOCK 按鈕。省略 flag 引數或將它設定為非 nil 值,以啟用 BYLAYER 及 BYBLOCK 按鈕。
一個值為 0 的 colornum 內定為 BYBLOCK,及值為 256 的內定為 BYLAYER。
傳回值
使用者選擇的顏色碼,若使用者取消對話方塊,則傳回 nil。
範例
提示使用者選取顏色,且沒有選取顏色時,預設值為綠色:
(acad_colordlg 3)
;; Acad_TrueColorDlg is somewhat similar to the existing acad_colordlg function.
;; Signature:
;; (acad_truecolordlg color [allowbylayer] [currentlayercolor])
;;
;; Where "color" is a dotted pair that describes the default color. The first element
;; of the dotted pair must be one of the color dxf group codes (62, 420, or 430).
;; For example:
;; (62 . ColorIndex)
;; (420 . TrueColor)
;; (430 . "colorbook$colorname")
;;
;; If the optional [allowbylayer] parameter is present and non-nil, then the bylayer and
;; byblock buttons will be enabled. If this parameter is missing, the value defaults to
;; T and the bylayer/bylbock buttons will be enabled.
;;
;; The optional [curLayerColor] parameter controls the color of the bylayer/byblock color
;; in the dialog. This parameter is also a dotted pair like the first color parameter.
;;
;; Returns nil if the user canceled.
;; On success, the function returns a list of one or more dotted pairs that fully describe the
;; chosen color. The last dotted pair in this list indicates, specifically, the color that was
;; chosen. Additional details on the return list follow...
;;
;; ColorBook color - If the last item in the returned list is a 430 pair, then the specified
;; color originates from a colorbook. (This returned list will also contain
;; a 420 pair that describes the corresponding truecolor and a 62 pair that
;; describes the closest matching colorindex value.)
;;
;; True Color - If the returned list contains a 420 pair as the last item, then
;; a true color was specified (as "Red,Green,Blue"). The list will
;; also contain a 62 pair that indicates the closest matching colorindex.
;; (No 430 pair will be present)
;;
;; Color Index - If the last item in the list is a 62 pair, then a colorindex was chosen.
;; (no other dotted pairs will be present in the returned list)
;;
;; Examples of usage:
;; (acad_truecolordlg '(62 . 1))
;; (acad_truecolordlg '(420 . 2686760))
;; (acad_truecolordlg '(430 . "Color Book Sample File$Sample 0C"))
;; (acad_truecolordlg '(420 . 2686760) nil)
;; |
|