I did some additional testing on my end and found out that it seems like what you are trying to do is very possible, with the right preparations ahead of time.
- First of all, as @KurtDR mentioned, when you initially create the 3D model dimensions and/or other 3D model annotations within the model, you must make sure they are on an annotation plane that can be seen from the camera angles you want to look at the model from when you create the views for it in the drawing.
- Next, make sure you have a different DVR (DesignViewRepresentation) for each view you want to show in the drawing.
- And while each DVR is active in the model, set the 'visibility' of those 3D model annotations the way you want them for that specific view.
- Later, when you create the drawing view, and set that view to this DVR, that will help control which 3D model annotations are included in that view.
- Next, in code for creating/adding the drawing views:
- Create a NameValueMap and add the options into it that are appropriate for the type of model being shown in that view, to set certain settings the way you want them, and supply that as the input being asked for, labeled 'AdditionalOptions'.
- You can review the documentation on the AddBaseView online help page for more about the names of those options, what model types they are for, and what they do.
- One of those options is for that 'Include3DAnnotations' setting that you see within that smaller dialog. And I can confirm that it works as expected (when the other preparations have been set up properly).
I had a weldment type assembly I was working on, added several 3D model dimensions, and a couple 3D annotation Leader Text notes. I did this for two different views of the model, and made sure there was a DVR for both views. After all annotations were present, I made sure only the ones I wanted to see in each view were visible while their DVR's were active, so the DVR's would record those visibility settings. I even turned one or another off (visibly) in each view, as an additional test. When I created the drawing view by code, the way I mentioned above, the views, and the specific 3D model annotations being automatically included in them, were just as expected (only the ones visible in the specified DVR). The reason I am specifying 'right' view orientation, but then 'FRONT' DVR, is due to ViewCube being different than what I would prefer, but I do not like to modify the ViewCube from its default. Instead I generally design stuff with the ViewCube's orientation in mind, so that it ends up the way I want, obviously with some exceptions here and there, when it is not important.
Below is a modified version of the code I used when testing, that worked OK for me.
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oViews As DrawingViews = oSheet.DrawingViews
Dim oBView As DrawingView = Nothing
Dim sModelFile As String = "C:\Temp\MyWeldment.iam"
Dim oModelDoc As Inventor.Document = ThisApplication.Documents.Open(sModelFile, False)
Dim oPosition As Inventor.Point2d = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Width / 4, oSheet.Height / 4)
Dim dScale As Double = (1/23)
Dim oVO As ViewOrientationTypeEnum = ViewOrientationTypeEnum.kRightViewOrientation
Dim oVStyle As DrawingViewStyleEnum = DrawingViewStyleEnum.kShadedDrawingViewStyle
Dim sMViewName As String = "FRONT"
Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
oOptions.Add("WeldmentFeatureGroup", WeldmentFeatureGroupEnum.kWeldsFeatureGroup)
oOptions.Add("DesignViewRepresentation", "FRONT")
oOptions.Add("DesignViewAssociative", True)
oOptions.Add("Include3DAnnotations", True)
Try
oBView = oViews.AddBaseView(oModelDoc, oPosition, dScale, oVO, oVStyle, sMViewName, , oOptions)
Catch ex As Exception
Logger.Error("AddBaseView method error." & vbCrLf & ex.Message & vbCrLf & ex.StackTrace)
End Try
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)