Message 1 of 3
Delete all unattached centerlines and dimensions

Not applicable
07-21-2006
01:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I found this sample. But how could I delete all the unattached centerlines?
Public Sub DeleteUnattachedDimensions()
' Set a reference to the active drawing document
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
' Set a reference to the active sheet
Dim oSheet As Sheet
Set oSheet = oDoc.ActiveSheet
Dim oDrawingDim As DrawingDimension
' Iterate over all dimensions in the drawing
' and delete unattached (sick) dimensions.
For Each oDrawingDim In oSheet.DrawingDimensions
If oDrawingDim.Attached = False Then
Call oDrawingDim.Delete
End If
Next
End Sub
Best regards
Georg
I found this sample. But how could I delete all the unattached centerlines?
Public Sub DeleteUnattachedDimensions()
' Set a reference to the active drawing document
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
' Set a reference to the active sheet
Dim oSheet As Sheet
Set oSheet = oDoc.ActiveSheet
Dim oDrawingDim As DrawingDimension
' Iterate over all dimensions in the drawing
' and delete unattached (sick) dimensions.
For Each oDrawingDim In oSheet.DrawingDimensions
If oDrawingDim.Attached = False Then
Call oDrawingDim.Delete
End If
Next
End Sub
Best regards
Georg