> To PDF. Since illustrator ignores my AIPDFFormatAction args for
> everything except save as, I'm forced to save - specifically, I save
> the user's document, then I save as (that's my export), close, then
> reopen the original document. This is not the ideal user experience,
> because there's a bunch of flashing as documents open and close, and
> sadly, the user loses his undo history.
Hmmmm. We used to have functionality to export to a modified PDF format that worked by invoking that action. It's literally been years since we had it though so I can't swear that we required the user to have saved the document first, but I don't remember it needing that. I'll see if I can dig up the code after this post, maybe there's a clue in there...assuming I can find the code (we didn't have source control back in '99!).
> Applescript's my next stop, but at the risk of sounding whiny, why
> on earth do functions like PlayAction and WriteDocument[WithOptions]
> have "suppress gui" arguments if they just go ahead and ignore them?
You're confusing the SDK with the Action system here, at least partially. PlayAction() is the SDK's way of invoking a recorded macro; and that means you're allowed to say what you'd prefer, but you're not in charge -- there's a plugin on the other end of the macro, responding to whatever you fired. It's up to that plugin whether or not it respects the 'suppress gui' flag. That's not the SDK's fault, that's the fault of whoever wrote that plugin; though they may have a good reason (or not) for ignoring the directive.
I haven't had call to use WriteDocument() so I can't speak to that. If you can't avoid the GUI on that, I'd suggest posting to them as a feature request; it doesn't sound unreasonable.
> Nothing's perfect, but in the world of page layout SDKs both the
> archaic XPress and overly wordy InDesign seem to have way fewer
> holes, hide fewer nasty surprises and are a lot clearer to boot.
I've never worked with XPress, but I found InDesign to be far, far less clear & harder to manipulate than the AIs SDK. I tried to bootstrap a simple plug-in for InDesign 1.5 and nearly pulled my hair out getting it to do anything. I had a plugin up & running in AI in half an hour and had it manipulating the art with ease. Different strokes I guess?
>> No, but you can create a menu in any existing menu, so this hardly
>> seems like a problem to me.
>
> It's a very minor gripe, probably a design choice.
It is, and it's one that may change in a future version of Illustrator. We were actually just discussing this with Adobe a couple of months back. They explicitly don't want to clutter the top-level menu space with extra menus, but they're going to re-examine the position for CS5.
>> - can't resize document
>
> Again, the SDK is not designed or intended to automate user actions.
> You can do this with the scripting capabilities however.
Hopefully this won't bring the wrath of Adobe down on my head, but this is possible in CS4. I can't elaborate, but it's super easy.
> When I figure out how to programmatically store and add actions that
> I've pre-recorded I'll probably do just that.
That's an interesting approach, but I've always found it far easier to invoke the functionality directly. Especially if you're looking to not see a GUI. Invoking a series of macros to perform a task could get daunting, depending on how complex the over-arching operation you're trying to perform is.
> I seem to have touched a raw nerve - I'm just venting my
> frustration. Don't get me wrong, I love illustrator the program - I
> could play with text on a path for hours, but illustrator the SDK
> has yet to win my loyalty. I'd love to proven wrong.
A great deal of it depends on where you're spending your time in the SDK. Manipulating artwork is stupidly easy in Illustrator; I have a whole C++ wrapper object library that makes altering artwork trivial, and it was easy to build.
There are plenty of gotchas, but as I think we all know, every SDK has some time bombs lying in wait 🙂 And there are definitely areas of the SDK that could use beefing up. PDF export is actually one I'm trying to have a conversation with Adobe about, but we're having email trouble at the moment. For some reason my mail between here & there gets dropped randomly, and it's impossible to tell the difference between when I'm being ignored & when the email has fallen in the bit bucket :P
... View more