Stores the list of bitmaps in a Rhino document.

Properties

ComponentType

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

Count

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

Document

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

Indexers

this[]

#
public BitmapEntry this[int index] { get; }
Conceptually, the bitmap table is an array of bitmaps. The operator[] can be used to get individual bitmaps.
index (int)zero based array index.
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
public int AddBitmap(string bitmapFilename, bool replaceExisting)
Adds a new bitmap with specified name to the bitmap table.
bitmapFilename (string)If NULL or empty, then a unique name of the form "Bitmap 01" will be automatically created.
replaceExisting (bool)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

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

Delete

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

DeleteBitmap

#Since v5.0
public bool DeleteBitmap(string bitmapFilename)
Deletes a bitmap.
bitmapFilename (string)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
public bool ExportToFile(int index, string path)
Writes a bitmap to a file.
index (int)The index of the bitmap to be written.
path (string)The full path, including file name and extension, name of the file to write.
true if successful.

ExportToFiles

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

Find

#Since v5.1
public BitmapEntry Find(string name, bool createFile, out string fileName)
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".
name (string)Name of the file to search for including file extension.
createFile (bool)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.
fileName (out string)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

public virtual T FindId(Guid id)
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.
inherited fromCommonComponentTable<T>
id (Guid)ID of model component to search for.
Reference to the rhino object with the objectId or null if no such object could be found.
FindId

FindIndex

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

GetEnumerator

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