jwells
2012-12-04, 02:35 AM
I'm working on a add-in to edit and insert annotation symbols. I can edit and delete annotation symbols easily enough, but I can't figure out how to insert a new one! I know the name of the family, and it has only one type. There's the NewAnnotationSymbol method, but I can't seem to get the annotationsymboltype from the name. I think I may have gotten around this by filtering the database for an element, and then working my way back up to the symbol. So I have three questions: 1) Is that the only way to get the annotation symbol type? 2) is the following line correct?
new_key=doc.Document.Create.NewAnnotationSymbol(point, ann_type, doc.ActiveView);
/* where the following were previously defined
Element new_key;
XYZ point;
AnnotationSymbolType ann_type */
and 3) Just before this line, I'm prompting for a point (doc.Selection.Pickpoint). I assume I have to close my form first. I'm doing something wrong there, because I tried to call the close() method but the form is still visible and it locks up everything.
Thank you for reading this, and I apologize if it seems incoherent. If I've left out a lot of necessary information, please let me know.
new_key=doc.Document.Create.NewAnnotationSymbol(point, ann_type, doc.ActiveView);
/* where the following were previously defined
Element new_key;
XYZ point;
AnnotationSymbolType ann_type */
and 3) Just before this line, I'm prompting for a point (doc.Selection.Pickpoint). I assume I have to close my form first. I'm doing something wrong there, because I tried to call the close() method but the form is still visible and it locks up everything.
Thank you for reading this, and I apologize if it seems incoherent. If I've left out a lot of necessary information, please let me know.