This is not yet possible, because the 3D annotations API are not yet exposed to users. I just recently knew this from an Autodesk guy only, but one thing you can do is trigger the control definition using iLogic and prompt the dialogue box and also write next line which presses the "OK" button for you and it will retrieve all the 3D annotations for you.
the control definition for dimension retrieve is "DrawingRetrieveDimsCmd" and you can use below line of code to execute it.
ThisApplication.CommandManager.ControlDefinitions.Item("DrawingRetrieveDimsCmd").Execute
You can also then automate the task so that it automatically selects the view using select set and run this line and choose 3D Annotations and Press OK button, using below code.
'ThisApplication.CommandManager.ControlDefinitions.Item("AppContextual_OKCmd").Execute
Be aware that the View representations are not working properly and you will not be able to select that in Retrieve 3D annotations using iLogic. You also need to navigate to 3D Annotations tab manually in the dialogue box.
I hope this has partly answered you question. If it has, please accept this as SOLUTION.
Thanks,
Regards,
Dutt Thakar
Here is some fairly straight forward iLogic code to retrieve 'model annotations' from the model to the drawing, that doesn't include executing any commands. This rule is set up to retrieve all model annotations from every view, but you can modify it as needed. The Retrieve() function is where the action is.
If ThisApplication.ActiveDocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
MsgBox("A Drawing Document must be active for this rule (" & iLogicVb.RuleName & ") to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
For Each oSheet As Inventor.Sheet In oDDoc.Sheets
For Each oView As DrawingView In oSheet.DrawingViews
'can also supply an ObjectCollection of the dims you want to retrieve after specifying the view
oSheet.DrawingDimensions.GeneralDimensions.Retrieve(oView)
Next
Next
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.
If you have time, please... Vote For My IDEAS 💡and Explore My CONTRIBUTIONS
Inventor 2021 Help | Inventor Forum | Inventor Customization Forum | Inventor Ideas Forum
Wesley Crihfield
(Not an Autodesk Employee)