您也许可以使用SortEnts表格的方法,该表格可以通过以下方式获得:
- ;;------------------=={ Sortents Table }==--------------------;;
- ;; ;;
- ;; Retrieves the Sortents Table object. ;;
- ;;------------------------------------------------------------;;
- ;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;;
- ;;------------------------------------------------------------;;
- ;; Arguments: ;;
- ;; space - VLA Layout Block Object ;;
- ;;------------------------------------------------------------;;
- ;; Returns: Sortents Table Object, else nil ;;
- ;;------------------------------------------------------------;;
- (defun LM:SortentsTable ( space / dict ) (vl-load-com)
- ;; © Lee Mac 2010
- (defun _catchapply ( foo args / result )
- (if
- (not
- (vl-catch-all-error-p
- (setq result
- (vl-catch-all-apply foo args)
- )
- )
- )
- result
- )
- )
-
- (cond
- (
- (_catchapply 'vla-item
- (list
- (setq dict
- (vla-GetExtensionDictionary space)
- )
- "ACAD_SORTENTS"
- )
- )
- )
- (
- (_catchapply 'vla-AddObject
- (list dict "ACAD_SORTENTS" "AcDbSortentsTable")
- )
- )
- )
- )
这里有几个例子:
http://lee-mac.com/draworderfunctions.html
但我不完全理解这个问题。
李 |