With Eyeshot 2026, the ReadFileAsync.AddTo() method has been removed and the ReadFileAsync content structure has been unified across all supported import formats. Three new methods have been introduce: OpenTo(), InsertTo(), and AppendTo(). These provide clearer and more consistent import workflows.
See the Geometry Import (link) article for detailed information about the new methods.
Migration guide
By default, the AddTo()method was replacing the RootBlock of the scene with the one from the file. In this case, you will likely want to replace it with the new OpenTo()method. This method automatically clears the scene, so calling Workspace.Clear() is no longer necessary.
If you use the AddTo() with the replaceRootBlock flag set to false instead, you will likely want to replace it with either the InsertTo() or the AppendTo() method, depending on the desired behaviour.
If you have custom import logic, you may consider replacing it with the new InsertTo() or AppendTo() methods. Please note that ReadFileAsync.Entities is now a wrapper to ReadFileAsync.Blocks[ReadFileAsync.Blocks.RootBlockName].Entities, and no longer a separate Entity[] array.
Previously, the default behaviour when merging imported collections (Layers, Blocks, etc.) was to keep the existing items. Now, a new conflictPolicy parameter has been introduced to all involved methods. To keep the previous behaviour, set this parameter to conflictPolicy.KeepExisting.
List of the breaking changes:
- Removed
ReadFileAsync.AddTomethod in favour of the newOpenTo,InsertToandAppendTomethods - Removed
ReadFileAsyncWithBlocks,ReadFileAsyncWithBlocksAndLayersandReadFileAsyncWithMaterialsclasses. The baseReadFileAsyncclass now contains all master collections. ReadFileAsycn.Blocksalways contains a root block; a default one is created if the file contains no explicit root block.- The
ReadAutodesk,ReadDWGandReadDXFclasses now import the Model_Space block in the Blocks collection, and is marked as the RootBlock. ReadFileAsync.Entitiesis now a wrapper toReadFileAsync.Blocks[ReadFileAsync.Blocks.RootBlockName].Entities, and is of type EntityList instead of Entity[].ReadFileAsync.Unitsis now a wrapper toReadFileAsync.Blocks[ReadFileAsync.Blocks.RootBlockName].Units- Added a
conflictPolicyparameter with the default value of Rename toReadFileAsync.FillAllCollectionsDataandReadFileAsyncWithDrawing.FillAllDrawingCollectionsDatamethods. - The
ReadFileAsync.FillAllCollectionsDatamethod is no longer virtual, you can override the newImportSettingsmethod if needed. - Removed the specialized Fill methods for merging master collections in favour of the new generic
FillCollection<T>method.
Comments
Please sign in to leave a comment.