Author Topic: how to set leader text direction as right to left instead of left to right  (Read 2748 times)

0 Members and 1 Guest are viewing this topic.

gvgbabu

  • Guest
hi

please guide me how to set leader text direction as right to left instead of left to right . I am using  vb.net 2005 version. it's old but it suits my requirement.

shall i use
mtext.rotation
or
mtext. flowdirection=flowdirection.righttoleft

i used the second one it gives error.

thanks in advance
gvg


Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
What is the error?

Not very many people use vs2005 .

Which AutoCAD are you targeting ?

Added:
Capitalisation is important to me because I use C#.  My first reaction was that your syntax is incorrect ... but you are using VB, so perhaps I'm wrong.

I'm not sure that FlowDirection is what you should be using ?? Can you post a significant code sample ?
« Last Edit: August 05, 2014, 06:14:42 AM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

gvgbabu

  • Guest
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Autodesk.AutoCAD.Runtime.Exception: eInvalidInput

version is autocad 2007

sdunn

  • Newt
  • Posts: 90
I think what you are looking for is a property of the mleader and not the mtext component.

mleader.TextAlignmentType = TextAlignmentType.LeftAlignment

gvgbabu

  • Guest
thanks for your replies.

But there is no property of textalignmenttype for leader in vb.net 2005.

i think it can be done using  setdogleg in higher versions. i want to know alternative for setdogleg in 2005.



« Last Edit: August 06, 2014, 03:46:18 AM by gvgbabu »

gvgbabu

  • Guest

is there any way to know the default property values of the leader in the SetDatabaseDefaults in vb.net

gvgbabu

  • Guest
pleas guide me

this code i am using it gives left to right side leader with text

  ' Create the MText annotation
                Dim acMText As MText = New MText()
                acMText.SetDatabaseDefaults()
                acMText.Contents = spText
                acMText.Location = New Point3d(pPtEnd.X, pPtEnd.Y, 0)
                acMText.Width = 0
                acMText.TextHeight = 0.075

                ' Add the new object to Model space and the transaction
                acBlkTblRec.AppendEntity(acMText)
                acTrans.AddNewlyCreatedDBObject(acMText, True)

                ' Create the leader with annotation
                Dim acLdr As Leader = New Leader
                acLdr.SetDatabaseDefaults()
                acLdr.AppendVertex(pPtStart)
                acLdr.AppendVertex(pPtEnd)
                acLdr.AppendVertex(New Point3d(pPtEnd.X, pPtEnd.Y, 0))
                acLdr.HasArrowHead = True
                acLdr.Dimasz = 0.08
                acLdr.Dimgap = 0

                ' Add the new object to Model space and the transaction
                acBlkTblRec.AppendEntity(acLdr)
                acTrans.AddNewlyCreatedDBObject(acLdr, True)
                ' Attach the annotation after the leader object is added
                acLdr.Annotation = acMText.ObjectId
                acLdr.Dimtad = 1

                acLdr.EvaluateLeader()

how to get right to left  leader with text
i am using vb.net 2005 version
yet i did not get the solution
please see the attachment
thanks
gvg
« Last Edit: August 19, 2014, 04:40:36 AM by gvgbabu »