Skip navigation
lukychan
Currently Being Moderated

Object -> Expand appearance in SDK

Jul 15, 2009 3:37 AM

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

 

    

        Luky

 
Replies
  • Currently Being Moderated
    Jul 15, 2009 7:28 AM   in reply to lukychan

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 15, 2009 7:53 AM   in reply to lukychan

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points