Jump to content

Multileader without fields - Lee Mac Block Attributes To Multileader edit


Marcin O

Recommended Posts

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>%"
                                    )
                                )
                            )
                        )

 

obraz.thumb.png.faadd0cecceb1fab05e2fe5364d2f734.png

 

BlockAttributesToMultileader-test.dwg BlockAttributesToMultileader.lsp

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

Ah, it might be (vla-get-textstring at1) that you need to use (and (vla-get-textstring at2) instead of TextString

Edited by Steven P
  • Like 1
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...