Copy link to clipboard
Copied
Hello All,
Is there any API to create a document in the UI? please help me...
Oh, I get you now. This is something that has been asked about before but usually about getting the preview from another program. You can get a preview of the current, open document but I don't think there's a method exposed for getting one of unopened document. Clearly, AI has that capability, but unfortunately its not in the API, at least that I've ever seen.
Copy link to clipboard
Copied
AIDocumentList::New() is the one you want!
Copy link to clipboard
Copied
AIDocumentList::New( ) function is just create the document and how it can displayed on the UI?
Like sAIPaintStyle->CreateColorEditor(dialog, kPatternnatorDialogID, colorPaletteBounds, &colorPalette);
it creates the color editor in the UI. like this how can we create the document in the UI?
Copy link to clipboard
Copied
Sorry, I'm not quite following. Are you just trying to pop the 'New Document' dialog? Because if so, there's a parameters on New() that lets you specify if it shoud show the dialog or not. If you mean something else, you'll have to explain further.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You want to embed the UI from the new dialong into your own? If you want that, you'll have to implement the widgets yourself -- AI doesn't provide any of its own dialogs as components. That said, everything in the New Document dialog is accessible through the API.
Copy link to clipboard
Copied
see the attached bmp file. this is "Open" dialog in illustrator. The "Open" dialog has a preview window. (look at arrow in the bmp).
I want this type of preview on my plugin dialog.
Preview window is possible in "Open" dialog. whatever the art is there in the .ai file, that art is displaying in the Preview window.
So, it should be possible to create a preview window in my plugin dialog, I think.
How can we do this?
Copy link to clipboard
Copied
Oh, I get you now. This is something that has been asked about before but usually about getting the preview from another program. You can get a preview of the current, open document but I don't think there's a method exposed for getting one of unopened document. Clearly, AI has that capability, but unfortunately its not in the API, at least that I've ever seen.