thanks Josh
actually i am looking for the lines/solids etc.
defining the dimension object, and i can get them
thru the blocks collection, but then which one
is which? (which blockref is which blockdef?)
mark
"Minkwitz Design" wrote in message
news:3C87A97A.1020403@ameritech.net...
> Hi Mark,
> In vba dimensions are treated as independant entities and blocks are
> treated like a class that is instanced through out the drawing as an
> entity called a blockreference. Dimensions are contained in the
> modelspace (or paperspace) collection along with all the other entities.
> The 2 are seperate and dimensions are not contained in the blocks
> collection. What you may be looking for is the dimension's "objectid" or
> "handle" property.
> -Josh
>
> Option Explicit
> Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As
> Integer
>
> Sub GetDimInfo()
> Dim Rot As AcadDimRotated
> Dim ent As AcadEntity
> Set ent = GetEnt
> If TypeOf ent Is AcadDimRotated Then
> Set Rot = ent
> MsgBox Rot.ObjectID
> MsgBox Rot.ObjectName
> MsgBox Rot.Handle
> End If
> End Sub
>
> Function GetEnt() As AcadEntity
> Dim ent As AcadEntity
> Dim Pt As Variant
> Set ent = Nothing
> On Error Resume Next
> Do
> ThisDrawing.Utility.getentity ent, Pt, "Pick an Object :"
> If Err Then
> If GetAsyncKeyState(&H1B) Then
> Err.Clear
> Exit Do
> ElseIf ThisDrawing.GetVariable("errno") = "7" Or
> ThisDrawing.GetVariable("errno") = "52" Then
> Err.Clear
> End If
> End If
> If Not ent Is Nothing Then
> Set GetEnt = ent
> Exit Do
> End If
> Loop
> End Function
>
>
> Mark wrote:
>
> > in plain autolisp ... (cdr (assoc 2 (entget (car (entsel)))))
> > will give the dimension block name ex. "*D22"
> > these blocks are actually in the blocks collection object.
> >
> > how can i get the block name, using VBA of a "AcadDimRotated" object.
> >
> >
> > thanx
> > mark
> >
> >
> >
>