Jump to content
Developer Wiki and Function Reference Links ×

ForEachObject Loop Failures


Recommended Posts

Hey all,

I just can't seem to get this right. The script is ment to take the group of selected objects and move them a specific class and specific layer, as specified in the CONSTs.

I keep getting an Expected ; and Expected a Run but for the life of me I can't find them.

-------------

Procedure SelectandMove;

CONST

classstr = 'Venue - Walls - Primary Wall';

layerstr = '_Stage Level';

VAR

objecthnd, layerhnd : Handle;

sucess : Boolean;

lname : String;

PROCEDURE SetCandL(objecthnd :HANDLE);

{Procedure to set the class of selected object to classstr and layer to layerstr}

BEGIN

SetClass(objecthnd,classstr);

layerhnd := GetLayerByName(layerstr);

sucess := SetParent(objecthnd,layerhnd);

END;

BEGIN

ForEachObject(SetCandL,(SEL=TRUE));

End;

RUN (SelectandMove)

-------------

Any help much appreciated.

J

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
Reply to this topic...

×   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...