PPT_LOGO_4b
‹#›
© 2008 Autodesk
Autodesk Developer Network
Example for copying a wall style
Database dbDestination = HostApplicationServices.WorkingDatabase;
 
// Source file from which we copy styles.
Database dbSource = new Database( false, true );
dbSource.ReadDwgFile( "C:/temp/Test.dwg", System.IO.FileShare.Read, true, String.Empty );
 
// Get the source dictionary 
DictionaryWallStyle styles = new DictionaryWallStyle( dbSource );
ObjectIdCollection objectIds = new ObjectIdCollection();
 
// (1) if you want to copy everything, use this.              
// objectIds = styles.Records;
 
// (2) if you want to copy a specific style, use this.              
objectIds.Add( styles.GetAt( "MyWallStyle" ) );
 
CloningHelper cloneHelper = new CloningHelper();
cloneHelper.Clone( dbSource, dbDestination, objectIds, styles.RecordType, false );
Cloning Helper