Marcin O Posted January 15, 2023 Posted January 15, 2023 Hello, is there any chance to remove field reference with Lee Mac lisp for Block Attributes to multileader? Now multileader makes fields and I need just simple text. I attached full lisp and text DWG. I will appreciate for help with LISP. Marcin (vla-put-textstring mld (strcat (if (= "" (vla-get-textstring at1)) "" (strcat "%<\\AcObjProp Object(%<\\_ObjId " (LM:ObjectID at1) ">%).TextString>%" (if (= "" (vla-get-textstring at2)) "" (chr 10)) ) ) (if (= "" (vla-get-textstring at2)) "" (strcat "%<\\AcObjProp Object(%<\\_ObjId " (LM:ObjectID at2) ">%).TextString>%" ) ) ) ) BlockAttributesToMultileader-test.dwg BlockAttributesToMultileader.lsp Quote
Steven P Posted January 15, 2023 Posted January 15, 2023 Sunday so CAD is off here.... not checked my answer but if you comment out for example: "%<\\AcObjProp Object(%<\\_ObjId " (LM:ObjectID at1) ">%).TextString>%" (if (= "" (vla-get-textstring at2)) "" (chr 10)) (comment out rather than delete in case that doesn't work and you need to go back again) and replace with TextString (if (= "" (vla-get-textstring at2)) "" (chr 10)) and for the second case, if doesn't have the (if statement at the end of course Quote
Marcin O Posted January 15, 2023 Author Posted January 15, 2023 Hello Steven, thank You for post. I've checked it but unfortunately it returns multileader without content. Console says "error: bad argument type: stringp nil". Quote
Steven P Posted January 15, 2023 Posted January 15, 2023 (edited) Ah, it might be (vla-get-textstring at1) that you need to use (and (vla-get-textstring at2) instead of TextString Edited January 15, 2023 by Steven P 1 Quote
Marcin O Posted January 15, 2023 Author Posted January 15, 2023 Hi Steven, Thank You very much it worked 1 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.