I have a script file in which I create layouyts based on the number of the layouts and the coordinates of 2 points.
LAYOUT C layout1 layout2 LAYOUT S layout2 MSPACE -PAN 250,00 0,0 PSPACE
LAYOUT C layout2 layout3 LAYOUT S layout3 MSPACE -PAN 250,00 0,0 PSPACE
LAYOUT C layout3 layout4 LAYOUT S layout4 MSPACE -PAN 250,00 0,0 PSPACE
LAYOUT C layout4 layout5 LAYOUT S layout5 MSPACE -PAN 250,00 0,0 PSPACE
But it's gets boring to modify the script for every file. Sometimes I need only 15 layouts, sometimes I need 200 layouts, sometimes the points are not same etc.
So, using .NET, I created a method which takes the number of layouts needed to be created and the x, y of the those two points. I created the text of the script using C# and after that I run the script using
acedPostCommand. And it's works like a charm.
BUT if I want more than 10 layouts, the program is not working anymore because after a little of debugging I found out that the script runs beginning with the line 10.
LAYOUT C layout10 layout11 LAYOUT S layout11 MSPACE -PAN 250,00 0,0 PSPACE
In this situation, without having the previous layouts before layout 10, it's stupid to run the script. I don't understand WHY the script begins running with the line 10 when I run it with
acedPostCommand.
I thought that the way I created the script was wrong, but I saved in a scr file the string of the script before sending it to
acedPostCommand and it's look alright. I run the script in Autocad using the
scr command and it does what it's suppose to do.
SO, the problem is that I can understand why the script runs with the line 10 and not with the line 1. This happens only with b]acedPostCommand[/b] and only I have more than 10 layouts.
I modify the code in all ways possible to be sure I don't a glitch, but I found nothing. It's look alright.
Any suggestions?