Type of drawing dimmension

Type of drawing dimmension

Anonymous
Not applicable
327 Views
4 Replies
Message 1 of 5

Type of drawing dimmension

Anonymous
Not applicable
How can I check type of drawing dimmension
For example diameter or linear dimension?

Of course in VBA

Zorba29
0 Likes
328 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Something like this I imagine:
[code]
Option Explicit

Private Sub CommandButton1_Click()
Dim oDimCon As DimensionConstraint
If TypeOf ThisApplication.ActiveDocument.SelectSet(1) Is DimensionConstraint Then
Set oDimCon = oSelectSet(1)

If oDimCon.Type = kRadiusDimConstraintObject Then

ElseIf oDimCon.Type = kDiameterDimConstraintObject Then

'...

End If
End If
End Sub
[/code]
0 Likes
Message 3 of 5

Anonymous
Not applicable
I think not exactly about it.

Drawing dimension are not sketched dimension.

I would like check type of drawing dimension

Your example work good only in sketch but it don't work on views of drawing.

How can I check type of dimensions on views of drawing

Einst_1
0 Likes
Message 4 of 5

Anonymous
Not applicable
The ability to check for drawing dimension types was introduced in R11 and
is not available in previous releases. Here is some sample code. Select a
dimension and run the macro.

Sub DrawingDimensionType()

Dim oDim As DrawingDimension
Set oDim = ThisApplication.ActiveDocument.SelectSet.Item(1)

Select Case oDim.Type

Case kLinearGeneralDimensionObject
MsgBox "Linear general dimension"
Case kAngularGeneralDimensionObject
MsgBox "Angular general dimension"
Case kRadiusGeneralDimensionObject
MsgBox "Radius general dimension"
Case kDiameterGeneralDimensionObject
MsgBox "Diameter general dimension"
Case Else
MsgBox "Not a general dimension"

End Select
End Sub

Sanjay-


wrote in message news:5245482@discussion.autodesk.com...
How can I check type of drawing dimmension
For example diameter or linear dimension?

Of course in VBA

Zorba29
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thank you very much.

Zorba29
0 Likes