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

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.


 

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.

×
×
  • Create New...