Share

Database.RestoreForwardingXrefSymbols Method

Description

This function must be used with RestoreOriginalXrefSymbols(), and should be wrapped around all code with plans to edit and/or save Xref databases.

RestoreForwardingXrefSymbols() literally redoes all the changes back to a proper Xref resolve status. Thus, if the original symbols are restored, and then changes are made to the symbols before RestoreForwardingXrefSymbols(), those changes will be overwritten. However, newly added symbols will be properly resolved during RestoreForwardingXrefSymbols(), and then will be included in the undo/redo of future calls to these two methods. (The only work-around to wanting to change the symbols themselves is to go ahead and make the changes, save them to disk, and then let RestoreForwardingXrefSymbols() overwrite the changes. When all is done, reload the Xref from disk.)

The symbols affected are the Table and Records for blocks, layers, linetypes, text styles, dimension styles, registered applications, and plot styles, as well as any custom object changes made during and between the XrefBeginAttached and XrefBeginOtherAttached events.

In order to properly resolve the Xref, RestoreForwardingXrefSymbols() needs write access to the symbol tables and symbol table records in the host drawing. Therefore, applications should close any open symbol tables or symbol table records before calling RestoreForwardingXrefSymbols().

Visual Basic

Public Function RestoreForwardingXrefSymbols() As void

C#

public void RestoreForwardingXrefSymbols();

Links

Database Class, Autodesk.AutoCAD.DatabaseServices Namespace

Was this information helpful?