| Article | 70002831 |
| Type | Wish |
| Product | Engine |
| Date Added | 1/27/2026 12:00:00 AM |
| Fixed | 12.0.01 (1/28/2026 12:00:00 AM) |
| Submitted by | VectorDraw Team |
Summary
vdBlocks.AddFromDocument and vdDocument.MergeTables to rename inserted tables and keep existing with same Name
Solution
In version 12.0.01 a new enum vdDocument.MergeTablesFlags was added
Controls how the tables with same name are imported into to another document
It can be one of the foloowing values
KeepExisting : If imported table already exist with same name, keep the existing
Redefine : If imported table already exist with same name, replace the existing with imported
CreateNew : If imported table already exist with same name, create a new with a unique name and add it to the imported document
Following methods was added that support vdDocument.MergeTablesFlags
vdDocument.MergeTables(vdDocument document, bool mergeLayouts, MergeTablesFlags mergeflags)
vdBlocks.AddFromFile(string FileName, MergeTablesFlags mergeflags)
vdBlocks.AddFromDocument(string BlockName, vdDocument document, MergeTablesFlags mergeflags)
vdBlocks.AddFromStreamEx(string BlockName, System.IO.MemoryStream stream, bool iscompressed, vdObjects.vdDocument.MergeTablesFlags mergeflags)
Also following methods was changed to use vdDocument.MergeTablesFlags.CreateNew
vdBlock.Bind
vdCommandAction.CmdXref ("B" ..) when binding an external reference of a document
vdCommandAction.CmdClipPaste
vdCommandAction.CmdInsert insert block dialog changed to support vdDocument.MergeTablesFlags values when an external file is selected to be added as a block to the document
When calling AddFromDocument of vdBlocks and the passed BlockName exists in the source document a vdDocument GenericError is raised to info you that the source document block will be renamed during the import process to avoid the conflict
