Mleader Attributed block problem

Mleader Attributed block problem

J-Rocks
Collaborator Collaborator
975 Views
5 Replies
Message 1 of 6

Mleader Attributed block problem

J-Rocks
Collaborator
Collaborator

Hello everyone.

I am trying to add Mleader which already has attributed block attached to it in the Style manager but when the Mleader added to drawing the attributed block located at 0,0,0 and I don't know why that is happening.

Is this normal?
Is there any other codes that I need to use to move it to the end point of the Mleader?

(setq spc (vla-get-ModelSpace (vla-get-ActiveDocument  (vlax-get-acad-object))))
(vlax-invoke spc 'addmleader (apply 'append pnts) 0)


Thanks in advance.

0 Likes
Accepted solutions (1)
976 Views
5 Replies
Replies (5)
Message 2 of 6

pbejse
Mentor
Mentor

 

  (setq thismleader (vlax-invoke spc 'addmleader (apply 'append pnts) 0))
    (vla-put-ContentType thismleader 1)
    (vla-put-ContentBlockType thismleader 0)

 

0 Likes
Message 3 of 6

J-Rocks
Collaborator
Collaborator

Thanks for your reply.

Those functions changes my attributed block in the mleader style to something else which lead me to another new problem!

 

 

0 Likes
Message 4 of 6

pbejse
Mentor
Mentor
Accepted solution

 

(vla-put-ContentBlockName thismleader "YourAttributeBlock")

 

Message 5 of 6

J-Rocks
Collaborator
Collaborator

Thank you for your kind help, its working perfectly now.

0 Likes
Message 6 of 6

pbejse
Mentor
Mentor

@J-Rocks wrote:

Thank you for your kind help, its working perfectly now.


Glad you got it sorted.

 

Cheers

 

 

0 Likes