+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Forum Newbie
    Using
    AutoCAD 2009
    Join Date
    Jan 2009
    Posts
    1

    Default How to use QUICK DIMENSION (QDIM) VBA

    Hello i have this code to draw a polyline, i would like to add dimesions QDIM comand with VBA.

    Sub Example_AddPolyline()
    Dim linea As AcadPolyline
    Dim puntos(0 To 14) As Double
    puntos(0) = 0:
    puntos(3) = 34.5:
    puntos(6) = 50.2:
    puntos(9) = 76.3:
    puntos(12) = 120.5:
    Set linea = ThisDrawing.ModelSpace.AddPolyline(puntos)
    End Sub

  2. #2
    Super Member fixo's Avatar
    Computer Details
    fixo's Computer Details
    Operating System:
    Windows 7
    Motherboard:
    E7500
    CPU:
    Intel(R)Core(TM)2 DUO CPU 2.93HGz
    RAM:
    4098 Gb
    Graphics:
    1024 Gb
    Using
    AutoCAD 2009
    Join Date
    Jul 2005
    Location
    Thanks God, I'm far enough from Hitleropa
    Posts
    1,697

    Default

    Registered forum members do not see this ad.

    Welcome on board!
    Try this one:
    Code:
    Option Explicit
    
    Sub Example_QDim()
    Dim linea As AcadPolyline
    Dim puntos(0 To 14) As Double
    Dim hndl As String
    
    puntos(0) = 0:
    puntos(3) = 34.5:
    puntos(6) = 50.2:
    puntos(9) = 76.3:
    puntos(12) = 120.5:
    Set linea = ThisDrawing.ModelSpace.AddPolyline(puntos)
    hndl = linea.Handle
    ThisDrawing.Utility.Prompt (vbCr & "Handle: " & hndl) & vbCr
    ThisDrawing.SendCommand "_qdim" & vbCr & "(handent " & vbCr & Chr(34) & hndl & Chr(34) & ") " & vbCr & " PAUSE" & vbCr
    End Sub
    ~'J'~
    The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)

Similar Threads

  1. Dimension - remove dimension line but not arrows
    By jkristia in forum AutoCAD Beginners' Area
    Replies: 10
    Last Post: 7th Nov 2008, 04:24 pm
  2. Dimension and scaling...just a quick question!
    By jbwilliamz in forum AutoCAD Beginners' Area
    Replies: 7
    Last Post: 23rd Oct 2008, 06:49 am
  3. Quick Select/Quick Filter
    By mike06 in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 4
    Last Post: 29th Mar 2008, 01:33 am
  4. Qdim
    By happyunited in forum AutoCAD Drawing Management & Output
    Replies: 6
    Last Post: 31st Jul 2007, 08:01 pm
  5. A Quick Tip on Quick Leader
    By CAD-e-Corner in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 21st Nov 2006, 10:51 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts