I got a scale object Script it works . but what happens is that whenever I execute the script at the end of the command it will tell me that I have not selected any object, but it does scale the object that I have selected .
Procedure ScaleEachObject;
{Scales each selected object in the active layer around the obejct center}
{? 2007, Coviana, Inc - Pat Stanford pat@coviana.com}
{Licensed unde the GNU Lesser General Public License}
Var H1,H2:Handle;
N1,N2:Integer;
A1:Dynarray[ ] of handle;
R1:Real;
Begin
N1:=Count(Sel);
If N1>0 then
Begin
Allocate A1[1..N1];
N2:=1;
While N2<=N1 do
Begin
A1[N2]:=FSActLayer;
SetDSelect(FSActLayer);
N2:=N2+1;
End;
R1:=RealDialog('Enter the amount to scale each object by','2.0');
N2:=1;
While N2<=N1 do
Begin
SetSelect(A1[N2]);
Scale(R1,R1);
DSelectAll;
N2:=N2+1;
End;
End
else AlrtDialog('At least one object must be selected');
End;
Run(ScaleEachObject);
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
josue Corona
I got a scale object Script it works . but what happens is that whenever I execute the script at the end of the command it will tell me that I have not selected any object, but it does scale the object that I have selected .
Procedure ScaleEachObject;
{Scales each selected object in the active layer around the obejct center}
{? 2007, Coviana, Inc - Pat Stanford pat@coviana.com}
{Licensed unde the GNU Lesser General Public License}
Var H1,H2:Handle;
N1,N2:Integer;
A1:Dynarray[ ] of handle;
R1:Real;
Begin
N1:=Count(Sel);
If N1>0 then
Begin
Allocate A1[1..N1];
N2:=1;
While N2<=N1 do
Begin
A1[N2]:=FSActLayer;
SetDSelect(FSActLayer);
N2:=N2+1;
End;
R1:=RealDialog('Enter the amount to scale each object by','2.0');
N2:=1;
While N2<=N1 do
Begin
SetSelect(A1[N2]);
Scale(R1,R1);
DSelectAll;
N2:=N2+1;
End;
End
else AlrtDialog('At least one object must be selected');
End;
Run(ScaleEachObject);
Link to comment
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.