Checking closed path

Hi Guys,
I am new to scripting, I am able to check the closed paths but I am struck in some problem.
Whenever I delete some segments from closed path and rejoin leaving a particular segment outside a newly made closed path, my script fails to recognize the opened path. have attached the screen shots.
In the second image after deleting the segment i am not able to recognize the path which is out segment that closed path.
Here is my code:
var thePathed = app.activeDocument;
for (var a = 0; a < thePathed.pathItems.length; a++)
    app.activeDocument = thePathed;
    var aPath = thePathed.pathItems[a];
    for (var b = 0; b < aPath.subPathItems.length; b++)
            if (aPath.subPathItems[b].closed == false)
                alert("Error in Path Name: "+ aPath.name)
alert ("Path checking Finished")
Any suggestions on this is appreciable.
Thank you in advance.....
Regards,
Annesh MRD

I think I see what is wrong. You edited the path in a way that made it a complex path not seperate paths.
Try this
var thePathed = app.activeDocument;
for (var a = 0; a < thePathed.pathItems.length; a++)
    app.activeDocument = thePathed;
    var aPath = thePathed.pathItems[a];
    for (var b = 0; b < aPath.subPathItems.length; b++)
            if ( aPath.subPathItems[b].operation ==  ShapeOperation.SHAPEXOR || aPath.subPathItems[b].closed == false )
                alert("Error in Path Name: "+ aPath.name)
alert ("Path checking Finished")

