Jump to content
  • 0
josue Corona

Script needs fixing

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);

Share this post


Link to post

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.

Share this post


Link to post
  • 0

oh. I just did it on a single object . it works. but when I did it I was not inside a group or symbol. but I was rotating a group object.

Share this post


Link to post
  • 0

sorry I meant to say scale thats what I am doing . Is there a was to stop warning from group objects . it works just that it says that warning . 

Share this post


Link to post
  • 0

OK. I see the issue. I will try and take a look this weekend.

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×