Author Topic: Create Multileader Style  (Read 6271 times)

0 Members and 1 Guest are viewing this topic.

SOURCECODE

  • Guest
Create Multileader Style
« on: December 01, 2011, 04:49:49 PM »
I would Like to create a new Multileader Style
as far as I know I have to open the mleader style dictionary.
Is this correct?
If so How do I create a new MLeader Style Name, and change some properties?

Here is my code so Far
Code: [Select]
<CommandMethod("NewLeader")> _
    Public Sub NewLeader()

        Dim doc As Document = Application.DocumentManager.MdiActiveDocument
        Dim db As Database = doc.Database
        Dim ed As Editor = doc.Editor
        Using trx As Transaction = db.TransactionManager.StartTransaction()
            Dim mleader As MLeaderStyle = trx.GetObject(db.MLeaderStyleDictionaryId, OpenMode.ForRead)
       

fixo

  • Guest
Re: Create Multileader Style
« Reply #1 on: December 02, 2011, 03:43:20 AM »
I would Like to create a new Multileader Style
as far as I know I have to open the mleader style dictionary.
Is this correct?
If so How do I create a new MLeader Style Name, and change some properties?

Here is my code so Far
Code: [Select]
<CommandMethod("NewLeader")> _
    Public Sub NewLeader()

        Dim doc As Document = Application.DocumentManager.MdiActiveDocument
        Dim db As Database = doc.Database
        Dim ed As Editor = doc.Editor
        Using trx As Transaction = db.TransactionManager.StartTransaction()
            Dim mleader As MLeaderStyle = trx.GetObject(db.MLeaderStyleDictionaryId, OpenMode.ForRead)
     

Try this code
Code: [Select]
Public Shared Sub AddNewMLeaderStyle()

Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument

Dim db As Database = doc.Database

Dim ed As Editor = doc.Editor

Dim tr As Transaction = db.TransactionManager.StartTransaction()

Dim mlstylename As String = "NewMleaderStyle"   '<-- change mleader style name here

Dim txstylename As String = "Romans"   '<-- change textstyle name here

Dim docloc As DocumentLock = doc.LockDocument()

'using (docloc)
'{

Using tr

Try

Dim mldict As DBDictionary = DirectCast(tr.GetObject(db.MLeaderStyleDictionaryId, OpenMode.ForRead), DBDictionary)

If IsDbDictionaryExists(mldict, mlstylename) Then
ed.WriteMessage("Mleader style ""{0}"" exists", mlstylename)


Return
End If

mldict.UpgradeOpen()

Dim mldstyle As New MLeaderStyle()

mldict.SetAt(mlstylename, TryCast(DirectCast(mldstyle, DBObject), DBObject))

mldstyle.ArrowSize = 2.5

mldstyle.ArrowSymbolId = db.Dimldrblk

mldstyle.ContentType = ContentType.MTextContent

mldstyle.DoglegLength = 1.0

mldstyle.DrawLeaderOrderType = DrawLeaderOrderType.DrawLeaderHeadFirst

mldstyle.DrawMLeaderOrderType = DrawMLeaderOrderType.DrawLeaderFirst

mldstyle.EnableLanding = True

mldstyle.FirstSegmentAngleConstraint = AngleConstraint.DegreesAny

mldstyle.MaxLeaderSegmentsPoints = 2

mldstyle.LeaderLineType = LeaderType.StraightLeader

mldstyle.SecondSegmentAngleConstraint = AngleConstraint.DegreesHorz

mldstyle.TextAlignAlwaysLeft = False

mldstyle.TextAngleType = TextAngleType.HorizontalAngle

mldstyle.TextHeight = 2.5

Dim tt As TextStyleTable = DirectCast(tr.GetObject(db.TextStyleTableId, OpenMode.ForRead, False), TextStyleTable)

If Not (tt.Has(txstylename)) Then
Return
End If

Dim txtid As ObjectId = tt(txstylename)

mldstyle.TextStyleId = txtid
'variations:

'#1
'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentMiddle,
'LeaderDirectionType.LeftLeader);
'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentMiddle,
'LeaderDirectionType.RightLeader);
'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentMiddle,
'LeaderDirectionType.UnknownLeader);

'#2
'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentBottomOfTop,
'LeaderDirectionType.LeftLeader);
'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentBottomOfTop,
'LeaderDirectionType.RightLeader);
'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentBottomOfTop,
'LeaderDirectionType.UnknownLeader);

'#3
mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentTopOfTop, LeaderDirectionType.LeftLeader)
mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentTopOfTop, LeaderDirectionType.RightLeader)
mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentTopOfTop, LeaderDirectionType.UnknownLeader)


