Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

VBS CS5: compund paths unite

New Here ,
Mar 04, 2011 Mar 04, 2011

Hello,

I am having a problem. I want to draw several shapes and unite them as one shape through VBS, so there would be no borders inside them. The best thing I have manage to do is to ad paths via compoundPahtItems, but the problem is it only combine them together, it doesn't actually unite them.

could you help me out? and maybe post me a short example of such VBScript

thank you in advance!

TOPICS
Scripting
966
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Mar 04, 2011 Mar 04, 2011

You may have to use the doScript construct to run an Action that you have created to use the Pathfinder menu and Add to Shape. I'm on a Mac so don't have a lot of experience with VB scripts but I believe you can use the doScript to do what you want.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 05, 2011 Mar 05, 2011

pathFinder commands are not available to scripting, as Larry said you have to record and action that unites your paths first, then call it from your vbs.

in this sample I named the action "pathFinderUnite", it is located in the "Set 2" actions folder. In your script, once you have selected all the paths you need to unite, call the action like this

iapp.DoScript "pathFinderUnite","Set 2" 

iapp is my Illustrator variable

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 09, 2011 Mar 09, 2011

I have managed to unite them as I wanted, thank you very much!

I have one more question - how do I reference that new shape?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2011 Mar 09, 2011
LATEST

after uniting the paths, the resulting path is still selected, so you could use

myNewUnitedPath = iapp.ActiveDocument.Selection(0)


edit:

200 post!!! hurray!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 06, 2011 Mar 06, 2011

Thank you both Larry and Carlos,

I shall try that and let you know how it worked for me!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 09, 2011 Mar 09, 2011

I have managed to unite them as I wanted, thank you very much!

I have one more question - how do I reference that new shape?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines