.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with Text JIG Alignment point

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
583408432
865 Views, 2 Replies

Problem with Text JIG Alignment point

Protected Overrides Function WorldDraw(ByVal draw As Autodesk.AutoCAD.GraphicsInterface.WorldDraw) As Boolean

Dim acText As New DBText()

acText.SetDatabaseDefaults()
acText.Position = BasePt
acText.Height = 350
acText.TextString = "001"

' I want to set the alignment point in the mid, but it doesn't work.
' In JIG, it's still displayed in the left bottom corner, anyone can solve this problem?
acText.HorizontalMode = TextHorizontalMode.TextMid
acText.VerticalMode = TextVerticalMode.TextVerticalMid
acText.AlignmentPoint = BasePt

draw.Geometry.Draw(acText)
Return True
End Function

Tags (1)
2 REPLIES 2
Message 2 of 3
chiefbraincloud
in reply to: 583408432

I have two text jigs that work with non-standard alignments.  In both cases, I am jigging a Database resident DBText object, so that might be problem 1, you haven't added the new text object to the Database yet.

 

Along with that, inside my jig code in the Update Function, I am calling AdjustAlignment.

 

Edit:  To be clear, I am using an EntityJig whereas it appears you are using a DrawJig, so If the same things are going to work for you, the AdjustAlignment call should be in this WorldDraw function.

Dave O.                                                                  Sig-Logos32.png
Message 3 of 3
583408432
in reply to: chiefbraincloud

 

Thank you very much! Your answer is  pretty good! 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost