![]() |
【转帖】oddblayertablerecordptr color index exception
oddblayertablerecordptr color index exception
oddblayertablerecordptr color index exception hi i'm having problems setting the color index of a layer. the code below throws an "invalid input" exception with an input of 0 for the colorindex. what am i doing wrong here? i have a feeling i have to set the color model, but can't see from the api docs how this is done. thanks peter. ///////////////////////////////////////////////////// // add a new layer to the drawing oddblayertableptr ptrlayers; oddblayertablerecordptr ptrlayer; /ptrlayers = ptrdb->getlayertableid().safeopenobject(oddb::kforwrite) ; ptrlayer = oddblayertablerecord::createobject(); // name must be set before a table object is added to a table. ptrlayer->setname(strlayername); ptrlayer->setcolorindex(0); // <-- throws "invalid input" exception. // add the object to the table. return ptrlayers->add(ptrlayer); /////////////////////////////////////////////// color index 0 means byblock. layer's color can't be set to byblock or bylayer. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 07:33 PM. |