mldict.DowngradeOpen()

tr.AddNewlyCreatedDBObject(mldstyle, True)

tr.Commit()

Catch ex As Autodesk.AutoCAD.Runtime.Exception
MessageBox.Show(ex.Message + vbLf + ex.StackTrace)
End Try
End Using
End Sub

    Public Shared Function IsDbDictionaryExists(ByVal parent As DBDictionary, ByVal dictname As String) As Boolean
        Dim exists As Boolean = False

        For Each edict As DBDictionaryEntry In parent
            If edict.Key = dictname Then
                exists = True
                Exit For
            End If
        Next
        Return exists
    End Function

SOURCECODE

  • Guest
Re: Create Multileader Style
« Reply #2 on: December 02, 2011, 04:44:50 AM »
Thanks Very much Fixo. I have tried using your code but it does not create a new mleader style.
I notice that at no point is the "MLeaderStyleDictionaryId" set to open mode for write.
Could this be the reason?

fixo

  • Guest
Re: Create Multileader Style
« Reply #3 on: December 02, 2011, 12:46:12 PM »
No, MleaderStyledictionary must be open for write,
otherwise you'll get 'enotOpenForWrite' exeption


I have a problem with my code  too
Just interesting, that the converted code on C#
is working good and VB.NET is not
Try this on you machine:
(textstyle named "Romans" must be exist)
Code: [Select]

       [CommandMethod("Demo")]
        static public void MakemyStyle()
        {
            AddNewMLeaderStyle();
        }
        /// <summary>
        ///                             = Create mleader style =
        /// </summary>

        static public void AddNewMLeaderStyle()
        {

            Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

            Database db = doc.Database;

            Editor ed = doc.Editor;

            Transaction tr = db.TransactionManager.StartTransaction();

            string mlstylename = "NewMleaderStyle";

            string txstylename = "Romans";

            DocumentLock docloc = doc.LockDocument();

            using (docloc)
            {

                using (tr)
                {

                    try
                    {

                        DBDictionary mldict = (DBDictionary)tr.GetObject(db.MLeaderStyleDictionaryId, OpenMode.ForRead);

                        if (IsDbDictionaryExists(mldict, mlstylename))
                        {
                            ed.WriteMessage("Mleader style \"{0}\" exists", mlstylename);

                            return;

                        }

                        mldict.UpgradeOpen();

                        MLeaderStyle mldstyle = new MLeaderStyle();

                        mldict.SetAt(mlstylename, (DBObject)mldstyle as DBObject);

                        mldstyle.ArrowSize = 2.5;

                        mldstyle.ArrowSymbolId = db.Dimldrblk;

                        mldstyle.ContentType = ContentType.MTextContent;

                        mldstyle.DoglegLength = 1.0;

                        mldstyle.DrawLeaderOrderType = DrawLeaderOrderType.DrawLeaderHeadFirst;

                        mldstyle.DrawMLeaderOrderType = DrawMLeaderOrderType.DrawLeaderFirst;

                        mldstyle.EnableLanding = true;

                        mldstyle.FirstSegmentAngleConstraint = AngleConstraint.DegreesAny;

                        mldstyle.MaxLeaderSegmentsPoints = 2;

                        mldstyle.LeaderLineType = LeaderType.StraightLeader;

                        mldstyle.SecondSegmentAngleConstraint = AngleConstraint.DegreesHorz;

                        mldstyle.TextAlignAlwaysLeft = false;

                        mldstyle.TextAngleType = TextAngleType.HorizontalAngle;

                        mldstyle.TextHeight = 2.5;

                        TextStyleTable tt = (TextStyleTable)tr.GetObject(db.TextStyleTableId, OpenMode.ForRead, false);

                        if (!(tt.Has(txstylename))) return;

                        ObjectId txtid = tt[txstylename];

                        mldstyle.TextStyleId = txtid;
                        //variations:

                        //#1
                        //mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentMiddle,
                        //LeaderDirectionType.LeftLeader);
                        //mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentMiddle,
                        //LeaderDirectionType.RightLeader);
                        //mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentMiddle,
                        //LeaderDirectionType.UnknownLeader);

                        //#2
                        //mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentBottomOfTop,
                        //LeaderDirectionType.LeftLeader);
                        //mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentBottomOfTop,
                        //LeaderDirectionType.RightLeader);
                        //mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentBottomOfTop,
                        //LeaderDirectionType.UnknownLeader);

                        //#3
                        mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentTopOfTop,
                        LeaderDirectionType.LeftLeader);
                        mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentTopOfTop,
                        LeaderDirectionType.RightLeader);
                        mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentTopOfTop,
                        LeaderDirectionType.UnknownLeader);

                        //mldstyle.SetPaperOrientation(true);//<--generate error!
                        mldict.DowngradeOpen();

                        tr.AddNewlyCreatedDBObject(mldstyle, true);

                        tr.Commit();
                    }

                    catch (Autodesk.AutoCAD.Runtime.Exception ex)
                    {
                        MessageBox.Show(ex.Message + "\n" + ex.StackTrace);
                    }
                }
            }
        }
        /// <summary>
        ///                             = IsDbDictionaryExists =
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="dictname"></param>
        /// <returns></returns>
        static public bool IsDbDictionaryExists(DBDictionary parent, string dictname)
        {
            bool exists = false;

            foreach (DBDictionaryEntry edict in parent)
            {
                if (edict.Key == dictname)
                {
                    exists = true;
                    break;
                }
            }
            return exists;
        }

SOURCECODE

  • Guest
Re: Create Multileader Style
« Reply #4 on: December 02, 2011, 01:24:05 PM »
Thanks Fixo. It seems to be working fine now in VB.net.
The problem was as you had suggested.
Romans did not exist.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Create Multileader Style
« Reply #5 on: December 02, 2011, 02:27:53 PM »
What about LineType = Bylayer?  I cant find this setting anywhere
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Create Multileader Style
« Reply #6 on: December 02, 2011, 03:03:46 PM »
And I also cant figure out how to set it as current style
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

fixo

  • Guest
Re: Create Multileader Style
« Reply #7 on: December 03, 2011, 09:47:27 AM »
Commander, here is updated code
seemed all bugs is fixed, to be honestly I'm not sure
Anyway all is ok on my end
use short commands MakeEm and SetEm,
agreed, looks ugly but working
Try again:
Code: [Select]
#Region "Mleader style commands"

        <CommandMethod("SetMyMleaderStyle", "SetEm", CommandFlags.NoInternalLock)>
        Public Shared Sub DemoSet()
            Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
            Dim ed As Editor = doc.Editor
            Dim db As Database = doc.Database
            Dim mldict As DBDictionary = Nothing
            Dim mldstyle As MLeaderStyle = Nothing
            Dim mlstylename As String = "MyMleaderStyle"

            Dim getvarObj As Object = Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("CMLEADERSTYLE")
            ed.WriteMessage(Environment.NewLine + "Current Mleader style before : {0}", getvarObj.ToString)
            Dim tr As Transaction = doc.TransactionManager.StartTransaction

            Try

                Using tr

                    mldict = CType(tr.GetObject(db.MLeaderStyleDictionaryId, OpenMode.ForRead), DBDictionary)

                    If Not IsDbDictionaryExists(mldict, mlstylename) Then

                        ed.WriteMessage("Mleader style ""{0}"" does not exists", mlstylename)

                        Return

                    End If
                    ' 1st method:
                    mldstyle = CType(tr.GetObject(mldict.GetAt(mlstylename), OpenMode.ForRead), MLeaderStyle)
                    db.MLeaderstyle = mldict.GetAt(mlstylename)
                    ''2nd method
                    '' getvarObj = mlstylename
                    ''Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("CMLEADERSTYLE", getvarObj)
                    '' for dispalying result in final part:
                    getvarObj = Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("CMLEADERSTYLE")
                    tr.Commit() '<-- important, otherwise new settings will not stored
                End Using
            Catch ex As System.Exception
                ed.WriteMessage(ex.Message & vbCr & ex.StackTrace)
            Finally
                ed.WriteMessage(Environment.NewLine + "Current Mleader style after : {0}", getvarObj)
                mldstyle.Dispose()
                mldict.Dispose()
            End Try

        End Sub

        <CommandMethod("MyMleaderStyle", "MakeEm", CommandFlags.Redraw)>
        Public Shared Sub DemoCreate()
            Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
            Dim ed As Editor = doc.Editor
            Dim docloc As DocumentLock = doc.LockDocument()

            Using (docloc)
                Try
                    AddNewMLeaderStyle()
                Catch ex As System.Exception
                    ed.WriteMessage(ex.Message & vbCr & ex.StackTrace)
                Finally
                    ''do nothing (optional)
                End Try
            End Using
        End Sub


        Public Shared Sub AddNewMLeaderStyle()

            Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument

            Dim db As Database = doc.Database

            Dim ed As Editor = doc.Editor



            Dim mlstylename As String = "MyMleaderStyle"   '<-- change mleader style name here

            Dim txstylename As String = "Romans"   '<-- change textstyle name here

            Dim mldict As DBDictionary = Nothing

            Dim mldstyle As MLeaderStyle = Nothing

            Dim tr As Transaction = doc.TransactionManager.StartTransaction

            Try

                Using tr

                    mldict = CType(tr.GetObject(db.MLeaderStyleDictionaryId, OpenMode.ForRead), DBDictionary)

                    If IsDbDictionaryExists(mldict, mlstylename) Then

                        ed.WriteMessage("Mleader style ""{0}"" exists", mlstylename)

                        Return

                    End If

                    mldict.UpgradeOpen()

                    mldstyle = New MLeaderStyle

                    Dim tt As TextStyleTable = CType(tr.GetObject(db.TextStyleTableId, OpenMode.ForRead), TextStyleTable)

                    If Not (tt.Has(txstylename)) Then
                        Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("Does not exist")
                        Return
                    Else
                        Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("TEXTSTYLE", txstylename)
                    End If


                    Dim dbObj As DBObject

                    dbObj = TryCast(mldstyle, DBObject)

                    If dbObj Is Nothing Then

                        ed.WriteMessage("Mleader style ""{0}"" exists", mlstylename)

                        Return

                    End If

                    mldict.SetAt(mlstylename, mldstyle)

                    Dim txtid As ObjectId = tt(txstylename)

                    mldstyle.TextStyleId = txtid

                    mldstyle.ArrowSize = 2.5

                    mldstyle.ArrowSymbolId = db.Dimldrblk

                    mldstyle.ContentType = ContentType.MTextContent

                    mldstyle.DoglegLength = 1.0

                    mldstyle.DrawLeaderOrderType = DrawLeaderOrderType.DrawLeaderHeadFirst

                    mldstyle.DrawMLeaderOrderType = DrawMLeaderOrderType.DrawLeaderFirst

                    mldstyle.EnableLanding = True

                    mldstyle.FirstSegmentAngleConstraint = AngleConstraint.DegreesAny

                    mldstyle.MaxLeaderSegmentsPoints = 2

                    mldstyle.LeaderLineType = LeaderType.StraightLeader

                    mldstyle.SecondSegmentAngleConstraint = AngleConstraint.DegreesHorz

                    mldstyle.TextAlignAlwaysLeft = False

                    mldstyle.TextAngleType = TextAngleType.HorizontalAngle

                    mldstyle.TextHeight = 2.5

                    'variations:

                    '#1
                    'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentMiddle,
                    'LeaderDirectionType.LeftLeader);
                    'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentMiddle,
                    'LeaderDirectionType.RightLeader);
                    'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentMiddle,
                    'LeaderDirectionType.UnknownLeader);

                    '#2
                    'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentBottomOfTop,
                    'LeaderDirectionType.LeftLeader);
                    'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentBottomOfTop,
                    'LeaderDirectionType.RightLeader);
                    'mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentBottomOfTop,
                    'LeaderDirectionType.UnknownLeader);

                    '#3
                    mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentTopOfTop, LeaderDirectionType.LeftLeader)
                    mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentTopOfTop, LeaderDirectionType.RightLeader)
                    mldstyle.SetTextAttachmentType(TextAttachmentType.AttachmentTopOfTop, LeaderDirectionType.UnknownLeader)

                    tr.Commit()
                End Using
            Catch ex As Autodesk.AutoCAD.Runtime.Exception
                Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog(ex.Message + vbLf + ex.StackTrace)
            Finally
                mldstyle.Dispose()
                mldict.Dispose()
            End Try
        End Sub

        Public Shared Function IsDbDictionaryExists(ByVal parent As DBDictionary, ByVal dictname As String) As Boolean
            Dim exists As Boolean = False

            For Each edict As DBDictionaryEntry In parent
                Try
                    If edict.Key = dictname Then
                        exists = True
                        Exit For
                    End If
                Catch
                End Try
            Next
            Return exists
        End Function


