Need a cookbook for creating a compound Path

Hello together,
has anyone a short sample for creating a compund path with to pathes inside?
This doesn't work:
iErr = sAIArt->NewArt( kCompoundPathArt, kPlaceInsideOnBottom, firstLayerArtHnd, &newArtHnd);    
iErr = sAIPath->SetPathClosed( newArtHnd, isClosed);
//Adding segments
// Adding one child
iErr = sAIArt->NewArt( kPathArt, kPlaceInsideOnBottom, newArtHnd, &childArtHnd);
//Adding segments to the child
iErr = sAIPath->SetPathClosed( childArtHnd, isClosed);
Should I first create a group? But how to change this group to an kCompoundPathArt Element?
best reagrds
Michael

In the time I tried some variations and ended with this:
// creating compound Object
iErr = sAIArt->NewArt( kCompoundPathArt, kPlaceInsideOnBottom, firstLayerArtHnd, &newArtHnd);
// inserting "Masterobject" (path wich surrounds the children)
iErr = sAIArt->NewArt( kPathArt, kPlaceInsideOnBottom, newArtHnd, &childArtHnd);
// creating and inserting children
iErr = sAIArt->NewArt( kPathArt, kPlaceInsideOnBottom, newArtHnd, &childArtHnd);
iErr = sAIArt->NewArt( kPathArt, kPlaceInsideOnBottom, newArtHnd, &childArtHnd);
iErr = sAIArt->NewArt( kPathArt, kPlaceInsideOnBottom, newArtHnd, &childArtHnd);
at least the result looks like what it should. It's a pitty that there ist no sample how to do it the right way from adobe. Or have I overseen it in "SnippetRunner" in the CS4 SDK. Would be a good place. I will add a request for the CS-Next Thread taht we need codesnippets for every function of the API (like it was in one of the very first SDKs of Freehand. They had a big word dokument which provided such stuff for every function).

