Dimension Text Position

Discussion in 'AutoCAD' started by talledo, Jul 23, 2004.

  1. talledo

    talledo Guest

    Hello, I made this simple macro in VBA:

    Public Sub down()
    Dim sset As AcadSelectionSet
    Dim quota As AcadDimension
    Dim punto(0 To 2) As Double

    Set sset = ThisDrawing.SelectionSets.Add("Sposta")
    sset.SelectOnScreen

    For i = 0 To sset.Count - 1
    If TypeOf sset.Item(i) Is AcadDimension Then
    Set quota = sset.Item(i)
    punto(0) = quota.TextPosition(0)
    punto(1) = quota.TextPosition(1) - delta
    punto(2) = 0
    quota.TextPosition = punto
    ThisDrawing.Regen True
    End If
    Next
    sset.Delete
    End Sub

    I can move the dimension text of a "delta" parameter. But if I stretch the dimension, the text doesn’t move in Horizontal center. So I have to use the “dimeditâ€, “home†command and then to run my macro again... Is there a way to make the home alignment from my macro? I tried with this line

    quota.VerticalTextPosition = acOutside

    But this only restore the VerticalPosition. What about Horizontal position? My AcadDimension hasn’t got an HorizontalTextPosition variable.
    Thanks
    Diego Alejandro Talledo
     
    talledo, Jul 23, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.