#End Region

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Create Multileader Style
« Reply #8 on: December 05, 2011, 09:14:41 AM »
Thanks Fixo.  As always, it was something simple I had overlooked.  This is what I ended up with
Code: [Select]
[CommandMethod("TEPMLeader")]
        public void TEPMleaderStyle()
        {
            Document Doc = acadApp.DocumentManager.MdiActiveDocument;
            Editor Ed = Doc.Editor;
            Database Db = Doc.Database;
            string strMLeaderStyleName = "TEP";
            using (Transaction Trans = Db.TransactionManager.StartTransaction())
                {
                    ObjectId TxtId = ObjectId.Null;
                    TextStyleTable TST = Db.TextStyleTableId.GetObject(OpenMode.ForRead) as TextStyleTable;
                    if (!TST.Has("TEP"))
                    {
                        TST.UpgradeOpen();
                        TextStyleTableRecord tsTableRecord = new TextStyleTableRecord();
                        tsTableRecord.Name = "TEP";
                        tsTableRecord.FileName = "Romans.shx";
                        tsTableRecord.IsVertical = false;
                        tsTableRecord.TextSize = 0.09375;
                        tsTableRecord.Annotative = AnnotativeStates.True;
                        TST.Add(tsTableRecord);
                        Trans.AddNewlyCreatedDBObject(tsTableRecord, true);
                    }
                    DBDictionary mldict = (DBDictionary)Trans.GetObject(Db.MLeaderStyleDictionaryId, OpenMode.ForRead );
                    if (!IsDbDictionaryExist(mldict, strMLeaderStyleName ))
                    {
                        mldict.UpgradeOpen();
                        MLeaderStyle objMLeaderStyle = new MLeaderStyle();
                        mldict.SetAt(strMLeaderStyleName, objMLeaderStyle);
                        objMLeaderStyle.ArrowSize = 0.09375;
                        objMLeaderStyle.ContentType = ContentType.NoneContent;
                        objMLeaderStyle.ArrowSymbolId = Db.Dimldrblk;
                        objMLeaderStyle.DoglegLength = 0.09375;
                        objMLeaderStyle.LeaderLineColor = Color.FromColorIndex(ColorMethod.ByLayer,256);
                        objMLeaderStyle.LeaderLineWeight = LineWeight.ByLayer;
                        //objMLeaderStyle.LeaderLineType =
                        objMLeaderStyle.DrawLeaderOrderType = DrawLeaderOrderType.DrawLeaderHeadFirst;
                        objMLeaderStyle.DrawMLeaderOrderType = DrawMLeaderOrderType.DrawLeaderFirst;
                        objMLeaderStyle.EnableLanding = true;
                        objMLeaderStyle.FirstSegmentAngleConstraint = AngleConstraint.DegreesAny;
                        objMLeaderStyle.MaxLeaderSegmentsPoints = 2;
                        objMLeaderStyle.LeaderLineType = LeaderType.StraightLeader;
                        objMLeaderStyle.SecondSegmentAngleConstraint = AngleConstraint.DegreesAny;
                        objMLeaderStyle.Annotative = AnnotativeStates.True;
                        mldict.DowngradeOpen();
                        Trans.AddNewlyCreatedDBObject(objMLeaderStyle, true);
                        Db.MLeaderstyle = mldict.GetAt("TEP");
                        Trans.Commit();
                    }
                }
        }
        public bool IsDbDictionaryExist(DBDictionary parent, string dictname)
        {
            bool exists = false;
            foreach (DBDictionaryEntry edict in parent)
            {
                if (edict.Key == dictname)
                {
                    exists = true;
                    break;
                }
            }
            return exists;
        }

