Jump to content
stevsmith

Block into multileader text

Recommended Posts

boheng

:Dthank you very much!!!!!!

Share this post


Link to post
Share on other sites
BIGAL

have a look at this code snippet should help

 

(foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS1 0 )) 'getattributes)
       (if (= oldtag1 (strcase ([color="red"]vla-get-tagstring[/color] att)))

Share this post


Link to post
Share on other sites
AlexP

I get the same thing.

 

Have you managed to get the Lisp to copy/paste the Block Description on the Multileader?

 

This is what happens when using the Lisp:

 

Command: TEST

Select block:

Specify leader landing location: _.mleader

Specify leader arrowhead location or [leader Landing first/Content first/Options] : _non

Specify leader landing location: _non

Specify landing distance : *Description of Block appears in command line*

Specify landing distance :

 

And then it disappears - Opens an empty Text box for me to write a Text on the MLeader..

 

The BNameLabel seems to work though

Share this post


Link to post
Share on other sites
m1r
On 6/12/2013 at 12:15 AM, alanjt said:

 

 

 

 


(defun c:BNameLabel (/ ent entl obj)
 (cond ((not (setq ent (car (entsel "\nSelect block: ")))))
       ((not (eq (cdr (assoc 0 (entget ent))) "INSERT")) (princ "\nInvalid object!"))
       ((setq pt (getpoint "\nSpecify first point: "))
        (setq entl (entlast))
        (vl-cmdf "_.mleader" "_non" pt "\\")
        (while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (vl-cmdf ""))
        (if (not (equal entl (setq entl (entlast))))
          (vla-put-textstring
            (vlax-ename->vla-object entl)
            (vlax-get-property
              (setq obj (vlax-ename->vla-object ent))
              (if (vlax-property-available-p obj 'EffectiveName)
                'EffectiveName
                'Name
              )
            )
          )
        )
       )
 )
 (princ)
)
(vl-load-com)
(princ)
 

 

 

This is great, but someone can do the same as this, but to get the layer name?

Many Thanks

Share this post


Link to post
Share on other sites
alanjt
On 5/6/2019 at 3:57 AM, m1r said:

 

This is great, but someone can do the same as this, but to get the layer name?

Many Thanks

 

Replace:

            (vlax-get-property
              (setq obj (vlax-ename->vla-object ent))
              (if (vlax-property-available-p obj 'EffectiveName)
                'EffectiveName
                'Name
              )
            )

 

with:

(cdr (assoc 8 (entget ent)))

 

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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