mcclarion Posted May 9, 2012 Author Posted May 9, 2012 The required script will look like this (version for 3 frames): _LAYER _S 0 _LAYER _OFF Layer1 _OFF Layer3 _OFF Layer5 _LAYER _ON Layer1 _DELAY 300 _LAYER _OFF Layer1 _ON Layer3 _DELAY 300 _LAYER _OFF Layer3 _ON Layer5 _DELAY 300 ;end of script May use Excel to create script's lines, due to the big number of frames. Please don't ignore the empty lines - those are required to end the LAYER command. You may also want to consider my previous suggestion to use slides instead of layers. thank you for taking time to do this i am really grateful i tried this but only show a layer5 and stop there .. layer1 or 3 do not seeing ? Quote
MSasu Posted May 9, 2012 Posted May 9, 2012 I tested the script in AutoCAD 2007 and is working well. What version are you using? Is 2012 as per your profile? Quote
MSasu Posted May 9, 2012 Posted May 9, 2012 Just tested it again in AutoCAD 2011 and seems that there is an issue with command’s dialog box – it remains on screen and the view is refreshed only at the end of the script action. But found a workaround: set the FILEDIA system variable to 0 and call the SCRIPT command in prompt mode; this way seems to work. Don’t forget to set the FILEDIA back to 1 after since will affect other commands too. Quote
mcclarion Posted May 9, 2012 Author Posted May 9, 2012 do i haw to turn off all the other layers ( related to circles ) or leave them on .. ? i tried both solution and in try1 where i turned off all the layers layer5 only pop up and stay .. no other layer is shown Quote
mcclarion Posted May 9, 2012 Author Posted May 9, 2012 it seams it's working after filedia .. i'll do the rest of the script .. will get back with result .. many many thx for this Quote
MSasu Posted May 9, 2012 Posted May 9, 2012 You will have to turn them all to OFF in first step. Alternatively you may turn them by hand before run the script, but controling them by script is useful if want to run it more than once - without closing the file (to reset the layers to OFF). Quote
MSasu Posted May 9, 2012 Posted May 9, 2012 it seams it's working after filedia .. i'll do the rest of the script .. will get back with result .. many many thx for this Sound that you got is sorted! That's a good news. You're welcome! Just out of curiosity, is this for a school project? Quote
Jeff H Posted May 10, 2012 Posted May 10, 2012 Here was one messing around using Transient graphics ScreenCast The code is pretty messy was just throwing it together to see how it worked, but it makes objects look animated without locking up the UI thread and can still continue to work. Code Quote
MSasu Posted May 10, 2012 Posted May 10, 2012 Another comment regarding usage of SCRIPT command in prompt mode – if you will name the script using drawing’s name (i.e. Move.DWG & Move.SCR) and place them on the same folder, then when issue the command, the default value will be constructed based on drawing’s name, so you will not have to type the path; just hit and the show will begin. Quote
pBe Posted May 10, 2012 Posted May 10, 2012 do i haw to turn off all the other layers ( related to circles ) or leave them on .. ? i tried both solution and in try1 where i turned off all the layers layer5 only pop up and stay .. no other layer is shown If you're still interested. both the codes i posted can be modified to do just that. the sequence will all depend on your imagination. If you want the ball to "remain", just comment this line [on post #9] (rolling delay) [b][color=blue];; (hide lnm 2)[/color][/b] ) or if you want to it to leave a trail. (defun c:Roll (/ hide Rolling Delay n) (initget 7) (setq delay (getint "\nEnter Delay factor: ")) (defun hide (ln mode) (setq ss (ssget "_X" (list (cons 8 ln)))) (repeat (setq i (sslength ss)) (redraw (ssname ss (setq i (1- i))) mode))) (defun Rolling (prcnt) (repeat prcnt (setq prcnt_1 (1+ prcnt)) (prompt "\r|") (prompt "\r/") (prompt "\r|") (prompt "\r\\") (princ) ) ) (setq n 0) (hide "ROLL-*" 2) (repeat 29 (setq lnm (strcat "Roll-" (itoa (setq n (1+ n))))) (hide lnm 1) (rolling delay) [b][color=blue](hide lnm 3)[/color][/b] ) [color=blue][b](hide "Roll-29" 1)[/b][/color] [b][color=blue] (setq n 0)[/color][/b] [b][color=blue] (repeat 29[/color][/b] [b][color=blue] (setq lnm (strcat "Roll-" (itoa (setq n (1+ n)))))[/color][/b] [b][color=blue] (hide lnm 2)[/color][/b] [b][color=blue] (rolling (/ delay 2))[/color][/b] [b][color=blue] )[/color][/b] [b][color=blue] (hide "Roll-29" 4)(hide "Roll-29" 2)(hide "Roll-29" 1)[/color][/b] ) Try that and see how it looks. As for the Freeze/Thaw approach. the code can be modified to accept list of layers for the _FTLayer sub. Thing is, the "animation" is only limited by your imagination mcclarion. Quote
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.