<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Associative MLeader using .NET in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260943#M74530</link>
    <description>Getting to the bottom of your issue would involve some effort I'm afraid, so without working code to test, I'm not in a position to offer much help.&lt;BR /&gt;
&lt;BR /&gt;
The behavior you describe might suggest that you should set the coordinates for the text and leader last, as doing that *might* be what's triggering the recalculation that gives the desired result.&lt;BR /&gt;
&lt;BR /&gt;
Also (I don't know if this has any relevance), see the thread titled 'mleader text attachment' in this newsgroup.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;SINC&gt; wrote in message news:5974072@discussion.autodesk.com...&lt;BR /&gt;
I'm having a ton of issues trying to create MLeaders via the API.&lt;BR /&gt;
&lt;BR /&gt;
Through lots of trial and error, I've mostly figured out the order I must create items in order to get it to work.  But I'm still having some issues I can't solve.  One of those issues is that I can't seem to create an MLeader that has the leader coming out of the right side of the text.  How do I do that?&lt;BR /&gt;
&lt;BR /&gt;
When I look at that post by Kean, he gets an MLeader that has leaders coming out of both sides of the text.  Howeve&lt;BR /&gt;
r, when I copy-and-paste his code and try to run it, I get all leaders coming out the left side only, as shown in the attached image.&lt;BR /&gt;
&lt;BR /&gt;
After creating the leader, if I select it and drag the text a miniscule amount, it "refreshes" the MLeader, and I get MLeaders coming out of both sides.  But no matter what I try, I can't get leaders coming out the right side when I createe MLeaders via the API.&lt;BR /&gt;
&lt;BR /&gt;
Any help is greatly appreciated - this MLeader API is killing me.&lt;BR /&gt;
&lt;BR /&gt;
-- Sinc&lt;BR /&gt;
http://ejsurve&lt;BR /&gt;
ying.com&lt;BR /&gt;
http://www.quux.biz&lt;BR /&gt;
http://sincpac3d.com&lt;/SINC&gt;</description>
    <pubDate>Sat, 05 Jul 2008 17:44:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-07-05T17:44:21Z</dc:date>
    <item>
      <title>Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260938#M74525</link>
      <description>Is it possible to do associative mleader using the .NET api - I couldn't &lt;BR /&gt;
find any wrapper classes for the required AcDb* classes (AcDbMLeader, &lt;BR /&gt;
e.g.). Any help much is appreciated. Thanks!&lt;BR /&gt;
&lt;BR /&gt;
Gagan</description>
      <pubDate>Wed, 21 May 2008 18:33:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260938#M74525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-05-21T18:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260939#M74526</link>
      <description>I found this post on Kean's blog helpful.&lt;BR /&gt;
&lt;BR /&gt;
http://through-the-interface.typepad.com/through_the_interface/2007/09/creating-an-aut.html</description>
      <pubDate>Fri, 23 May 2008 21:16:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260939#M74526</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-05-23T21:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260940#M74527</link>
      <description>todavew91 wrote:&lt;BR /&gt;
&amp;gt; I found this post on Kean's blog helpful.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; http://through-the-interface.typepad.com/through_the_interface/2007/09/creating-an-aut.html&lt;BR /&gt;
&lt;BR /&gt;
Thank you, I will take a look.&lt;BR /&gt;
&lt;BR /&gt;
-Gagan</description>
      <pubDate>Thu, 29 May 2008 15:35:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260940#M74527</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-05-29T15:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260941#M74528</link>
      <description>I'm having a ton of issues trying to create MLeaders via the API.&lt;BR /&gt;
&lt;BR /&gt;
Through lots of trial and error, I've mostly figured out the order I must create items in order to get it to work.  But I'm still having some issues I can't solve.  One of those issues is that I can't seem to create an MLeader that has the leader coming out of the right side of the text.  How do I do that?&lt;BR /&gt;
&lt;BR /&gt;
When I look at that post by Kean, he gets an MLeader that has leaders coming out of both sides of the text.  However, when I copy-and-paste his code and try to run it, I get all leaders coming out the left side only, as shown in the attached image.&lt;BR /&gt;
&lt;BR /&gt;
After creating the leader, if I select it and drag the text a miniscule amount, it "refreshes" the MLeader, and I get MLeaders coming out of both sides.  But no matter what I try, I can't get leaders coming out the right side when I createe MLeaders via the API.&lt;BR /&gt;
&lt;BR /&gt;
Any help is greatly appreciated - this MLeader API is killing me.&lt;BR /&gt;
&lt;BR /&gt;
-- Sinc&lt;BR /&gt;
http://ejsurveying.com&lt;BR /&gt;
http://www.quux.biz&lt;BR /&gt;
http://sincpac3d.com</description>
      <pubDate>Sat, 05 Jul 2008 15:45:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260941#M74528</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2008-07-05T15:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260942#M74529</link>
      <description>...and attached here, is an image of what happens if I select the MLeader text, and drag it a miniscule amount.&lt;BR /&gt;
&lt;BR /&gt;
At this point, it switches to something like in the image Kean posted.  But why don't I get the same result as him when I run his unmodified code?</description>
      <pubDate>Sat, 05 Jul 2008 15:57:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260942#M74529</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2008-07-05T15:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260943#M74530</link>
      <description>Getting to the bottom of your issue would involve some effort I'm afraid, so without working code to test, I'm not in a position to offer much help.&lt;BR /&gt;
&lt;BR /&gt;
The behavior you describe might suggest that you should set the coordinates for the text and leader last, as doing that *might* be what's triggering the recalculation that gives the desired result.&lt;BR /&gt;
&lt;BR /&gt;
Also (I don't know if this has any relevance), see the thread titled 'mleader text attachment' in this newsgroup.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;SINC&gt; wrote in message news:5974072@discussion.autodesk.com...&lt;BR /&gt;
I'm having a ton of issues trying to create MLeaders via the API.&lt;BR /&gt;
&lt;BR /&gt;
Through lots of trial and error, I've mostly figured out the order I must create items in order to get it to work.  But I'm still having some issues I can't solve.  One of those issues is that I can't seem to create an MLeader that has the leader coming out of the right side of the text.  How do I do that?&lt;BR /&gt;
&lt;BR /&gt;
When I look at that post by Kean, he gets an MLeader that has leaders coming out of both sides of the text.  Howeve&lt;BR /&gt;
r, when I copy-and-paste his code and try to run it, I get all leaders coming out the left side only, as shown in the attached image.&lt;BR /&gt;
&lt;BR /&gt;
After creating the leader, if I select it and drag the text a miniscule amount, it "refreshes" the MLeader, and I get MLeaders coming out of both sides.  But no matter what I try, I can't get leaders coming out the right side when I createe MLeaders via the API.&lt;BR /&gt;
&lt;BR /&gt;
Any help is greatly appreciated - this MLeader API is killing me.&lt;BR /&gt;
&lt;BR /&gt;
-- Sinc&lt;BR /&gt;
http://ejsurve&lt;BR /&gt;
ying.com&lt;BR /&gt;
http://www.quux.biz&lt;BR /&gt;
http://sincpac3d.com&lt;/SINC&gt;</description>
      <pubDate>Sat, 05 Jul 2008 17:44:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260943#M74530</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-05T17:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260944#M74531</link>
      <description>I am using the code copy-and-pasted from Kean's Blog entry, with absolutely no changes.</description>
      <pubDate>Sat, 05 Jul 2008 20:18:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260944#M74531</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2008-07-05T20:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260945#M74532</link>
      <description>Oh, and since you didn't seem to already know that, you must not be reading this newsgroup via the website.  Otherwise, you would know I was replying to a post that contained a link.&lt;BR /&gt;
&lt;BR /&gt;
Here's the link:&lt;BR /&gt;
&lt;BR /&gt;
http://through-the-interface.typepad.com/through_the_interface/2007/09/creating-an-aut.html</description>
      <pubDate>Sat, 05 Jul 2008 20:20:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260945#M74532</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2008-07-05T20:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260946#M74533</link>
      <description>Just to see if something in our template or style settings might be having any effect, I tried starting a new drawing from Autodesk's standard NCS template, using the Standard MLeader style in that template.&lt;BR /&gt;
&lt;BR /&gt;
I get the same results - all leaders come out of the left side of the text.  That's running Kean's code, unmodified, on a new drawing created from the NCS template.</description>
      <pubDate>Sun, 06 Jul 2008 02:41:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260946#M74533</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2008-07-06T02:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260947#M74534</link>
      <description>I'll see if I can get the right attachment later on today, but if Kean's solution isn't working the way he says it should, he typically welcomes comments.</description>
      <pubDate>Mon, 07 Jul 2008 10:53:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260947#M74534</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-07T10:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260948#M74535</link>
      <description>Well, as an interesting data point, if I try to run Kean's code in Civil-3D 2008, I get the same results that he does.  It's only when I try to run it in Civil-3D 2009 that the leaders only come out the left side.</description>
      <pubDate>Tue, 08 Jul 2008 02:22:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260948#M74535</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2008-07-08T02:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260949#M74536</link>
      <description>Sure enough, Kean had the answer.&lt;BR /&gt;
&lt;BR /&gt;
The MLeader works differently in the 2009 series of products.  Include this line as the last step, after creating the MLeader and just before committing the transaction:&lt;BR /&gt;
&lt;BR /&gt;
mld.MoveMLeader(new Vector3d(), MoveType.MoveAllPoints);&lt;BR /&gt;
&lt;BR /&gt;
Since it uses a 0 vector, this doesn't actually move the MLeader, but it forces the geometry to be recalculated.</description>
      <pubDate>Tue, 08 Jul 2008 12:20:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260949#M74536</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2008-07-08T12:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Associative MLeader using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260950#M74537</link>
      <description>Good to hear the resolution.</description>
      <pubDate>Tue, 08 Jul 2008 12:22:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/associative-mleader-using-net/m-p/2260950#M74537</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-07-08T12:22:08Z</dc:date>
    </item>
  </channel>
</rss>

