I am currently trying to use classes AcDbRasterImageDef and AcDbRasterImage and i followed the Examplecode on ObjectARX 2008 Sample ISM: Link: ism example.zip
After some fixes i finally got some tiny results: I finally got through the newImageAttach() function and could see an entity in the Image list. But something went wrong, because i couldn't see that image in my drw. neither in the Raster Design Image-dropdownlist. Take a look at my screenshot:
On its status it's "Nicht referenziert", which means "not referenced" and if i try to embed this image, ACAD will close with an Exception. Second problem is, that i couldn't manipulate this image because the line:
ErrorStatus = acdbOpenObject((AcDbObject*&) pAcDbRasterImage, parEntityId, AcDb::kForWrite);
returns an ErrorStatus::eNullObjectId which means, that objId is AcDbObjectId::kNull.
Could you guys take a look on my code and tell me what i am doing wrong here?
you can take a look at: http://piratepad.net/5HxFq8GBkG
Thanks a lot!
Yours sincerely
Philip
Solved! Go to Solution.
Solved by Alexander.Rivilis. Go to Solution.
if (ErrorStatus != Acad::eOk) { // Failed to create Definition. ads_printf(_T("Error: Failed to create Definition.\n")); return ErrorStatus;
}
What about to add braces in your's code? Otherwise, the function returns even if no error.
P.S.: There are a few such places in the code.
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Thx for that advice. I guess i'm a bit lazy, and used to program without (normally programming in Python).
I will try it 🙂