I have a program to get All Annotations's text in draw.
This is sample(Skip part of source)
swModel = (ModelDoc2)swApp.OpenDoc6(DrawPath, (int)swDocumentTypes_e.swDocDRAWING, (int)swOpenDocOptions_e.swOpenDocOptions_Silent, "", ref errors, ref warnings);
swDrawing = (DrawingDoc)swModel;
swView = swDrawing.GetFirstView();
while (swView != null)
swAnn = swView.GetFirstAnnotation3();
int AnnoCnt = swView.GetAnnotationCount();
while (swAnn != null)
swDispData = swAnn.GetDisplayData();
displayText = displayText + swDispData.GetTextAtIndex(a);
swAnn = swAnn.GetNext3();
swView = swView.GetNextView();
And this is My problem
Green Area : Can get Annotations.
Red Area : Block areas, I want to get text from note in this area.
White Box : just for security.
How can i get that notes.
Sorry can't explain detail in English.
But if you know about this or you need more information, comment to me.
It was can by using SketchManager and SketchBlockDefinition Class.
SketchManager swSketch = swModel.SketchManager;
var blocks = swSketch.GetSketchBlockDefinitions();
for (int z = 0; z < blocks.Length; z++)
SketchBlockDefinition block = blocks[z];
var swNotes = block.GetNotes();
for (int x = 0; x < swNotes.Length; x++)
But, the note which got from block have weird position. So I still have a problem.
Retrieving data ...