Stores the list of bitmaps in a Rhino document.

Properties

ComponentType

#Since v6.0
public override ModelComponentType ComponentType { get; }

Count

Returns the count of all items, including deleted ones.
public virtual int Count { get; }
inherited fromCommonComponentTable<T>

Document

Document that owns this table.
public RhinoDoc Document { get; }
inherited fromRhinoDocCommonTable<T>

Indexers

this[]

#
Conceptually, the bitmap table is an array of bitmaps. The operator[] can be used to get individual bitmaps.
public BitmapEntry this[
index
zero based array index.
] { get; }
Reference to the bitmap. If index is out of range, then null is returned. Note that this reference may become invalid after AddBitmap() is called.

Methods

AddBitmap

#Since v5.0
Adds a new bitmap with specified name to the bitmap table.
public int AddBitmap(
bitmapFilename,
If NULL or empty, then a unique name of the form "Bitmap 01" will be automatically created.
replaceExisting
If true and the there is already a bitmap using the specified name, then that bitmap is replaced. If false and there is already a bitmap using the specified name, then -1 is returned.
)
index of new bitmap in table on success. -1 on error.

Clear

Marks all items as deleted.
public void Clear()
inherited fromCommonComponentTable<T>

Delete

#Since v6.0
Removes the bitmap from the table.
public override bool Delete(
item
The item to remove. Null will always return false.
)
True if the item could be deleted; otherwise, false.

DeleteBitmap

#Since v5.0
Deletes a bitmap.
public bool DeleteBitmap(
bitmapFilename
The bitmap file name.
)
true if successful. false if the bitmap cannot be deleted because it is the current bitmap or because it bitmap contains active geometry.

ExportToFile

#Since v5.0
Writes a bitmap to a file.
public bool ExportToFile(
index,
The index of the bitmap to be written.
path
The full path, including file name and extension, name of the file to write.
)
true if successful.

ExportToFiles

#Since v5.0
Exports all the bitmaps in the table to files.
public int ExportToFiles(
directoryPath,
full path to the directory where the bitmaps should be saved. If NULL, a dialog is used to interactively get the directory name.
overwrite
0 = no, 1 = yes, 2 = ask.
)
Number of bitmaps written.

Find

#Since v5.1
This function first attempts to find the file with "name" on the disk. If it does find it, "fileName" is set to the full path of the file and the BitmapEntry returned will be null, even if there was a BitmapEntry with "name" in the bitmap table. If the function cannot find the file on the disk, it searches the bitmap table. If it finds it, the returned BitmapEntry entry will be the entry in the table with that name. Additionally, if "createFile" is true, and an entry is found, the file will be written to the disk and it's full path will be contained in "fileName".
public BitmapEntry Find(
name,
Name of the file to search for including file extension.
createFile,
If this is true, and the file is not found on the disk but is found in the BitmapTable, then the BitmapEntry will get saved to the Rhino bitmap file cache and fileName will contain the full path to the cached file.
out string
fileName
The full path to the current location of this file or an empty string if the file was not found and/or not extracted successfully.
)
Returns null if "name" was found on the disk. If name was not found on the disk, returns the BitmapEntry with the specified name if it is found in the bitmap table and null if it was not found in the bitmap table.

FindId

Uses the guid to find a model component. Deleted objects cannot be found by id. The guid is the value that is stored in the .Id property. In a single document, no two active objects have the same guid. If an object is replaced with a new object, then the guid persists. For example, if the _Move command moves an object, then the moved object inherits its guid from the starting object. If the Copy command copies an object, then the copy gets a new guid. This guid persists through file saving/opening operations. This function will not find grip objects.
public virtual T FindId(
id
ID of model component to search for.
)
inherited fromCommonComponentTable<T>
Reference to the rhino object with the objectId or null if no such object could be found.
FindId

FindIndex

#Since v6.0
Retrieves a BitmapEntry object based on Index. This search type of search is discouraged. We are moving towards using only IDs for all tables.
public BitmapEntry FindIndex(
index
The index to search for.
)
A BitmapEntry object, or null if none was found.

GetEnumerator

Returns the enumerator that yields all items.
public virtual IEnumerator<T> GetEnumerator()
inherited fromCommonComponentTable<T>