Similar Messages

  • Cutting Closed Paths

    Looking for reasons why I cant cut a closed path. The shape is slightly complex its the top of a palm tree. Maybe about 20 anchor points and is definitely closed.
    I get the message thats says to used the scissors on a segment but not an endpoint. Ive tried clickingo n the line clicking on endpoints clicking on anchors and just get the same message.
    The reason I am trying to cut this shape is because the gradient mesh tool does crazy thing when I try to apply it.
    Any help is appreciatted.
    A

    Definitely not locked I can select and edit the shape. I believe the path is closed because I filled it with color and dont see any open areas. Is there a way to check this?
    That shape doesnt have a gradient mesh applied to it at this point, but will later after I can get the palm fronds into pieces.
    I created a new document and made a square shape and proceeded to cut it with the scissors. It worked fine. So Im sure there must be something about this palm tree shape.
    Thanks for the suggestions!
    A

  • Blends: Difference between open and closed paths modifying spine

    Okay, just had a discovery today about the blend tool.
    The difference between closed paths and open paths is critical when you want to modify a blend spine, such as make it curve. Between open paths, there is no spine shown when a blend is created. Ever notice this? Between closed paths, there is a spine, which can be modified, such as making it curved. Now, the trick is how to modify a spine with open paths when there is no spine shown. Found out today that starting with a closed path, segments can be deleted to make the path open, then the spine can be modified and the open path state maintained!
    This is a huge bug in Illustrator and makes no sense to me. Wanting Adobe to fix this in the next major release. Hope this helps anyone struggling with this issue.

    One thing you should be aware of concerning open ended splines:
    It makes an enormous difference as to how the blend behaves whether the endpoints have handles or not.
    Give them handles and you will find that you can alter the distribution of the blend objects just by adjusting the handles or by dragging on the spline itself.
    Give it a try.

  • Joining open and closed paths

    Hi
    Is it possible to join an open path (created with the Pen Tool) to a close path (also created with the Pen Tool)?
    Grechy01

    I want to create a complex piece of artwork by using line art created with the Pen Tool and color it by filling in the paths with the Live Paint Bucket. Anyway, I should be able achieve this with not much extra work by using overlapping closed paths, Average function (under Object --> Path) to align the point where the two closed paths cross, Pathfinder Merge function and multiple layers to remove the segments of the path that I don’t want and the Live Paint Bucket to color the artwork. If you can think of an easer way to do this please let me know.

  • How to determine a point(or a path)  inside a closed path?

    I came across such a problem:
          My client requires add a number marks inside a closed path ,and such a closed path is irregular,
    My question is, how to ensure a point(or a path) is inside another closed path,and how to calculate this point?
    Is there any suite in the SDK to accomplish this function?

    haha ,I found a good way to solve this problem,We can use AIPathfinderSuite::DoFrontMinusBackEffect  to determine  whether a path  inside another closed path.

  • Is it possible to join an open path with a closed path?

    I am using Illustrator to show territorial changes to Germany after World War I.
    My problem is this: I need to join an open path to a closed path.
    With the pencil tool I drew a blue line to illustrate the Rhine river on an SVG map of Weimar Germany.
    I need to connect the river (open path) to Germany's borders (closed path) so that a new closed path is formed: the Rhineland (Weimar Germany west
    of the Rhine).
    I am totally stumped as to how to achieve this. Thank you very much for any help anyone can provide.
    - Nicholas

    Two ways you can make it a Live Paint Group then you actually d not hvve to join it in order to get it to react like a closed path.
    The other way is to the select the portion of the closed path with either the direct select tool or lasso tool and hit Command  C the hit Comand F paste in front and in the same position. then select the end points on one end of both path and hit Command J then do the same for the other ends of the path and now you have a new closed path and the old closed path under it still intact.
    I think the live paint group though will open up a much more powerful workflow for you if you do this type of work often.

  • The Aperture Library could not be created at "/Volumes/Data/Aperture Library.aplibrary". Check the path and try again.

    Hi,
    I cannot reopen library. During opening aperture I can see a list of libraries. After selection "Aperture library.aplibrary" (default I guess) msg box is open
    "Library info directory path contains a file where a folder was expected.
    The Aperture Library could not be created at “/Volumes/Data/Aperture Library.aplibrary”. Check the path and try again."
    Moreover, aperture library is not visible in other apps like Final Cut X Pro. I assume this is  caused by the aperture problem.
    Can anybody help me?

    Sounds strange.
    Did you try to double click your "Aperture Library.aplibrary"?
    Maybe trying to open backuped library...
    Or creating a new library by pressing the alt key when clicking on the Aperture Dock icon.

  • Combining closed paths in Illustrator CS3

    Dunno how simple this one is, but I have two closed paths of the same colour that overlap to appear as one object when printed. I'm trying to combine these two paths into one object so that if I apply a stroke weight to it, it outlines the whole object, instead of individually. Is there a simple way of doing this or do I have to add points manually?
    Keep in mind I'm not asking about a compound path.

    You use the pathfinder selecting both objects and clicking on the first icon at the top left if you wish you can keep this alive or you can expand it. In either case you can now apply a stroke to the new shape.
    Ore you can select both and then click on the live paint bucket and turn it into a live paint group and choose the option to paint both fills and strokes. and paint away.

  • Combine and Join Two Closed Paths With A Straight Path

    Hi,
    I have two closed path and I need to combine or join them with a straight path. When I selected all and right click to join, it did not join. Please refer to my screen shot. Thank you.

    You can't create Y-junctions.
    You can do one of two possbilities:
    Just place the open path wherever you need and leave it there.
    convert all of the shapes with Object > Path > outline stroke and then use the pathfinder functions.

  • Creating closed paths after using Live Trace.

    Hi, I am rather new in this, so forgive me if my question doesn't make any sense at all;
    When I trace raster images, Adobe Illustrator (CS3) gives me lots of anchor points along the outlines of the image. That's great for use with Live Paint & Live Color.
    Is there also a way to automaticly create closed paths/objects from this?
    Some kind of tool that seperates one color from another by closing those same paths.
    Basicly in a way where I can select one of the many colors within my traced picture, such as the green of a leaf, and have an actual closed path going around that same leaf. ..And then the sky would be a seperated object, and the pink flowers, and the yellow inside the flowers, and so on.
    Thanks, Linda

    If I understand your question correctly, you could probably accomplish it this way:
    1. Ungroup the trace.
    2. Select the "leaf" shape. If it consists of many shades of green, you'll have to use the Direct Selection tool, or perhaps the Lasso, or the Group Selection tool.
    3. Copy. This will stay in your clipboard, so don't copy anything else until
    4. Pathfinder>Add on the selected leaf shapes. Hold down Option to expand while adding.
    5. Now you have a solid shape that you can add a stroke to. If you make the stoke wide, or align it to the outside, it'll show around the leaf
    6. Paste in Front (Cmd-F). This will paste the original leaf shapes you copied, right on top of the solid shape you just made.

  • Cannot open file /data_work/shuttle/ab.dat . Please check its path and per

    Hi Experts,
          We are extracting data from R3 and we have an  problem with this error message
    Cannot open file </data_work/shuttle/ab.dat>. Please check its path and permissions.This problem occurs everyday but with different jobs. One day the job runs fine and sometimes fails with this message. All permissions to the file are fine its so intermittent with these jobs that we unable to source the problem. Also after the problem occurs when you re run the job it runs fine.
    Its also hard to re create the issue. BUt happens pretty much  every day during our production schedule
    Does the job server fails to read it??
    We are using DS 12.2.0.
    Hopefully I've explained it properly
    Appreciate your thoughts on this

    How are you tranfering the file? Shared directory? What about trying with the FTP server method?
    (You need an FTP server on your SAP machine.., IIS for Windows, ftpd for Unix)
    This way the FTP protocol would take care of the transport to your DS machine.
    An advantage is that with the FTP method you can put retries into the DSConfig.txt file.
    1571986 - Error: Data Services FTP transfer for ABAP integration is giving error "Data flow <data flow name> FTP could not transfer file" while running an ABAP - Data Services
    Section: Key:
    AL_Engine FTPNumberOfRetry
    AL_Engine FTPRetryInterval
    Norbert

  • Siebel Spell Check : Lexicon Path not found

    I am using Spell Check for one of the long field and the spell check is working fine on my local. When I moved the changes to server, I am getting "Spell Checker: Lexicon Path not found(SBL-SPC-00109)" error on clicking on Spell Check button. Could anyone tell me what is the reason for this error and how it can be rectified?
    Thanks,
    Shankar Sarkar

    Ibfacts,
    thanks for your reply. First let me ask this Q, I got this catalog file and repository from PRD people and I just placed them accordingly in my local macine. Configured NSconfig file and Insanceconfig.xml file. Are there any other configurations needed to work as expected? Please let me know
    Thanks
    newbie

  • Varying the stroke colour used in a section of a closed path.

    Hi
    I'm using Illustrator CS6.
    I'm working with closed paths on an illustrated character. I have a leg overlapping a body for example. The leg is essentially a 4 sided shape but I only want a stroke on 3 sides. On the 4th side I don't want a stroke on it so that the leg blends with the body. I first thought about using the shape builder tool to merge the 2  shapes to see what that would look like but they won't merge for some reason. Can't see why from the help.
    Then I tried to use the width tool to drop the stroke on the 4th side down to a 0 width for the side I want ... but that didn't work either.
    Can anyone tell me how I can change a closed shape so that a section of the shape has a different stroke colour (i.e. none!) from the rest of the shape? All ideas gratefully received.
    Arisaig67

    Hi Everyone
    Thanks for the tips to date. I'm going to mull some over, some I've already tried. Note to self - it would have been helpful if I had posted a rough example to illustrate from the outset. So here's one now and a summary of where I'm at. This is a crude example showing my scenario. Jacob's right in that I want the leg on top of the body with the strokes showing.
    To have a closed curve, I understand that I have to close the top of the leg off (red line here)? (I'm still quite new to illustrator but have used other packages before). I ideally want to keep the leg separate as I find that easier for using draw inside and using the feathering effect for creating shade and light. However I don't want the top line to actually appear. Since I don't know how to close but not have the top line, I have in earlier examples been clipping and joining the curves where it connects with the body as per earlier suggestions. In this case, with the "jutting out" part of the leg above the body line now essentially a line, rather than a shape. However that's disadvantageous for light and shade as I can't then use the draw inside so accurately for shading on the leg if it becomes one with the body (draw inside compensates a little for my hamfistedness with the tablet!).
    I may be banging up against a limitation in illustrator but rather than flounder in my ignorance, I decided it was better to find out once and for all from the collective genius and experience of the illustrator community! My developing sketching skills may alse be limiting the avenues I am trying to explore, so thanks to date for the differetn suggestions that have already expanded my perspective!
    When I get home tonight I'll try the suggestions I haven't tried yet and report back.
    As for shape builder - I don't know why it's not working. I'm following the same steps as when it does work for me! draw inside is the same - some times it works, sometimes it doesn't and I haven't differentiated why yet. I know draw inside needs just one shape selected but sometimes even that doesn't work. I need to interrogate my stuff more closely. it's a crazy, parrellel learning point ride with illustrator but loving every minute of it!
    thanks again!

  • The selected objects cannot be joined as they are invalid objects,( Compound paths, closed paths, Text Objects, Graphs, Live Paint group). You can use Join command to connect two or more paths, paths in groups; ot to close an open path.

    Hi I was trying to join two Ractangle Tool objects but getting this type of Error in illustrator cs6 :-
    The selected objects cannot be joined as they are invalid objects,( Compound paths, closed paths, Text Objects, Graphs, Live Paint group).
    You can use Join command to connect two or more paths, paths in groups; ot to close an open path.
    Please assist me asap.

    Yes, I know this is an old post, but I’m trying to clean them up. Did you solve this problem, if so what was the solution?
    This sound like a firewall issue. I would start by disabling the firewall and seeing if you can connect. If this works then you know where the problem is,
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Connecting interior lines to an outside closed path?

    I am tracing a building and have outlined the outside as a closed path.  Then I drew some interior lines tracing some of the lines of the building (distinctive roof lines).  I want to join these paths so I can use pathfinder to separate all the sections into separate shapes for coloring - I am going for large color shapes rather than detail.  Is there any way to join an endpoint of a path to the middle of a closed path, or do I need to cut the closed path to create endpoints in order to join them?

    or do I need to cut the closed path to create endpoints in order to join them?
    Exactly! The only persistent T-connections in AI are in gradient meshes. Anyway, no need to spend hours cutting. If all you are intested in are the areas, simply use the Live Paint tool and expand it afterwards to create fills...
    Mylenium

Maybe you are looking for