Lee Mac Posted June 20, 2010 Share Posted June 20, 2010 Exactly - so the code functions correctly. How can you say 'nothing happen' when you can clearly see a difference? Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted June 20, 2010 Share Posted June 20, 2010 it is very weird. when i do this (FREEZEINVIEWPORT "DRAWER3" 1) nothing happen but after this (command "_laythw") all layer been thawed except DRAWER3 which became freezed. kruuger Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted June 20, 2010 Share Posted June 20, 2010 nothing happen on the screen (at viewport). is there any way to refresh screen to see changes? kruuger Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 20, 2010 Share Posted June 20, 2010 My code will change the settings in the Layer Manager. Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted June 20, 2010 Share Posted June 20, 2010 My code will change the settings in the Layer Manager. very clever but without changes on screen it might be very confusing. kruuger Quote Link to comment Share on other sites More sharing options...
alanjt Posted June 20, 2010 Share Posted June 20, 2010 How do you specify which viewport to freeze the layer in? shouldn't you need to provide an object id? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 20, 2010 Share Posted June 20, 2010 This may be more what you are after, by Gile: http://www.theswamp.org/index.php?topic=22264.0 Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted June 20, 2010 Share Posted June 20, 2010 This may be more what you are after, by Gile: http://www.theswamp.org/index.php?topic=22264.0 i saw this program. it is unbelievable what can be done with lisp. for my purpose i apply Alan filter code and programs works fine. kruuger Scale VP.lsp Quote Link to comment Share on other sites More sharing options...
alanjt Posted June 20, 2010 Share Posted June 20, 2010 i saw this program. it is unbelievable what can be done with lisp. for my purpose i apply Alan filter code and programs works fine. kruuger Why'd you change the syntax in the code I posted. Now it doesn't localize all the variables. I understand what you've done to modify it, but the functionality works as such: (setq FRZLIST (LayerFilter "*dim*" D_LYER)) Using what I posted and not your modified version. Quote Link to comment Share on other sites More sharing options...
alanjt Posted June 20, 2010 Share Posted June 20, 2010 This may be more what you are after, by Gile: http://www.theswamp.org/index.php?topic=22264.0 Cool, I hadn't see that one. Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted June 20, 2010 Share Posted June 20, 2010 Why'd you change the syntax in the code I posted. Now it doesn't localize all the variables. I understand what you've done to modify it, but the functionality works as such: (setq FRZLIST (LayerFilter "*dim*" D_LYER)) Using what I posted and not your modified version. i made small modification to code. try to follow your info. now when i leave "s" in your function as local then i got error: Error: bad argument type: stringp nil if i'm correct everything should be ok with "s" as a local. do you know what can be wrong? thanks kruuger Scale VP.lsp Quote Link to comment Share on other sites More sharing options...
alanjt Posted June 20, 2010 Share Posted June 20, 2010 I wrote it to return a comma delimited string of layers, that way you could feed all the layers to VPLayer once and increase processing time. This is all you need: (if (setq Layers (AJT:LayerFilter "*dim*,*text_*" (strcat D_LYER "," T_LYER))) (command "_vplayer" "_f" Layers "_c" "") ) I haven't tested Gile's routine (Lee's posted link), but I'm sure it's even faster. Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted June 21, 2010 Share Posted June 21, 2010 I wrote it to return a comma delimited string of layers, that way you could feed all the layers to VPLayer once and increase processing time. This is all you need: (if (setq Layers (AJT:LayerFilter "*dim*,*text_*" (strcat D_LYER "," T_LYER))) (command "_vplayer" "_f" Layers "_c" "") ) I haven't tested Gile's routine (Lee's posted link), but I'm sure it's even faster. Alan i hope you are patient. i'm still rookie with all this stuff. believe me your speed code is almost same fast as GEF; (many layers, few xref). works very well. when we work viewport by viewport it is faster type s4, s16 rather then go thru GEF. But working with multiple vport/layout there is no questions GEF is amazing tools. again i'm posting my file. i hope that now all is ok. thanks kruuger Scale VP.lsp Quote Link to comment Share on other sites More sharing options...
alanjt Posted June 21, 2010 Share Posted June 21, 2010 Alan i hope you are patient. i'm still rookie with all this stuff.believe me your speed code is almost same fast as GEF; (many layers, few xref). works very well. when we work viewport by viewport it is faster type s4, s16 rather then go thru GEF. But working with multiple vport/layout there is no questions GEF is amazing tools. again i'm posting my file. i hope that now all is ok. thanks kruuger I'm very patient, as long as the other has a good attitude and listens. Now, you are still trying to act as if my LayerFilter sub is creating a list. It only creates a comma delimited string of layer names. This way it can be fed to VPLayer one time, thus avoiding executing VPLayer more than once. In my last post, I gave you the necessary coding. However, if you are hell-bent on using another subroutine, replace yours with the following: (defun SCVP_FREEZE (LayString) (if (eq (type LayString) 'STR) (command "_.vplayer" "_f" LayString "_c" "") ) ) This will only execute VPLayer once and will be a whole lot faster. I still say you should explore Gile's routine, in the link Lee posted. Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted June 21, 2010 Share Posted June 21, 2010 (defun SCVP_FREEZE (LayString) (if (eq (type LayString) 'STR) (command "_.vplayer" "_f" LayString "_c" "") ) ) This will only execute VPLayer once and will be a whole lot faster. I still say you should explore Gile's routine, in the link Lee posted. oo, shi.. i forgot about this foreach/wcmatch. i think that this is fine for me: (defun SCVP_FREEZE (Lay) (command "_vplayer" "_f" Lay "_c" "") );defun i run vlplayer twice because of different Scl. For some scale i also need to freeze *a-hat* or *veener*. even with this two loops it takes 0.5sec to freeze (very "heavy" dwg with few xref's). more time i'm waiting to create vport. GEF is not for me. usually i create few vports in layout in different scale (different layer to freeze). it is faster to me type the shortcut rather then setting all in GEF. thanks kruuger Quote Link to comment Share on other sites More sharing options...
alanjt Posted June 21, 2010 Share Posted June 21, 2010 Ill advised, since you aren't checking if there's a valid string (or anything) being sent do the routine. If LayerFilter is nil, your VPLayer sub will crash. Use what I provided. BTW, what's GEF? oo, shi.. i forgot about this foreach/wcmatch.i think that this is fine for me: (defun SCVP_FREEZE (Lay) (command "_vplayer" "_f" Lay "_c" "") );defun i run vlplayer twice because of different Scl. For some scale i also need to freeze *a-hat* or *veener*. even with this two loops it takes 0.5sec to freeze (very "heavy" dwg with few xref's). more time i'm waiting to create vport. GEF is not for me. usually i create few vports in layout in different scale (different layer to freeze). it is faster to me type the shortcut rather then setting all in GEF. thanks kruuger Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted June 21, 2010 Share Posted June 21, 2010 GEF it is Gile's routine. I use it few times and it stick to my head Thanks once again Alan kruuger Quote Link to comment Share on other sites More sharing options...
alanjt Posted June 21, 2010 Share Posted June 21, 2010 GEF it is Gile's routine.I use it few times and it stick to my head Thanks once again Alan kruuger Ahh, OK. Enjoy. Quote Link to comment Share on other sites More sharing options...
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.