I still didn't find the Linetype ByLayer part, but that is for another day.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

kaefer

  • Guest
Re: Create Multileader Style
« Reply #9 on: December 05, 2011, 10:01:37 AM »
Code: [Select]
                    if (!IsDbDictionaryExist(mldict, strMLeaderStyleName ))

You sure have a funny name for the DBDictionary.Contains() method.

fixo

  • Guest
Re: Create Multileader Style
« Reply #10 on: December 05, 2011, 10:07:57 AM »
I still didn't find the Linetype ByLayer part, but that is for another day.
Commander,
See the difference:
Code: [Select]
                        objMLeaderStyle.LeaderLineType = LeaderType.StraightLeader;//it means type of leader lines: invisible leader,spline leader, or straight leader
                        objMLeaderStyle.LeaderLineTypeId = Db.Celtype;// it means linetype in usual terms (an equivalent of lisp variable "celtype" or current linetype will be used)
Hope that make a sence

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Create Multileader Style
« Reply #11 on: December 05, 2011, 10:13:35 AM »
You sure have a funny name for the DBDictionary.Contains() method.

I borrowed that code and didn't change the names.(thanks Fixo)  Guess I should update it
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

fixo

  • Guest
Re: Create Multileader Style
« Reply #12 on: December 05, 2011, 10:59:52 AM »
You sure have a funny name for the DBDictionary.Contains() method.

I borrowed that code and didn't change the names.(thanks Fixo)  Guess I should update it
You're very welcome :)