Attach DWS file to your drawing. Here is a sample from Internet:- ;;;Michael Puckett
- (defun cdrs (key lst / pair rtn)
- (while (setq pair (assoc key lst))
- (setq rtn (cons (cdr pair) rtn)
- lst (cdr (member pair lst))))
- (reverse rtn));;;R. Robert Bell
- (defun AddDWS (FileN / DictN eDict XRInt)
- (setq DictN "AcStStandard"
- eDict (cond ((cdr (assoc -1 (dictsearch (namedobjdict) DictN))))
- ((dictadd (namedobjdict)
- DictN
- (entmakex '((0 . "DICTIONARY") (100 .
- "AcDbDictionary")))))))
- (if (setq XRInt (cdrs 3 (entget eDict)))
- (setq XRInt (1+ (apply 'max (mapcar 'atoi XRInt))))
- (setq XRInt 0))
- (dictadd eDict
- (itoa XRInt)
- (entmakex
- (list '(0 . "XRECORD") '(100 . "AcDbXrecord") (cons 1 FileN)))));;Usage: (AddDWS "c:\\program files\\AutoCAD 2004\\Sample\\MKMStd.dws")
|