Option Explicit
Dim acad_doc As AcadDocument
Public Sub mytest()
Dim t_sset As AcadSelectionSet
Dim dxfcode(0) As Integer
Dim dxfvalue(0) As Variant
On Error GoTo FUNC_EXIT
Set acad_doc = ThisDrawing 'if you are not in vba, then replace
thisdrawing with your document
'create selection set in drawing
On Error Resume Next
Set t_sset = acad_doc.SelectionSets.Add("my_sset")
If Err Then
Err.Clear
Set t_sset = acad_doc.SelectionSets("my_sset")
t_sset.Clear
End If
'now get entities
dxfcode(0) = 0
dxfvalue(0) = "DIMENSION" 'that is the dxfcode for dimenstions
t_sset.Select acSelectionSetAll, , , dxfcode, dxfvalue
On Error GoTo FUNC_EXIT
MsgBox t_sset.Count
FUNC_EXIT:
On Error Resume Next
If Err Then MsgBox Err.Number & " / " & Err.Description
acad_doc.SelectionSets("my_sset").Delete
Set t_sset = Nothing
Set acad_doc = Nothing
Err.Clear
On Error GoTo 0
End Sub
regards, alfred
--
___________________________________________________________
Alfred Neswadba
Ingenieur Studio HOLLAUS
A-3100 St.Poelten, Brandstroemg. 6..... +43 699 21807303
Internet ................................ www.hollaus.at
E-Mail ...................... alfred.neswadba@hollaus.at
___________________________________________________________
"Dave Wilkinson"
schrieb im Newsbeitrag
news:FE4EAA502D38EE150F4749CA4A97DAC1@in.WebX.maYIadrTaRb...
> but how do I filter just the dimensions ?
> I have used a filter previously to get block information using DXFdata and
> DXFcode, but am not sure how to go about the dimensions ????
>
> Thanks
> Dave
>
> "Alfred Neswadba" wrote in message
> news:51F924AFF06F045B2A7C419EA7C22158@in.WebX.maYIadrTaRb...
> > hi dave
> >
> > within vb/a you have to build 2 (or more) selections, one for
"DIMENSION",
> > one for "TEXT" (and/or "MTEXT")
> >
> > regards, alfred
> >
> > --
> > ___________________________________________________________
> > Alfred Neswadba
> > Ingenieur Studio HOLLAUS
> > A-3100 St.Poelten, Brandstroemg. 6..... +43 699 21807303
> > Internet ................................ www.hollaus.at
> > E-Mail ...................... alfred.neswadba@hollaus.at
> > ___________________________________________________________
> >
> > "Dave Wilkinson" schrieb im Newsbeitrag
> > news:D67F21A123B706ACB7AB4E7513DB9420@in.WebX.maYIadrTaRb...
> > > Hi there,
> > >
> > > Could someone help point me the right direction please.
> > > I am trying to select all the dimension's and text within a drawing so
> > that
> > > I can update the dimscale.
> > > I am presuming that I need to build a selection set, but I cannot
fatham
> > how
> > > to filter just the dimensions and text. !
> > >
> > > Thanks
> > > Dave
> > >
> >
>