Vertical and horizontal dimensions

Discussion in 'AutoCAD' started by Frank Jan Koole, Jan 21, 2004.

  1. Hi,

    Does VBA know the difference between a horizontal and vertical dimension?
    And if it does, how can I specify it in my code?

    Frank
     
    Frank Jan Koole, Jan 21, 2004
    #1
  2. It only knows them as rotated dimensions [AcadDimRotated]. You'd need to
    read the Rotation property to determine h/v.
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 21, 2004
    #2
  3. I'm not sure if this is still true, but as of AutoCAD 2000i the rotation
    property of AcadDimRotated objects was buggy. For example, try taking this for
    a spin.
    Sub test()
    Dim objDim As AcadDimRotated
    Dim point1(2) As Double
    Dim point2(2) As Double
    Dim location(2) As Double
    Dim rotAngle As Double
    point1(0) = 0: point1(1) = 0: point1(2) = 0
    point2(0) = 2: point2(1) = 2: point2(2) = 0
    location(0) = 1: location(1) = 1: location(2) = 0
    rotAngle = Atn(1)
    Set objDim = ThisDrawing.ModelSpace.AddDimRotated(point1, point2, location,
    rotAngle)
    MsgBox objDim.Rotation
    Set objDim = Nothing
    End Sub
     
    Chuck Gabriel, Jan 21, 2004
    #3
  4. Yeah, you're right Chuck - I forgot about that. FTR it's still buggy in
    2005 too.
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 21, 2004
    #4
  5. You could use VLAX availablel free of charge from www.AcadX.com to retrieve
    the dimension's dxf group code 50.
     
    Chuck Gabriel, Jan 22, 2004
    #5
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.