Jump to content

MultiLeader (Block) Match


hkncdrc

Recommended Posts

Hi masters 8)

 

Help Please;

 

The project has created a package of excessive loss of time,

multileader, define the block.

available in the DWG file.

Can the software is easy with the lisp?

I'm waiting for the help please.

 

Multileader-Match.dwg

Link to comment
Share on other sites

  • 2 months later...

Hi Dear Friends :)

 

encode the following,

It does not work well.

can you help me please? :(

 


(defun c:ZX ()
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
 (vla-startundomark doc)
(setq zz (car (entsel "Kopyalanacak Mleader :>")))
(setq ed (entget zz))
(foreach item ed
(cond ((and (= (car item) 330)
(= (cdr (assoc 0 (entget (cdr item)))) "ATTDEF")
)
(setq rec T)
)
((= (car item) 302)
(if rec
(setq attnamelst
(cons (cdr item) attnamelst)
rec nil
)))))
(setq attnamelst (reverse attnamelst))
(setq tip (car attnamelst))
(setq kot (cadr attnamelst))
(setq kod (caddr attnamelst))


(while (setq ent (entsel "Hedef Mleader :>"))
(setq ed (entget (car ent)))
(foreach item ed
(if (= (car item) 330)
(setq attnamelst (cons (vlax-ename->vla-object (cdr item))
attnamelst))))


(setq kodtag (vla-get-tagstring (nth 0 attnamelst)))

(vla-SetBlockAttributeValue
(vlax-ename->vla-object (car ent))
(vla-get-objectid (nth 0 attnamelst))
kod
)


(setq kottag (vla-get-tagstring (nth 1 attnamelst)))

(vla-SetBlockAttributeValue
(vlax-ename->vla-object (car ent))
(vla-get-objectid (nth 1 attnamelst))
kot
)


(setq tiptag (vla-get-tagstring (nth 2 attnamelst)))
(vla-SetBlockAttributeValue
(vlax-ename->vla-object (car ent))
(vla-get-objectid (nth 2 attnamelst))
tip
)
);while



(setq attnamelst nil)


(setq tiptag nil)
(setq kodtag nil)
(setq kottag nil)
(vla-endundomark doc)


(princ))

Edited by hkncdrc
Link to comment
Share on other sites

my friends :)

problem solved. :D

Thank you...

I am sharing for friends who want to use.

 


(defun c:ZX (/ doc zz ed rec attnamelst tip kod kot ent kodtag kottag tiptag)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq zz (car (entsel "Kopyalanacak Mleader :>")))
(setq ed (entget zz))
(foreach item ed
(cond ((and (= (car item) 330)
(= (cdr (assoc 0 (entget (cdr item)))) "ATTDEF")
)
(setq rec T)
)
((= (car item) 302)
(if rec
(setq attnamelst
(cons (cdr item) attnamelst)
rec nil
)))))
(setq attnamelst (reverse attnamelst))
(setq tip (car attnamelst))
(setq kot (cadr attnamelst))
(setq kod (caddr attnamelst))


(while (setq ent (entsel "Hedef Mleader :>"))
(setq ed (entget (car ent)))
(foreach item ed
(if (= (car item) 330)
(setq attnamelst (cons (vlax-ename->vla-object (cdr item))
attnamelst))))


(setq kodtag (vla-get-tagstring (nth 0 attnamelst)))

(vla-SetBlockAttributeValue
(vlax-ename->vla-object (car ent))
(vla-get-objectid (nth 0 attnamelst))
kod
)


(setq kottag (vla-get-tagstring (nth 1 attnamelst)))

(vla-SetBlockAttributeValue
(vlax-ename->vla-object (car ent))
(vla-get-objectid (nth 1 attnamelst))
kot
)


(setq tiptag (vla-get-tagstring (nth 2 attnamelst)))
(vla-SetBlockAttributeValue
(vlax-ename->vla-object (car ent))
(vla-get-objectid (nth 2 attnamelst))
tip
)
);while



(setq attnamelst nil)


(setq tiptag nil)
(setq kodtag nil)
(setq kottag nil)


(princ))

Link to comment
Share on other sites

Hi masters 8)

 

Help Please;

The project has created a package of excessive loss of time,

multileader, define the block...Can the software is easy with the lisp?

I'm waiting for the help please.

 

[ATTACH]57992[/ATTACH]

 

Glad it works for you. Could you describe what sollutions solved what problem a bit more..?

My Chechislogakian isn't that close to Dutches ;-)

Link to comment
Share on other sites

Glad it works for you. Could you describe what sollutions solved what problem a bit more..?

My Chechislogakian isn't that close to Dutches ;-)

 

Hello,

Problem copying the writings of some of the wrong places.

 

WYB14m.png

 

Thank you,

My English is bad, yes))

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