Table of Contents

Class vdBlocks

Namespace
VectorDraw.Professional.vdCollections
Assembly
VectorDraw.Professional.dll

Represents a collection of vdBlock objects and provides methods and helpers
to manage layer tables for a document.
Blocks are used to define a set of entities that can be inserted by vdInsert object, in the document as a single entity.
Each block has a name and contains a list of entities.

public sealed class vdBlocks : vdBaseObject, IDisposable, IVDSerialise, IEnumerable, IBaseObject
Inheritance
vdBlocks
Implements
Inherited Members

Examples

see vdBlock for an example of how to use vdBlocks collection.

Constructors

vdBlocks()

Initializes the vdBlocks collection.

Properties

Count

Get the item's count of the collection.

this[int]

Get a vdBlock object from the collection at a specified index.

ItemType

Returns the Type of Items in the collection

Last

Returns the last item in the collection.

VDDIM_DEFAULT

Get the Default(arrow) vdBlock object used for dimensions.

VDDIM_NONE

Get the Default(empty).

Methods

Add(object)

Adds an object to the end of the collection.

Add(string)

Creates and adds a vdBlock object to the collection with the specified name.

AddFromDocument(string, vdDocument, bool)

Creates a vdBlock object taking all model entities from a vdDocument.

AddFromDocument(string, vdDocument, MergeTablesFlags)

Creates a vdBlock in this collection using all model entities from a source vdDocument.

AddFromFile(string, bool)

Creates a vdBlock from the specified file and adds it to this collection.

AddFromFile(string, string, MergeTablesFlags)

Creates a vdBlock object from a file.

AddFromFile(string, MergeTablesFlags)

Creates a vdBlock object from a file.

AddFromStream(string, MemoryStream)

Creates a block from a stream.

AddFromStream(string, MemoryStream, bool)

Creates a block from an in-memory stream containing a serialized document and returns the resulting block.

AddFromStreamEx(string, MemoryStream, bool, MergeTablesFlags)

Creates a block from an in-memory stream containing a serialized VectorDraw document and imports it into the current document according to the specified merge flags.

AddFromStreamEx(string, MemoryStream, string, MergeTablesFlags)

Creates a vdBlock by loading a VectorDraw document from an in-memory stream and importing its model into the current document using the specified merge behavior.

AddItem(object)

Adds an item to the collection.

AddItem(vdBlock)

Adds an object to the collection.

AddItem(vdBlock, bool)

Adds an object to the collection.

AddResolveProperty(object, string, string)

Adds the parameters to the resolve list of the collection.

ChangeOrder(vdBlock, bool)

Changes the position of a vdBlock object to the front or the end of the collection.

ClearIndexDictionary()

Clears the Index of the Dictionary. Internally used to speed up Swap method.

DeSerialize(DeSerializer, string, object)

This Function is called foreach field name of the vdBlocks object when opening in vdml format.

Dispose()

Releases all resources used by this object.

EnsureDefaults()

Creates and initializes the VDDIM_DEFAULT,VDDIM_NONE default vdBlock objects.

FindItem(object)

Searches the collection for a specified object.

FindItem(vdBlock)

Checks if an object exists in the collection.

FindName(string)

Finds a vdBlock object with the specified name in the collection.

GetEnumerator()

Implements the "foreach" expression for the collection.

GetNotDeletedItems()

Get all non deleted objects of the collection.

GetNotDeletedItemsAndVisibleOnForms()

Get all non deleted objects of the collection.

GetObjectRealPosition(object)

Find the index where a specified object is located in the list.

InitDefaults(vdDocument)

Creates and initializes the VDDIM_DEFAULT,VDDIM_NONE default vdBlock objects and also Sets the specified Document for the collection..

InsertAt(int, object)

Insert an object at a specified index.

InsertAt(int, vdBlock)

Insert a vdBlock object to a specified index of the collection.

InsertCopyOf(vdBlock)

Adds a clone of the obj in the collection if it is not exist.

InternalSetOwner(vdBaseObject)

Internally used only.

Set the object owner

IsDefault(vdPrimary)

Checks if the parameter passed is the standard VDDIM_DEFAULT vdBlock object.

MakeIndexDictionary()

Creates an Index of the Dictionary. Internally used to speed up Swap method.

Purge()

Sets as Deleted all vdBlock objects that are not being used in the Collection's Document.

RemoveAll()

Removes all objects from the collection.

RemoveAt(int)

Removes a vdBlock object from the specified index of the collection.

RemoveItem(object)

Removes the specified item from the collection.

RemoveItem(vdBlock)

Removes a specific vdBlock object from the collection.

ResolveProperties()

Resolves all the properties added with the AddResolveProperty(object, string, string) function.

Serialize(Serializer)

This Function is called when saving the vdBlocks object to vdml format.

ToString()

Gets a System.String that represents the count of the vdBlocks collection Object.

getUniqueTableName(string)

Creates a unique string for use as name to a vdBlock object.

swap(vdBlock, vdBlock)

Swaps the position between two different vdBlock objects existing in the collection.