Hi, do you know of equivalent SDK call to reproduce UI action Object -> Expand appearance?
I tried to use ExpandSuite -> Expand and GetFlattenedArt from ArtStyle suite but the results are different
I've only ever used AIExpandSuite::Expand(), and I'm about 99% sure that's the equivilent to the UI menu option. That said, there are a number of flags you might have to fiddle with to get the results you're looking for.
The other possibility is that it might matter what you're trying to expand. Symbols don't use Expand or GetFlattenedArt, they use a different call (a few actually). What exactly is the difference you're seeing, maybe we can figure out what needs to be tweaked.
I am really trying to expand a symbol, but after is already "copied". Here is the code
When I used "Expand appearance" from UI I can see on my particular art that group of arts is transformed to group of groups and paths.
However when I use GetFlattenedArt (or Expand) result is just group of paths.
I am trying to use GetFlattenedArt as I can see from the debugger that this call is used when I do UI Expand appearance action, but apparaently some othercalls are probably used in the sequence, which I can't recognize
And to give you even more background I am trying to use Cropp effect and results differ if Expand apparence is used before crop and when it is not. And unfortunatelly correct "Crop" is after using Expand appearance
I hestitate to suggest this, but if you can get the behaviour you want via the UI you might consider using the AIActionSuite:PlayAction() approach. If you turn on record in the Action panel, do the operations you want to do, then hit stop, you can save the result as an action file (.aia). This is a text file that's fairly readable. From that you can probably put together a sequence of PlayAction() calls that would do the work you want done.
That said, there are limitations. It can be clumsy and cumbersome to do it this way, and using the SDK's Expand calls would be cleaner, certainly. But is a fairly good fallback plan.
As for breaking up a symbol, I've done a little of it but mostly I use AISymbolSuite::BreakLinkToSymbol(). I create an instance then break the link, thus leaving me with the original art (with an extra group or two). Beyond that, I'd only call FlattenArt if I was trying to mash any brushes or odd styles into pure paths.
Europe, Middle East and Africa