Similar Messages

  • [AI CS4 Mac] How to create a Compound Path?

    Hi Folks,
    I'm trying to create a compound path in AI CS4 for Mac, but I have not been successful. One would think this would be easy, so maybe I'm missing the obvious solution...
    What is best way to create a compound path using the SDK? I just need to make a compound path out of two non-overlapping rectangles so that I can create a clipping mask. Nothing tricky.
    The SDK is not clear about the best way to go about creating a compound path, but I figured that programmitically selecting the two rectanlges and then using the built in "adobe_makeCompound" action would work, but it doesn't.
    err = sAIActionManager->PlayActionEvent("adobe_makeCompound", kDialogNone, NULL);
    When the above code is called while I'm debugging, I get a dialog box that reads: The object "Make Compound Path" is not currently available.
    If I click the "Stop" button while debugging, the value of err is 1346458189 which is 'PARM'. So, maybe I need to set a parameter? The crazy thing is that there appears to be no parameters needed for the "adobe_makeCompound" action event. When I created the action manually, the resulting .aia file (see its contents below) has a parameterCount == 0. I've tried passing a parameter block without adding any parameters to it (instead of NULL), but still no joy.
    /version 2
    /name [ 5
              5365742031
    /isOpen 1
    /actionCount 1
    /action-1 {
              /name [ 12
                        436f6d706f756e6450617468
              /keyIndex 0
              /colorIndex 0
              /isOpen 0
              /eventCount 1
              /event-1 {
                        /internalName (adobe_makeCompound)
                        /localizedName [ 18
                                  4d616b6520436f6d706f756e642050617468
                        /isOpen 0
                        /isOn 1
                        /hasDialog 0
                        /parameterCount 0
    Any help or suggestions on how to create a compound path would be greatly appreciated!
    Thanks in advance!
    -- Jim

    Actually, here's a more useful variation
    // rectangle1 & rectangle2 are the AIArtHandles for your existing paths
    AIArtHandle compound = 0;
    sArt->NewArt(kCompoundPathArt, kPlaceAbove, rectangle1, &compound);
    sArt->sReorderArt(rectangle1, kPlaceInsideOnTop, compound);
    sArt->sReorderArt(rectangle2, kPlaceInsideOnTop, compound);
    // this will create the compound right next to wherever rectangle1 is, much simpler and more likely what you want

  • Needed a code for Creating a Log File in java so that its size is limited

    Hi
    I need the code for developing a log file using threads so that the log file size is limited
    and if the size of the log file is increasing above 1Mb,another log file has to be created automatically and the log have to be printed into that new file.
    Thanks in advance

    package cms.web.log;
    import java.io.*;
    import java.util.Calendar;
    import cms.web.WebUser;
    *     Log is generated by JEditor 1.0.0
    *     @Project      : cms
    *     @Version      : 1.0.0
    *     @Created date : 11:07:40  PM Thursday, 25/07/2002
    *     @Author       :
    *     @Organization :
    *     @Copyright    : (c) 2002
    *     An utility class used to write information, especially error messages, to
    *     log file so that they can be viewed at later time by administrators.
    *     Extra information such as date & time they occures & where they are thrown...
    *     are automatically included and append to the end of log file.
    *     Log files will increase with the format "name_n" where n is file counter
    public class Log implements Serializable
          *     logs marker
         static final String START= "\n\0";
          *     parent directory that contains log files
         private static File parent;
         private PrintStream out;
         private String name;
          *     to count how many log for the current stream
         int counter;
          *     maximum number of logs for each log file
         int max;
         public static void init(File parent)
              if (!parent.exists())
                   parent.mkdirs();
              Log.parent= parent;
         public Log(String name, int max)
              this.name= name;
              this.max= max;
              file= getLastFile();
              counter= countLogs(file);
              out= openStream(file);
         public synchronized void appendLog(String log)
              if (log == null || log.length() == 0)
                   return;
              count();
              try {
                   out.println(START+ counter+ " | "+ getCurrentTime()+ " | "+ log);
                   out.flush();
              } catch (Exception e) {}
          *     Append the given log to log file.
         synchronized void appendLog(String msg, WebUser user)
              if (msg == null || msg.length() == 0)
                   return;
              count();
              try {
                   out.println(START+ counter+ "----------------------------------------------------------");
                   out.println(getCurrentTime());
                   out.println(user != null? "User:"+ user.getFullName(): "User: public user");
                   out.println(msg);
                   out.println("\n----------------------------- end -----------------------------\n");
                   out.flush();
              } catch (Exception e) {}
          *     Append the given exception to log file
         synchronized void appendLog(Throwable error, WebUser user)
              if (error == null)
                   return;
              count();
              synchronized (out)
                   try {
                        out.println(START+ counter+ "----------------------------------------------------------");
                        out.println("Exception occured at "+ getCurrentTime());
                        out.println(user != null? "User: "+ user.getFullName(): "User: public user");
                        error.printStackTrace(out);
                        out.println("----------------------------- end -----------------------------\n");
                        out.flush();
                   } catch (Exception e) {}
         private String getCurrentTime()
              Calendar c= Calendar.getInstance();
              return
                   parse(c.get(Calendar.HOUR_OF_DAY))+ ":"+               // 0 --> 23
                   parse(c.get(Calendar.MINUTE))+ ":"+                     // 0 --> 59
                   parse(c.get(Calendar.SECOND))+ " "+                     // 0 --> 59
                   parse(c.get(Calendar.DAY_OF_MONTH))+ "/"+                 // 1 --> 31
                   parse(c.get(Calendar.MONTH)+ 1)+ "/"+                     // 1 --> 12
                   c.get(Calendar.YEAR);                                        // yyyy
         private String parse(int n)
              return n< 10? "0"+ n: ""+ n;
         private void count()
              counter++;
              if (counter> max)
                   incrementFile();
                   counter= 1;
         private void incrementFile()
              File file= null;
              int n= 0;
              while ((file= new File(parent, name+ n+ ".log")).exists())
                   n++;
              if (out != null)
                   out.close();
              out= openStream(file);
         private PrintStream openStream(File file)
              try {
                   if (file.exists())
                        return new PrintStream(new FileOutputStream(file.getPath(), true));
                   else
                        return new PrintStream(new FileOutputStream(file.getPath()));
              } catch (IOException e) {
                   throw new RuntimeException(e.getMessage());
         private int countLogs(File file)
              int count= 0;
              InputStream in= null;
              try {
                   in= new FileInputStream(file);
                   int n;
                   while ((n= in.read()) != -1)
                        if (n == '\0')
                             count++;
              } catch (IOException e) {
              } finally {
                   if (in != null)
                        try {
                             in.close();
                        } catch (IOException e) {}
              return count;
         private File getLastFile()
              File file= new File(parent, name+ "0.log");
              File curr;
              int n= 1;
              while ((curr= new File(parent, name+ n+ ".log")).exists())
                   file= curr;
                   n++;
              return file;
         protected void finalized()
              if (out != null)
                   out.close();

  • Undo Pathfinder - 'Unite (Alt-click to create a Compound Path and Add to Shape Area)

    Hey,
    I am new to Illustrator and I am trying to 'release' a compound path, back into the original objects. (A body shape, including the torso, arms and legs). I can't seem to get it to work. There is no option in the Pathfinder tab as a lot of sources say, and I cannot go to Object>Paths>Release as no option exists at all. I am using CS5.
    If you need more information please ask. Can anyone help?
    Fleur

    Here you go. See the white version, I want the body to go back to being like that. To get to the selected shape I clicked the 'Unite...bla bla' button and it combined them all.
    (By the way, I am following a tutorial - they do not really specify the steps very clearly...obviously).

  • I need the code for creating popup windows and code for open and close

    I can write the code for creating popup window , i am getting problem while trying to open and closing that popup windows.
    Can anybody help me in that pls ?
    Regards
    Sreeni.

    Hi
    For pop up window
    IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PopWin");
    IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
    window.setWindowPosition (300, 150);
    window.show();
    wdContext.currentYourNodeElement().setPopupAttribute(window);
    For closing window code
    IWDWindow window = wdContext.currentYourNodeElement().getPopupAttribute();
    window.hide();
    window.destroyInstance();
    For more infornation refer this link
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20d2def3-f0ec-2a10-6b80-877a71eccb68&overridelayout=true
    This link is very useful for you.
    Regards
    Ruturaj
    Edited by: Ruturaj Inamdar on Aug 13, 2009 9:10 AM

  • Need a Demo for creating a report painter

    Hi,
    I am new to report painter. i have already gone through some documents but i dint get a clear idea.
    Can anyone give a demo for creating a Report Painter?
    Thanks in advance.
    Regards.

    hi
    you can refer to following links
    http://help.sap.com/saphelp_47x200/helpdata/en/eb/1377e443c411d1896f0000e8322d00/frameset.htm
    For Report Painter
    http://help.sap.com/saphelp_47x200/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/content.htm
    For Report Writer
    http://help.sap.com/saphelp_47x200/helpdata/en/66/bc7dc143c211d182b30000e829fbfe/content.htm
    Refer the following links :
    http://www.virtuosollc.com/PDF/Get_Reporter.pdf
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-other/accessing-tables-using-report-painterwriter-98766
    http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_bw31/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm
    this may help you
    regards

  • Need Best Practice for creating BE in ZFS boot environment with zones

    Good Afternoon -
    I have a Sparc system with ZFS Root File System and Zones. I need to create a BE for whenever we do patching or upgrades to the O/S. I have run into issues when testing booting off of the newBE where the zones did not show up. I tried to go back to the original BE by running the luactivate on it and received errors. I did a fresh install of the O/S from cdrom on a ZFS filesystem. Next ran the following commands to create the zones, and then create the BE, then activate it and boot off of it. Please tell me if there are any steps left out or if the sequence was incorrect.
    # zfs create –o canmount=noauto rpool/ROOT/S10be/zones
    # zfs mount rpool/ROOT/S10be/zones
    # zfs create –o canmount=noauto rpool/ROOT/s10be/zones/z1
    # zfs create –o canmount=noauto rpool/ROOT/s10be/zones/z2
    # zfs mount rpool/ROOT/s10be/zones/z1
    # zfs mount rpool/ROOT/s10be/zones/z2
    # chmod 700 /zones/z1
    # chmod 700 /zones/z2
    # zonecfg –z z1
    Myzone: No such zone configured
    Use ‘create’ to begin configuring a new zone
    Zonecfg:myzone> create
    Zonecfg:myzone> set zonepath=/zones/z1
    Zonecfg:myzone> verify
    Zonecfg:myzone> commit
    Zonecfg:myzone>exit
    # zonecfg –z z2
    Myzone: No such zone configured
    Use ‘create’ to begin configuring a new zone
    Zonecfg:myzone> create
    Zonecfg:myzone> set zonepath=/zones/z2
    Zonecfg:myzone> verify
    Zonecfg:myzone> commit
    Zonecfg:myzone>exit
    # zoneadm –z z1 install
    # zoneadm –z z2 install
    # zlogin –C –e 9. z1
    # zlogin –C –e 9. z2
    Output from zoneadm list -v:
    # zoneadm list -v
    ID NAME STATUS PATH BRAND IP
    0 global running / native shared
    2 z1 running /zones/z1 native shared
    4 z2 running /zones/z2 native shared
    Now for the BE create:
    # lucreate –n newBE
    # zfs list
    rpool/ROOT/newBE 349K 56.7G 5.48G /.alt.tmp.b-vEe.mnt <--showed this same type mount for all f/s
    # zfs inherit -r mountpoint rpool/ROOT/newBE
    # zfs set mountpoint=/ rpool/ROOT/newBE
    # zfs inherit -r mountpoint rpool/ROOT/newBE/var
    # zfs set mountpoint=/var rpool/ROOT/newBE/var
    # zfs inherit -r mountpoint rpool/ROOT/newBE/zones
    # zfs set mountpoint=/zones rpool/ROOT/newBE/zones
    and did it for the zones too.
    When ran the luactivate newBE - it came up with errors, so again changed the mountpoints. Then rebooted.
    Once it came up ran the luactivate newBE again and it completed successfully. Ran the lustatus and got:
    # lustatus
    Boot Environment Is Active Active Can Copy
    Name Complete Now On Reboot Delete Status
    s10s_u8wos_08a yes yes no no -
    newBE yes no yes no -
    Ran init 0
    ok boot -L
    picked item two which was newBE
    then boot.
    Came up - but df showed no zones, zfs list showed no zones and when cd into /zones nothing there.
    Please help!
    thanks julie

    The issue here is that lucreate add's an entry to the vfstab in newBE for the zfs filesystems of the zones. You need to lumount newBE /mnt then edit /mnt/etc/vfstab and remove the entries for any zfs filesystems. Then if you luumount it you can continue. It's my understanding that this has been reported to Sun, and, the fix is in the next release of Solaris.

  • I need a procedure for creating a new user in SAP NW(BPC)

    Hi,
    I am doing Migration project from SAP BPC MS to NW.
    I don't know how to create a new user in NW.
    Could you please provide a document to create or add a new user in NW.
    Thanks and Regards
    Krishna

    Hi Krishna,
    If user authentication method is AD, all AD users can be added into BPC for the required access, The task 'Define Security' covers who can add users, create or modify task and member profiles.
    The guide is a good place to start understanding it.
    If you already have a list of users and would want to mass manage the users into your new system, you could also use the program: ZUJE_MASS_USER_MGMT (to import users, teams, profiles into the target system).
    Note: Users and Teams are not included in the transport. So you need to manage them outside either by using the program that I mentioned above or add them individually using admin client.
    Thanks,
    Sreeni

  • I need an app for creating simple signs like Windows Publisher allows. Suggestions?

    I have a MacBook Pro and purchased the Windows for Mac Office Suite software which includes Excel, Word, Outlook and Powerpoint. However, I now really need something similar to Publisher in order to create simple fliers and other items. I have Pages and thought that it would work for me, but I find that pictures I insert into a Pages doc are difficult to place or maneuver within the document. Any suggestions for a different app that would be easier to use?

    Word will actually 'work' for simple flyers - maybe even simple newsletters and the like. Do a Google search for some Word templates that you may be able to use.
    I have Pages but I don't use it - Word is powerful enough to do what you need, though, I would think.
    Clinton

  • Need screen-shot  for create mm01 using BAPI(Through lsmw or ecording)

    hi,
    could u give screen-shot of the lsmw using bapi.for material master data create using t.code (mm01')
    i will be waiting for eply.
    regards
    eswar.

    Check this link dude.....
    http://www.****************/Tutorials/LSMW/LSMWMainPage.htm
    It has all different types of LSMW with the screen shots.... keep doin
    Regards,
    Pavan

  • I need some help , for create some paper on air

    Hi everyone
    I need some help , i work in a static sequence from Tehran street (1 frame), i paint damages on this frame in Photoshop because i need war atmosphere, then i add some smoke and cloud with particular .
    but i think this sequence is not realistic yet
    now i want add some moving paper in air and on street
    do u have any solution for how can i make this paper and moving those
    Thanks a lot
    and pardon me for bad English
    Ali Molavi

    The best tool to add this kind of particle is After Effects.
    If you have the Creative Cloud then I recommend you download that.
    Slightly annoying voice over, but here is a youtube tutorial you can follow top make floating particals. You can adjust it to make it look exactly as you want.
    http://www.youtube.com/watch?v=dq2op6yqvFk&noredirect=1

  • Cookbook for creating Self Signed Certificates using certutil

    Hi,
    I am trying to create a self signed certifcate for internal use. Can anyone point to a step by step procedure? The few that I have found on the web don't seem to work.
    Thanks
    david

    Check out the examples at the bottom of this page:
    http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html

  • Need a logic for creating SQL query

    Hi Experts,
    Could you please help me to get the follwing desired output . thanks
    Actual Data:
    ABC01-02
    XYZ02-03
    PQR78-79
    LMN1-5
    Expected/Desired Output:
    ABC01
    ABC02
    XYZ02
    XYZ03
    PQR78
    PQR79
    LMN1
    LMN5
    Please let me know if you need any further information. Thanks in Advance.
    Regards
    Raghav

    Hi!
    In case you would like to get all entries:
    WITH
        mylist AS (SELECT 'ABC01-02' AS val FROM dual UNION ALL
                   SELECT 'XYZ02-03' AS val FROM dual UNION ALL
                   SELECT 'PQR78-79' AS val FROM dual UNION ALL
                   SELECT 'LMN1-5' AS val FROM dual
        details AS (SELECT regexp_substr(val, '\D+') AS s,
                           to_number(regexp_substr(val, '\d+', 1, 1)) AS xfrom,
                           to_number(regexp_substr(val, '\d+', 1, 2)) AS xto,
                           lpad('0', length(regexp_substr(val, '\d+', 1, 2)), '0') as xpattern
                      FROM mylist
        lines AS (SELECT ROWNUM AS yrow FROM dual CONNECT BY ROWNUM < 100
    SELECT s || trim(to_char(yrow, xpattern)) AS xresult
      FROM details JOIN lines ON (xfrom <= yrow AND xto >= yrow)
    ORDER BY xresult;Result:
    ABC01
    ABC02
    LMN1
    LMN2
    LMN3
    LMN4
    LMN5
    PQR78
    PQR79
    XYZ02
    XYZ03Best regards,
    Matt
    Edited by: Matt Schulz on 27.02.2013 14:41
    Edited by: Matt Schulz on 27.02.2013 14:43

  • Hello Creative Cloud Illustrator Community. Help Please! This is with regard to compound paths and transparencies. I have set some type on a circle and then created outlines. I then placed the outlined type on a black stroked ring which I then selected "o

    Hello Creative Cloud Illustrator Community:
    Help Please!
    This is with regard to creating a compound path:
    I have set some white type on a circle and then created outlines. I then placed the outlined type on a black stroked ring which I then selected "outlined stroke." I then put both "outlined" graphical elements on a separate solid bkg. (all 3 are on the same layer). Lastly, I then selected the top two elements and went to "make" a "compound path" (because I want the type to be the "holes" so I can see through to the background). However, the only effect I get is the white outlined type turning black (the same color as the black ring). What am i doing wrong? I can achieve the desired result with simple boxes but it won't work with a circular type path, a stroked ring and a solid bkg.
    Any help on this would be greatly appreciated!
    Thank You!

    Thanks for the response Jacob.
    Unfortunately, I tried your suggestion with no success. BTW, minus front is now Subtract. Apparently, by clicking option>subtract, it works in the same way as minus front. I tried this to no avail.
    Let me reiterate please.
    I have 3 graphic elements-all on the same layer:
    1. Background: Gold circle with a fill and no stroke.
    2. Middle: Black ring (Stroked) inside gold background circle.
    3. Top: White copy set on a circular type path and placed directly on top of middle black ring.
    Both the middle black ring and top type path HAVE BEEN CONVERTED TO OUTLINES.
    LASTLY, I select the Middle and Top, go to Compound Paths and choose "Make" and my white copy turns to black. Wrong!
    WHAT I WANT TO HAPPEN: I want the white copy to become HOLES, so the GOLD background shows through.
    Any solutions would be very much appreciated!

  • How to create multiple gradients in a compound path?

    Hi, I am trying to color a compound path with multiple colors? Kinda similar to the effect here
    I tried using the blend tool and replace the spline but it does not give the desired effect.
    Any tips as to how to approach this?
    I have made the G by creating a compound path.
    Thank you!

    namk,
    You may:
    1) Create a simple stroke/nofill path, with a stroke at least as wide as the semicircular end parts, which follows and fully covers the G shape of the compound path;
    2) Ctrl/Cmd+X+B to bring it to the back, then give it the desired gradient along the stroke/path;
    3) Select all and Object>Clipping Mask>Make.
    If you wish to get the stroke back on top, you may:
    4) Click the compund path with the Direct Selection Tool and reapply its stroke with the original weight.

Maybe you are looking for