07-25-2018
05:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-25-2018
05:40 AM
Well, if you do this manually, you first need to create a selection, and then activate the command to show the dimensions, if you just loop through the feature, only the last looped shows dimensions.
Sub ShowDimensions()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oCompDef As PartComponentDefinition
Set oCompDef = oDoc.ComponentDefinition
Dim oSelectSet As SelectSet
Dim oFeature As PartFeature
For Each oFeature In oCompDef.Features
Call oDoc.SelectSet.Select(oFeature)
Next oFeature
Dim oControlDef As ControlDefinition
Set oControlDef = ThisApplication.CommandManager.ControlDefinitions.Item("PartShowDimensionsCtxCmd")
oControlDef.Execute
End Sub
If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
please feel free to "kudos"