select filter Rotated dimensions

select filter Rotated dimensions

Anonymous
Not applicable
340 Views
2 Replies
Message 1 of 3

select filter Rotated dimensions

Anonymous
Not applicable
I've got a small problem with the selectionfilter. The sub below works when i use it for a "Hatch, Line, Mtext but it isn't working when i want to select a dimension.

I think the problem is in the "dataVal(0) = "DIMROTATED" part.

Thx's in advance.


Private Sub CommandButton4_Click()
Dim entObj As AcadEntity
Dim ssetObj As AcadSelectionSet
Dim mode As Integer
Dim grpCode(0) As Integer
Dim dataVal(0) As Variant

Set ssetObj = ThisDrawing.SelectionSets.Add("SS1")
mode = acSelectionSetAll
grpCode(0) = 0
dataVal(0) = "DIMROTATED"

ssetObj.Select mode, , , grpCode, dataVal

Dim S1 As AcadDimRotated

For Each S1 In ssetObj
S1.Visible = False
Next mtekst

ssetObj.Delete

End Sub
0 Likes
341 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I don't have AutoCAD here to test, but this may work:

Dim grpCode(6) As Integer
Dim grpVal(6) As Variant

grpCode(0) = 0: grpVal(0) = "DIMENSION"
grpCode(1) = -4: grpVal(1) = " grpCode(2) = -4: grpVal(2) = "="
grpCode(3) = 70: grpVal(3) = 32 '0 + 32 0 is the code for
Rotated/Horiz./Vert. Dims
grpCode(4) = -4: grpVal(4) = "="
grpCode(5) = 70: grpVal(5) = 160 '0 + 32 + 64
grpCode(6) = -4: grpVal(6) = "OR>"

wrote in message news:5207078@discussion.autodesk.com...
I've got a small problem with the selectionfilter. The sub below works when
i use it for a "Hatch, Line, Mtext but it isn't working when i want to
select a dimension.

I think the problem is in the "dataVal(0) = "DIMROTATED" part.

Thx's in advance.


Private Sub CommandButton4_Click()
Dim entObj As AcadEntity
Dim ssetObj As AcadSelectionSet
Dim mode As Integer
Dim grpCode(0) As Integer
Dim dataVal(0) As Variant

Set ssetObj = ThisDrawing.SelectionSets.Add("SS1")
mode = acSelectionSetAll
grpCode(0) = 0
dataVal(0) = "DIMROTATED"

ssetObj.Select mode, , , grpCode, dataVal

Dim S1 As AcadDimRotated

For Each S1 In ssetObj
S1.Visible = False
Next mtekst

ssetObj.Delete

End Sub
0 Likes
Message 3 of 3

Anonymous
Not applicable
It works, thanks for your help.
0 Likes