![]() |
【转帖】image dictionary
image dictionary
image dictionary i'm having issues with new entries to the image table conflicting with entries of previously deleted image entities. is there a way to either: a. remove entries from the image dictionary or b. remove the image dictionary all together thanks slight clarification i should clarify that i'm looking for a safe way to do this, using oddbdictionaryptr::remove() appears to remove the entry, but causes errors in the resulting files. perhaps i'm just doing this incorrectly: //entity obtained from modelspace earlier... oddbrasterimagedefptr imgdef = oddbrasterimageptr(pent)->imagedefid().safeopenobject(); rasterdictid = imgdef->imagedictionary(pdb); //empty out image dictionary oddbdictionaryptr pimagedict = rasterdictid.safeopenobject(oddb::kforwrite); oddbdictionaryiteratorptr piter = pimagedict->newiterator(); for (; !piter->done(); piter->next()){ pimagedict->remove(piter->name()); } i should probably note that i'm not closing the database between deleting images and adding new ones. (i'm going to go try that right now) quote: originally posted by cbond i should clarify that i'm looking for a safe way to do this, using oddbdictionaryptr::remove() appears to remove the entry, but causes errors in the resulting files. perhaps i'm just doing this incorrectly: //entity obtained from modelspace earlier... oddbrasterimagedefptr imgdef = oddbrasterimageptr(pent)->imagedefid().safeopenobject(); rasterdictid = imgdef->imagedictionary(pdb); //empty out image dictionary oddbdictionaryptr pimagedict = rasterdictid.safeopenobject(oddb::kforwrite); oddbdictionaryiteratorptr piter = pimagedict->newiterator(); for (; !piter->done(); piter->next()){ pimagedict->remove(piter->name()); } i should probably note that i'm not closing the database between deleting images and adding new ones. (i'm going to go try that right now) nope, that didn't do it... orphened dictionary ids it seems that when i delete images from the database, orphened entries are left in the image dictionary. when i try to insert images of the same name, it seems to remove the orphened dictionary entry, and then attach the associated image with a different dictionary entry (replacing whatever was there previously). i have tried the following things: - renaming the image i'm trying to insert -- this allows me to add my image, but the orphened dictionary image causes errors when attempting to open the resulting file. - attaching the new image to the old tag -- this also results in a file with errors in the dictionary. - not adding the entity of the same name to the database -- dictionary errors - deleting the entry from the image dictionary (as in the previous entry here) -- also creates errors in the dictionary. i have also tried to "delete" by attempting to add and empty image to the dictionary (using the name of the existing entity)... this also results in errors in the dictionary. i'm starting to run out of ideas for work arounds.... am i approaching this the wrong way? |
所有的时间均为北京时间。 现在的时间是 06:06 AM. |