Christiaan Posted September 29, 2006 Share Posted September 29, 2006 I've got a drawing whereby I want to copy and paste objects from another file and then move a fixed distance (X=-14069.7mm and Y=-10970.8mm to be precise). Presumably I can make a script that does this but I don't know where to start. Quote Link to comment
islandmon Posted September 29, 2006 Share Posted September 29, 2006 You could SelectAll; then create a Group; then set the Handle to the FSActLayer; then { Move(moveDX,moveDY: REAL):} Move(-14069.7,-10970); Quote Link to comment
Christiaan Posted October 2, 2006 Author Share Posted October 2, 2006 Thanks islandmon. I just need to move the object (because I'll select it manually) but just using the last two lines to create a script didn't work. Presumably I'm doing something basic wrong. P.S. I'm printing out the manual for bed time reading as we speak. Quote Link to comment
islandmon Posted October 2, 2006 Share Posted October 2, 2006 Try this: PROCEDURE MoveXY; VAR h: HANDLE; DX,DY : REAL; BEGIN SelectAll; h := FSActLayer; MoveObjs(10',10',FALSE,TRUE); END; RUN(MoveXY); Quote Link to comment
Christiaan Posted October 2, 2006 Author Share Posted October 2, 2006 Thanks again. How do I stop it from selecting and moving everything and instead only move the object I have selected? Quote Link to comment
islandmon Posted October 2, 2006 Share Posted October 2, 2006 It's a boolean: {use this} PROCEDURE MoveXY; VAR h: HANDLE; DX,DY : REAL; BEGIN h := LSActLayer; Group; h:= LNewObj; MoveObjs(10',10',FALSE,FALSE); END; RUN(MoveXY); Quote Link to comment
ccroft Posted October 3, 2006 Share Posted October 3, 2006 Hi Guys If you want a script that moves only selected objects on the active layer, all you really need is: MoveObjs(10',10',FALSE,FALSE); No variables, no main block and no run statement. This isn't a handle based function so there's no need for h at all. The fist boolean controls 'All Layers' and the second 'All Objects'. If the first is set False it only affects objects on the active layer. If the second is set False it moves only selected objects. Later Charles 1 Quote Link to comment
Christiaan Posted October 3, 2006 Author Share Posted October 3, 2006 That did the trick, thanks guys. Quote Link to comment
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.