VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

create leader on paperspace using vba

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
900 Views, 6 Replies

create leader on paperspace using vba

Hi all,

                I like to create leader on paperspace using vba. I have code for creating leader. I can’t pick solid edge using vba code, Anyone have sample code?

 

Thanks

Ramanusu

6 REPLIES 6
Message 2 of 7
p_mcknight
in reply to: Anonymous

Can you give a bit more detail on what you're wanting to accomplish?  How do you know where the leader is to be placed?  What would you like to use to fill out the leader text?

Message 3 of 7
Anonymous
in reply to: Anonymous

Thanks for reply. I wrote code to draw a leader with block name. it’s working fine. But problem is I can’t attach leader on any one of the block edge. right now leader start at insert point of the block and Constant displacement from starting point of leader for placing text.

Message 4 of 7
p_mcknight
in reply to: Anonymous

You should be able to get the edge depending on how you are getting the object.  For example, I have a leader program (all done in lisp) that I use in model space.  It nentsel to get a block and then uses (vlax-curve-getClosestPointTo to get the closest point on the line I selected to then place the leader start.  You should be able to do something similar in paperspace.  Worst case scenario you would have to cycle in and out of model space and translate the point values a few times.  Are you familiar enough with lisp to work on this.  If not I could probably change my program to work but I won't have time for a day or so.

Message 5 of 7
Anonymous
in reply to: Anonymous

Great new for me. I did my all codes in VBA. I think I can’t go LISP for creating leader only. If possible Please convert into VBA. Can I have your LISP code. I transfer my insert point from model space to paper space, so if I get point in model space, we can transfer it. I will wait for your code. Take your own time. Once again  thanks for your effort.

Message 6 of 7
Hallex
in reply to: Anonymous

Check this code written by Bryco:
http://www.theswamp.org/index.php?topic=12244.msg162022#msg162022
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 7 of 7
Anonymous
in reply to: Hallex

Thanks for looked my queries.Smiley Happy I did transfer point from Model space to Paper space. I need to attach my leader starting point to any edge of solids. I can’t get edge of solid through VBA code. Do you have any samples.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost