Hello all,
So I want to place annotations for the selected feature in the drawing view.
I am using InsertModelAnnotations3 method to achieve that by using swImportModelItemsFromSelectedFeature parameter to add dimension only for the selected feature.
Here is my block of code that is supposed to that:
'''Placing dimensions
swModel.ActivateView ("FRONT")
swModel.Extension.SelectByID2 "ShellExtrude@BlankShell Template@FRONT", "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0
Set swFeat = swModel.SelectionManager.GetSelectedObject6(1, -1)
Debug.Print swFeat.name
swDrawing.InsertModelAnnotations3 swImportModelItemsFromSelectedFeature, swInsertDimensionsMarkedForDrawing, False, False, False, False ''this line does nothing
''swDrawing.InsertModelAnnotations3 swImportModelItemsFromEntireModel, swInsertDimensionsMarkedForDrawing, False, False, False, False ''this line runs fine if used
So when the code stops executing, no annotations gets placed for the selected feature. It runs fine if I use swImportModelItemsFromEntireModel parameter instead.
I am wondering whats wrong with placing dimension using selected feature parameter.
Please help out!
