Tomislav Posted April 2, 2020 Posted April 2, 2020 Hello. I made this lisp years ago and haven't used it for a while so now it can't insert attributes when inserting block (window for writing attribs pops out). I can't figure out how to resolve that so any suggestions? (DEFUN C:uvb(/ f name coords textline textposition ) (defun *error* (msg) (princ msg) (setvar "cmdecho" 1) ) (vl-load-com) (setvar "cmdecho" 0) (setq coords nil) (setq f (open (getfiled "Izaberi datoteku s koordinatama i visinama za upisivanje u blok" (getvar 'DWGPREFIX) "txt" 8) "r")) (or(setq scale(getstring "\nUnesi scale faktor [0.5]: ")) (setq scale "0.5") ) (while(setq textline(read-line f)) (setq prvi_zarez(+(vl-string-position(ascii ",")textline)1)) (setq drugi_zarez(vl-string-position(ascii ",")textline prvi_zarez)) (setq coords(substr textline 1 drugi_zarez)) (setq visine (substr textline (+ 2 drugi_zarez) (strlen textline))) (setq teren(substr visine 1 (vl-string-position(ascii ",")visine))) (setq vod(substr visine (+(vl-string-position(ascii ",")visine)2)(strlen visine))) (vl-cmdf "-insert" "41423-1" coords scale "" teren vod) (setq textline nil visine nil coords nil teren nil vod nil prvi_zarez nil drugi_zarez nil) ) (setvar "cmdecho" 1) (close f) ) ;;;the file must be in format y,x,h1,h2 block.dwg Quote
marko_ribar Posted April 3, 2020 Posted April 3, 2020 Probaj da pogledas ATTREQ sysvar... Mozda jos ponesto - kucaj SYSVDLG... Quote
Tomislav Posted April 3, 2020 Author Posted April 3, 2020 Hvala na savjetu prijatelju . Koliko god naučio opet iskoči nešto što ne znam 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.