Message 1 of 4
Center dims code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I took this from the api help, and modified it based on a video I found, but any ideas as why this needs to be ran twice to get all dims??
' Set a reference to the active drawing document Dim oDoc As DrawingDocument oDoc = ThisDoc.Document ' Set a reference to the active sheet Dim oSheet As Sheet oSheet = oDoc.ActiveSheet Dim oDrawingDim As DrawingDimension ' Iterate over all dimensions in the drawing and ' center them if they are linear or angular. For Each oDrawingDim In oSheet.DrawingDimensions If TypeOf oDrawingDim Is LinearGeneralDimension Or _ TypeOf oDrawingDim Is AngularGeneralDimension Then oDrawingDim.CenterText End If Next iLogicVb.UpdateWhenDone = True InventorVb.DocumentUpdate()
Autodesk Certified Professional