- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Has anyone found a good way to promote dimension constraints to MBD/3DA? There is a PromoteParameter property associated with the ModelDimensionDefinition, but it doesn't appear to be usable. The closest thing I've found it so manually select the parameters needed, and execute the built in command. This doesn't work well from inside one of my commands due to undo/redo requirements and makes managing a individual dimension constraint one at at time really awkward. Snippet of the best I've been able to make actually work, but as stated earlier undo/redo gets lost.
Dim pdoc as PartDocument
Set pdoc = ThisApplication.ActiveDocument
Dim modeldims as ModelDimension
set modeldims = pdoc .ComponentDefinition.ModelAnnotations.ModelDimensions
Dim i as Integer
Set i = modeldims.Count
pdoc.SelectSet.Set({1+ Dimensions})
Call ThisApplication.CommandManager.ControlDefinitions("3daPromoteDimensionCmd").Execute
for j = i+1 to modeldims.Count
Dim newannotation = modeldims(j)
{Do something with newannotation}
next
Wouldn't expect it to be quite this painful to convert a dimension to model annotation. One help would be appreciated.
Thanks,
William Graham
Solved! Go to Solution.