Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show only
|
Search instead for
Did you mean:
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.Translate
This would be extremely useful for those who have a large amount of models with existing tolerances in feature dimensions, allowing for automatic generation of MBD data.
If you would like to promote all sketch dimensions to a 3d annotation then the below will achieve this, the annotations will appear with the text in the same position as the sketch dimension text.
Dim partDoc As Inventor.Document
partDoc = ThisApplication.ActiveDocument
Dim oCompDef As PartComponentDefinition = partDoc.ComponentDefinition
Dim modeldims As ModelDimensions = oCompDef.ModelAnnotations.ModelDimensions
Dim oSelectSet As SelectSet
oSelectSet = partDoc.SelectSet
oSelectSet.Clear
'Wrap adding all annotations within a single 'UNDO'
oDoc = ThisDoc.Document
oUndoName = "iLogic Promote 3D Annotations"
Dim UNDO As Transaction
UNDO = ThisApplication.TransactionManager.StartTransaction(oDoc, oUndoName)
'Code inside UNDO here:
'-------------------------------------------------------------------------------------------------------------------------------------
For Each oSketch In oCompDef.Sketches 'go through each sketch in the model
oSketch.Visible = True 'make the sketch visible
oSketch.DimensionsVisible = True 'make the dimensions visible
'select all the dimensions in the sketch
For Each oDim In oSketch.DimensionConstraints
oSelectSet.Select(oDim)
Next
Call ThisApplication.CommandManager.ControlDefinitions("3daPromoteDimensionCmd").Execute 'promote the dimensions to 3d annotations
'if you dont see annotations try this line below
'Call ThisApplication.CommandManager.ControlDefinitions("PartVisibilityCtxCmd").Execute
oSketch.Visible = False 'hide the sketch again
oSketch.DimensionsVisible = False
Next
'-------------------------------------------------------------------------------------------------------------------------------------
UNDO.End