Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Invalid Argument exception

$
0
0

Hi,

 

Am trying to send commands to the Illustrator from C#. I can create a new document, draw some simple paths/objects, copy/paste things. But when I try to do anything with the Group/Page Items like changing their position or size I get "Invalid Argument exception".

 

There is no C# scripting reference, so I use Visual Basic one. And it worked well for simpliest things.

 

Please tell me what is wrong with this code:

 

illustrDoc.GroupItems[0].Top = 1.0;

illustrDoc.GroupItems[0].PathItems[0].Top = 1.0;

illustrDoc.Layers[0].PathItems[0].Top = 1.0;

double scale = 10.0;
illustrDoc.GroupItems[0].Resize(scale, scale, true, true, true, true, scale, Illustrator.AiTransformation.aiTransformCenter);

 

All the lines listed above (except "double scale = 10.0;", of course) generate the same exception. That is wierd.

 

All the layers/groups/items are unlocked and visible.

 

Thank you.


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>