• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    *Expert Elite*
    Posts: 6,207
    Registered: ‎11-18-2006

    Re: Associative MLeader using .NET

    07-07-2008 07:22 PM in reply to: *Gagan Gajabaharia
    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.
    Sinc
    Please use plain text.
    *Expert Elite*
    Posts: 6,207
    Registered: ‎11-18-2006

    Re: Associative MLeader using .NET

    07-08-2008 05:20 AM in reply to: *Gagan Gajabaharia
    Sure enough, Kean had the answer.

    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:

    mld.MoveMLeader(new Vector3d(), MoveType.MoveAllPoints);

    Since it uses a 0 vector, this doesn't actually move the MLeader, but it forces the geometry to be recalculated.
    Sinc
    Please use plain text.
    Active Contributor
    Posts: 27
    Registered: ‎03-30-2006

    Re: Associative MLeader using .NET

    07-08-2008 05:22 AM in reply to: *Gagan Gajabaharia
    Good to hear the resolution.
    Please use plain text.