0 Members and 1 Guest are viewing this topic.
(vl-load-com)(setq acadObj (vlax-get-acad-object))(setq acDoc (vlax-get-property acadObj 'ActiveDocument))(setq acDocSumInfo (vlax-get-property acDoc 'SummaryInfo))(setq stdsearch (cdr (assoc style jur)))(cond ((/= (tblsearch "dimstyle" stdsearch) nil) (setq dstyl (vla-item (vla-get-dimstyles acDoc) stdsearch)) (vla-put-activedimstyle acDoc dstyl) ) )(cond ((/= (tblsearch "style" stdsearch) nil) (setvar "textstyle" stdsearch) ) ) (princ) )(setq sd-std (list (cons 'dim "sd-anno-dim") (cons 'txt "simplex_sd_anno-0.08") (cons 'address "simplex_sd_anno-0.10") (cons 'street "simplex_sd_anno-0.125") ) )(setq jurstd "sd-std") ;registry (cond ((= style standard) (std 'txt jurstd)) ((= style street) (std 'street jurstd)) ((= style address) (std 'address jurstd)) ) (command "clayer" "label") (COMMAND "MTEXT" PAUSE "r" pause "c" "n" "w" "0") (princ) )
; error: bad argument type: listp "sd-std"
(setq stdsearch (cdr (assoc style jur)))
(setq sd-std (list (cons 'dim "sd-anno-dim") (cons 'txt "simplex_sd_anno-0.08") (cons 'address "simplex_sd_anno-0.10") (cons 'street "simplex_sd_anno-0.125") ))
((DIM . "sd-anno-dim") (TXT . "simplex_sd_anno-0.08") (ADDRESS . "simplex_sd_anno-0.10") (STREET . "simplex_sd_anno-0.125"))
(cond ((= style standard) (std 'txt jurstd)) ((= style street) (std 'street jurstd)) ((= style address) (std 'address jurstd)))
(cdr (assoc 'txt sd-std)) ;-> "simplex_sd_anno-0.08"
;;start of;;sup-registry.lsp;setup registry(setq SUPReg (strcat "HKEY_CURRENT_USER\\" (vlax-product-key)"\\Profiles\\"(getvar "cprofile") "\\SUP-Settings")) ;registry to be created;make registry(defun regMk (name value /) (vl-registry-write SUPReg name value) (princ) );check if a registry exist(defun regchk (name /) (print (vl-registry-read SUPReg name)) (princ) );list registry available(defun reglist () (print (vl-registry-descendents SUPReg "")) (princ) );;start of;;standards.lsp(vl-load-com)(setq acadObj (vlax-get-acad-object))(setq acDoc (vlax-get-property acadObj 'ActiveDocument))(setq acDocSumInfo (vlax-get-property acDoc 'SummaryInfo))(setq sd-std (list (cons 'dim "sd-anno-dim") (cons 'txt "simplex_sd_anno-0.08") (cons 'address "simplex_sd_anno-0.10") (cons 'street "simplex_sd_anno-0.125") ) )(setq sd-full (list (cons 'dim "sd-anno-dim-full") (cons 'txt "simplex_sd_anno-0.10") (cons 'address "simplex_sd_anno-0.15") (cons 'street "simplex_sd_anno-0.20") ) ) ;general standard list (setq gen-std (list (cons 'dim "sup-anno-dim") (cons 'tc-dim "sup-anno-tc-dim") (cons 'profile-dim "sup-anno-dim-profile") (cons 'txt "SIMPLEX_ANNO-0.08") (cons 'address "SIMPLEX_ANNO-0.10") (cons 'street "SIMPLEX_ANNO-0.125") ) )(defun std (style jur / );san diego standard list (setq stdsearch (cdr (assoc style jur)))(cond ((/= (tblsearch "dimstyle" stdsearch) nil) (setq dstyl (vla-item (vla-get-dimstyles acDoc) stdsearch)) (vla-put-activedimstyle acDoc dstyl) ) )(cond ((/= (tblsearch "style" stdsearch) nil) (setvar "textstyle" stdsearch) ) ) (princ) );;start of;;drwtxt.lsp;;this function needs to be rwritten so that I can pull registry entry. depending on the registry entry the styles will be set accordinly;;I am trying to shorten my conditional statements from a value I call from reading from the registry(defun drwtxt(style)(setq jurs (vl-registry-read SUPReg "std")) (if (= jurs "gen-std") (cond ((= style "standard") (std 'txt gen-std)) ((= style "street") (std 'street gen-std)) ((= style "address") (std 'address gen-std)) ) ) (if (= jurs "sd-std") (cond ((= style "standard") (std 'txt sd-std)) ((= style "street") (std 'street sd-std)) ((= style "address") (std 'address sd-std)) ) ) (if (= jurs "sd-full") (cond ((= style "standard") (std 'txt sd-full)) ((= style "street") (std 'street sd-full)) ((= style "address") (std 'address sd-full)) ) ) (command "clayer" "label") (COMMAND "MTEXT" PAUSE "r" pause "c" "n" "w" "0") (princ) )
(cond ((= style standard) (std 'txt jurs)) ((= style street) (std 'street jurs)) ((= style address) (std 'address jurs)) )