seawind Posted April 2, 2025 Posted April 2, 2025 (edited) Is there a way to modify a dxf code of a BlockLinearParameter modified Lee's function LM:getvisibilityparametername to : (defun LM:getDnmcprmtrlst ( blk par / lst) ;"BLOCKLINEARPARAMETER" "BLOCKVISIBILITYPARAMETER""ACAD_EVALUATION_GRAPH" (if (and (vlax-property-available-p (setq blk (if (= 'ENAME (type blk)) (vlax-ename->vla-object blk) blk)) 'effectivename) (setq blk (vla-item(vla-get-blocks (vla-get-document blk))(vla-get-effectivename blk))) (= :vlax-true (vla-get-isdynamicblock blk)) (= :vlax-true (vla-get-hasextensiondictionary blk)) ) (setq lst (vl-remove-if ''((x)(eq x nil)) (mapcar ''((pair)(if (and (= 360 (car pair)) (= par (cdr(assoc 0 (entget(cdr pair))))) ) (cdr pair) ) ) (dictsearch(vlax-vla-object->ename(vla-getextensiondictionary blk))"ACAD_ENHANCEDBLOCK") ) ) ) (princ (strcat "\nThis Block doesnt contain " par)) ) (if lst lst) (princ) ) (LM:getDnmcprmtrlst (car(entsel)) "BLOCKLINEARPARAMETER") (setq lst (entget(car lst)) !lst ((-1 . <Entity name: 30f5358c0b0>) (0 . "BLOCKLINEARPARAMETER") (5 . "661D63") (102 . "{ACAD_XDICTIONARY") (360 . <Entity name: 30f5358c750>) (102 . "}") (330 . <Entity name: 30f5358c0a0>) (100 . "AcDbEvalExpr") (90 . 48) (98 . 33) (99 . 329) (100 . "AcDbBlockElement") (300 . "Linear") (98 . 33) (99 . 329) (1071 . 32) (100 . "AcDbBlockParameter") (280 . 1) (281 . 0) (100 . "AcDbBlock2PtParameter") (1010 0.0 0.0 0.0) (1011 0.240209 0.549818 0.0) (170 . 4) (91 . 52) (91 . 49) (91 . 0) (91 . 0) (171 . 1) (92 . 52) (301 . "DisplacementX") (172 . 1) (93 . 52) (302 . "DisplacementY") (173 . 1) (94 . 49) (303 . "DisplacementX") (174 . 1) (95 . 49) (304 . "DisplacementY") (177 . 0) (100 . "AcDbBlockLinearParameter") (305 . "Distance1") (306 . "") (140 . 0.076861) (307 . "") (96 . (141 . 0.6) (142 . 1.0) (143 . 0.1) (175 . 0))) i have reached to this list and i want to (entmod (subst (cons 96 7) (assoc 96 lst) lst)) but i get the error message : ; error: bad DXF group: (1071 . 32) playing with linear parameters noticed that dxf 1071 is changing value from 0 to 33 (if that can help) My knowledge roofed and i need some assistance dxf 96 controls the dist type and 7 is used for increment 3 for none and 8 for list furthermore dxf 141 stores the dist increment, 142 the dist minimum and 143 dist maximum. So when i insert a block i want to assign linear parameters with different values on all the above without the need of doing it after manually one by one The general questions are : Is there any command or a way to change those values other than the properties window ? The above list is a DICTIONARY so we cant entmod the entrries ? If so, how we can modify those values, via coding ? Edited April 2, 2025 by SLW210 Added Code Tags!! Quote
SLW210 Posted April 2, 2025 Posted April 2, 2025 Please use Code Tags! (<> in the editor toolbar) Quote
dexus Posted April 2, 2025 Posted April 2, 2025 (edited) Have a look at dynamic block functions from Lee: https://lee-mac.com/dynamicblockfunctions.html Namely LM:setdynpropvalue for changing a value of a dynamic property. Edited April 2, 2025 by dexus 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.