public static void Insert(IVisualBlock block, Layers.LayerInfo layer = null) { if (block == null) return; var doc = Application.DocumentManager.MdiActiveDocument; var db = doc.Database; var idBtr = GetInsertBtr(block.Name, block.File, db); BlockInsert.Insert(block.Name, layer); }
/// <summary> /// Переопределенеи блока /// </summary> public static void Redefine(IVisualBlock block) { if (block == null) return; var doc = Application.DocumentManager.MdiActiveDocument; if (doc == null) return; using (doc.LockDocument()) { Block.Redefine(block.Name, block.File, doc.Database); } }
public static void Insert([CanBeNull] IVisualBlock block, bool explode = false) { if (block == null) { return; } var doc = Application.DocumentManager.MdiActiveDocument; var db = doc.Database; GetInsertBtr(block.Name, block.File, db); BlockInsert.Insert(block.Name, _layer, explode); PluginStatisticsHelper.PluginStart(new CommandStart($"Вставка блока {block.Name}", Assembly.GetCallingAssembly())); }
/// <summary> /// Переопределенеи блока /// </summary> public static void Redefine([CanBeNull] IVisualBlock block) { if (block == null) { return; } var doc = Application.DocumentManager.MdiActiveDocument; if (doc == null) { return; } using (doc.LockDocument()) { Block.Redefine(block.Name, block.File, doc.Database); } }
private void OnInsertExecute(IVisualBlock block) { var doc = AcadHelper.Doc; using (doc.LockDocument()) { if (IsHideWindow) { HideMe(); VisualInsertBlock.Insert(block, Explode); } else { using (HideWindow()) { VisualInsertBlock.Insert(block, Explode); } } } }
private void OnInsertExecute(IVisualBlock block) { VisualInsertBlock.Insert(block); }