how to get document name and document color model details
hi all,
filename: refresh.mm
(IBAction)refreshSelectedTab:(NSButton *)sender {
{
callRefresh();
}
@9295854(NSException *err)
{
NSLog(@"Err:%@",err.description);
}
}
the above code i used to refresh the panel after clicking it on refresh button.
the panel i have created using objective-c
so i called callRefresh(); from objective-c to c++
file name:plugin.cpp
void callRefresh()
{
RetrieveDocumentDetails();
}
in the above code i have called RetrieveDocumentDetails(); to retrieve the document name and document colormodel details
file name:plugin.cpp
ASErr RetrieveDocumentDetails() {
AIDocumentHandle cDocument;
sAIDocument->GetDocument(&cDocument);
ai::UnicodeString documentName("");
sAIDocument->GetDocumentFileName(documentName);
std::string documentFileName = documentName.as_UTF8();
ai::int16 documentColorModel=0;
sAIDocument->GetDocumentColorModel(&documentColorModel);
}
in the above code i have used to retrieve the document name and color model details..
while retrieving document name and color models details in the function RetrieveDocumentDetails(); that is function called from objective-c to c++ , the details are not getting retrieved .
if i call the function RetrieveDocumentDetails(); without calling it from objective-c , the details will get retrieve..
if call the function RetrieveDocumentDetails(); using objective-c the details are not get retrieving .
please anyone kindly help me to solve this problem...
Thank you
