Jump to content
  • 0

Script needs fixing


josue Corona

Question

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

  • 0

That is my script. I am glad you are using it!

 

I just copied the script from above and pasted it into a new script. I ran it with both a single object selected and with multiple objects selected. In each case it scaled the selected objects and did not give me any warning.

 

Are you trying to run it inside a group or symbol? It is only intended to work on object on a design or sheet layer.

 

What happens when you try and run this on a new file with only a few objects?

 

Can you send me a file where this happens constantly. I will be happy to try and fix the problem if I can see what the problem is.

Link to comment

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.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...