Exemple #1
0
        /// <summary>
        /// 生成标注
        /// </summary>
        public AnnotationBuildResult GenerateMultipleTagSymbol(Document document, IEnumerable <ElementId> selectedIds, MultiPipeTagLocation location)
        {
            Document   = document;
            Collection = PipeAnnotationContext.GetCollection(Document);
            PipeAnnotationEntity entity = new PipeAnnotationEntity();

            entity.LocationType = location;
            View view = Document.ActiveView;
            AnnotationBuildResult result = GenerateMultipleTagSymbol(selectedIds, entity, view);

            if (result == AnnotationBuildResult.Success)
            {
                Collection.Add(entity);
                Collection.Save(Document);
            }
            return(result);
        }
Exemple #2
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="doc"></param>
 public void Save(Document doc)
 {
     PipeAnnotationContext.SaveCollection(doc);
 }