public static IEnumerable<ViewTableRecord> GetViewTableRecords(this ViewTable symbolTbl, OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None) { return symbolTbl.GetSymbolTableRecords<ViewTableRecord>(symbolTbl.Database.TransactionManager.TopTransaction, mode, filter, false); }
/// <summary> /// Gets all text style table records. /// </summary> /// <param name="symbolTbl">The symbol table.</param> /// <param name="mode">The mode.</param> /// <param name="filter">The filter.</param> /// <returns></returns> public static IEnumerable<TextStyleTableRecord> GetAllTextStyleTableRecords(this TextStyleTable symbolTbl, OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None) { return symbolTbl.GetSymbolTableRecords<TextStyleTableRecord>( symbolTbl.Database.TransactionManager.TopTransaction, mode, filter, true); }
/// <summary> /// Gets the shape file table records. /// </summary> /// <param name="symbolTbl">The symbol table.</param> /// <param name="trx">The TRX.</param> /// <param name="mode">The mode.</param> /// <param name="filter">The filter.</param> /// <returns></returns> public static IEnumerable<TextStyleTableRecord> GetShapeFileTableRecords(this TextStyleTable symbolTbl, Transaction trx, OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None) { return symbolTbl.GetSymbolTableRecords<TextStyleTableRecord>(trx, mode, filter, true) .Where(txt => txt.IsShapeFile); }
///<overloads> /// <summmary> /// You can not edit a dependent block(a block that is inside from xref) from the referenced drawing. /// The default is not to include dependent blocks since typically you will work on blocks that are contained /// inside the drawing, and it saves time by not opening the DbObject and comparing /// BlockTableRecord.ObjectId.OriginalDatabase.UnmanagedObject to the BlockTable.Database.UnmanagedObject property. /// </summmary> /// </overloads> /// <summary> /// Gets the block table records. /// </summary> /// <param name="symbolTbl">The symbol table.</param> /// <param name="trx">The TRX.</param> /// <param name="mode">The mode.</param> /// <param name="filter"><see cref="SymbolTableRecordFilter"/>.</param> /// <returns>IEnumerable{BlockTableRecord}</returns> public static IEnumerable<BlockTableRecord> GetBlockTableRecords(this BlockTable symbolTbl, Transaction trx, OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None) { if (filter.IsSet(SymbolTableRecordFilter.IncludeDependent)) { return symbolTbl.GetSymbolTableRecords<BlockTableRecord>(trx, mode, filter, true); } return symbolTbl.GetSymbolTableRecords<BlockTableRecord>(trx, mode, filter, true).NonDependent(); }
public static IEnumerable<ViewTableRecord> GetViewTableRecords(this ViewTable symbolTbl, Transaction trx, OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None) { return symbolTbl.GetSymbolTableRecords<ViewTableRecord>(trx, mode, filter, false); }
/// <summary> /// Gets the dim style table records. /// </summary> /// <param name="symbolTbl">The symbol table.</param> /// <param name="trx">The TRX.</param> /// <param name="mode">The mode.</param> /// <param name="filter">The filter.</param> /// <returns></returns> public static IEnumerable<DimStyleTableRecord> GetDimStyleTableRecords(this DimStyleTable symbolTbl, Transaction trx, OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None) { return symbolTbl.GetSymbolTableRecords<DimStyleTableRecord>(trx, mode, filter, true); }
/// <summary> /// Gets the block table records. /// </summary> /// <param name="symbolTbl">The symbol table.</param> /// <param name="mode">OpenMode</param> /// <param name="filter"><see cref="SymbolTableRecordFilter"/>.</param> /// <returns>IEnumerable{BlockTableRecord}</returns> /// <example> /// <code source=".\Content\Samples\Samplescsharp\AcDbMgdExtensions\DatabaseServices\BlockTableExtensionsCommands.cs" language="cs" region="GetBlockTableRecords" /> /// <code source=".\Content\Samples\Samplesvb\AcDbMgdExtensions\DatabaseServices\BlockTableExtensionsCommands.vb" language="VB" region="GetBlockTableRecords" /> /// </example> public static IEnumerable<BlockTableRecord> GetBlockTableRecords(this BlockTable symbolTbl, OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None) { return symbolTbl.GetBlockTableRecords(symbolTbl.Database.TransactionManager.TopTransaction, mode, filter); }
/// <summary> /// Determines whether the specified test flag is set. /// </summary> /// <param name="filter">The filter.</param> /// <param name="testFlag">The test flag.</param> /// <returns></returns> /// <exception cref="System.ArgumentNullException">testFlag</exception> public static bool IsSet(this SymbolTableRecordFilter filter, SymbolTableRecordFilter testFlag) { if (testFlag == 0) { throw new ArgumentNullException("testFlag"); } return (filter & testFlag) == testFlag; }