highrez2 Posted September 5, 2014 Posted September 5, 2014 I found a lisp to remove the standards (thanks Lee Mac) but would like to do the opposite. code to remove (defun c:test (/ DictObj) (vl-load-com) (if (not (vl-catch-all-error-p (setq DictObj (vl-catch-all-apply 'vla-item (list (vla-get-Dictionaries (vla-get-ActiveDocument (vlax-get-acad-object))) "AcStStandard"))))) (progn (princ (strcat "\n<< Deleted " (itoa (vla-get-Count DictObj)) " DWS File Associations >>")) (vla-Delete DictObj)) (princ "\n<< No Attached DWS Files >>")) (princ)) I would like to add the (DWS) file from a network location. Any help would be appreciated. Quote
marko_ribar Posted September 7, 2014 Posted September 7, 2014 Try this snippet and tell me... (defun c:adddws ( / dws dictionary xname newdict datalist ) (setq dws (getfiled "Select DWS file" "" "dws" 4)) (setq dictionary (list '(0 . "DICTIONARY") '(100 . "AcDbDictionary"))) (setq xname (entmakex dictionary)) (setq newdict (dictadd (namedobjdict) "AcStStandard" xname)) (setq datalist (append (list '(0 . "XRECORD") '(100 . "AcDbXrecord")) (list (cons 1 dws)))) (setq xname (entmakex datalist)) (dictadd newdict "0" xname) (princ) ) HTH, M.R. Quote
highrez2 Posted September 8, 2014 Author Posted September 8, 2014 It does prompt for location, However I would like to hardcode the network location and the DWS file name. I would like to add the standards file without a prompt. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.