I have added a custom view in model view using "IModelDoc2::Nameview()". I want to add annotation view using this view just like we use "InsertAnnotationView()" to add standard views.
Unfortunately you cannot create an Annotation View from a user-created view. Instead, you will need to define its direction based on a plane or face and a horizontal reference, using a 0 in the AnnotatoinViewingDirection parameter.
2019 SOLIDWORKS API Help - InsertAnnotationView Method (IModelDocExtension)
Thanks for the information. We can surely create annotation view using "InsertAnnotationView()". But the annotation view does not contain information of scale and translation. So I wanted to create annotation view from a user-created model view.
Using solidworks UI, we can create an Annotation View from a user-created Model view. Following is the example. I thought if there is any API that I am missing. Please let me know if you have any suggestions.
As detailed in the API Help, you can only create Annotation Views from a standard view (*Front, *Back, etc) or by using an orientation reference. Annotation Views do not store zoom/scale or position like user-defined views. They only hold orientation and annotations assigned to the Annotation View.
3D Views may be what you are looking for. They contain both view orientation, scaling and position as well as the visible annotations from the active Annotation View.
2019 SOLIDWORKS API Help - Capture 3D View Example (VBA)
Thanks for the information. 3D Views do contain all the required information but it seems like SW Add-in and require MBD license. Anyway the temporary solution I am thinking is Activate and reorient the annotation view and take scale from current active model view.
Retrieving data ...