vernonlee Posted May 12, 2015 Share Posted May 12, 2015 Is there a system variable to control the display of polyline widths? Due to my work, there is a bunch of existing polylines with different widths that i need to adjust (but not the width) so I need to toggle them on/off visually. If no, is there is a roundabout way? Thanks Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 12, 2015 Share Posted May 12, 2015 There is no OOTB system variable way to do it. Quote Link to comment Share on other sites More sharing options...
vernonlee Posted May 12, 2015 Author Share Posted May 12, 2015 There is no OOTB system variable way to do it. Any alternative? Quote Link to comment Share on other sites More sharing options...
steven-g Posted May 12, 2015 Share Posted May 12, 2015 Workaround !!! make a copy of all the polylines with a width and place it on a seperate layer, and then turn layers on/off, on one of the layers change these polylines to have a global width of 0, you can use qselect to find all polylines that have a width. It does double up on your geometry but is a quick method. Quote Link to comment Share on other sites More sharing options...
vernonlee Posted May 13, 2015 Author Share Posted May 13, 2015 Workaround !!! make a copy of all the polylines with a width and place it on a seperate layer, and then turn layers on/off, on one of the layers change these polylines to have a global width of 0, you can use qselect to find all polylines that have a width. It does double up on your geometry but is a quick method. Thanks. Well. actually this is how the work goes. 1)I will be adjusting some THICK polyline, in relation with THIN polylines 2) To adjust those THICK lines, because it is too thick it covers the THIN polylines & i cannot see them. Hence i need a way to temporary visually have the THICK polylines "thin" so that I can see what i am doing in relation with the THIN polyline. 3)After adjusting the THICK polylines (that is visually "thin" now), i than want the THICK polylines back to its original thick widths. This THICK polylines is all over the drawings so I need to adjust them & need an even quicker way to "toggle" those THICK polylines ON & OFF. Hope you get what i mean. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 13, 2015 Share Posted May 13, 2015 Might those FAT polylines all be on a particular layer or two, different from the thin ones? If they were you could freeze those layers. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted May 13, 2015 Share Posted May 13, 2015 Just so I understand fully, we're talking about Polylines with a Global Width != 0, and not Polylines on a layer with a plot style/CTB color that has a large width value and you're just displaying said lineweight(s), correct? If so (you are using Global Widths), then write a simple LISP routine that iterates a selection set of Polylines with Global Width != 0, store the Polyline's Object, and current Global Width to a list of grouped pairs (as global variable), then set the Global Width == 0 for each in turn. Running the routine again, should iterate the stored list of grouped pairs, restoring each Polyline Object accordingly, then set the global variable == nil. For completeness, you might also either implement a reactor that will restore same upon drawing Save*, or Close*... Or store said data to the drawing's database, so it becomes persistent (even after close and reopen), just be mindful that this may affect other drawing's plots (if said host drawing is used as XREF). Cheers Quote Link to comment Share on other sites More sharing options...
vernonlee Posted May 13, 2015 Author Share Posted May 13, 2015 Might those FAT polylines all be on a particular layer or two, different from the thin ones? If they were you could freeze those layers. The FAT polylines have different width within same layers. The FAT polylines have different layers as well. I am amending the FAT lines only. The THIN line i need to retain there visually to help me amend the FAT lines Quote Link to comment Share on other sites More sharing options...
vernonlee Posted May 13, 2015 Author Share Posted May 13, 2015 Just so I understand fully, we're talking about Polylines with a Global Width != 0, and not Polylines on a layer with a plot style/CTB color that has a large width value and you're just displaying said lineweight(s), correct? If so (you are using Global Widths), then write a simple LISP routine that iterates a selection set of Polylines with Global Width != 0, store the Polyline's Object, and current Global Width to a list of grouped pairs (as global variable), then set the Global Width == 0 for each in turn. Running the routine again, should iterate the stored list of grouped pairs, restoring each Polyline Object accordingly, then set the global variable == nil. For completeness, you might also either implement a reactor that will restore same upon drawing Save*, or Close*... Or store said data to the drawing's database, so it becomes persistent (even after close and reopen), just be mindful that this may affect other drawing's plots (if said host drawing is used as XREF). Cheers Yes. It is Gobal width. But it is not 0. Each layer has different width. As for LISP, i do need someone to help with that. Quote Link to comment Share on other sites More sharing options...
marmo Posted May 13, 2015 Share Posted May 13, 2015 (edited) Is there a system variable to control the display of polyline widths? Due to my work, there is a bunch of existing polylines with different widths that i need to adjust (but not the width) so I need to toggle them on/off visually. If no, is there is a roundabout way? Thanks There is no sys var wich shows you polylines with differents width > 0 as lines. But if you have problem with the filling try to set FILLMODE = 0, all plines with width>0 will showed like rectangles (pay attention, all fillings will turned off, even hatches). then reset FILLMODE = 1 I forgot...use REGEN after switching 1 to 0 end vice versa. Edited May 13, 2015 by marmo Quote Link to comment Share on other sites More sharing options...
marmo Posted May 13, 2015 Share Posted May 13, 2015 Fillmode=1 fillmode=0 Quote Link to comment Share on other sites More sharing options...
BlackBox Posted May 13, 2015 Share Posted May 13, 2015 There is no sys var wich shows you polylines with differents width > 0 as lines.But if you have problem with the filling try to set FILLMODE = 0, all plines with width>0 will showed like rectangles (pay attention, all fillings will turned off, even hatches). then reset FILLMODE = 1 I forgot...use REGEN after switching 1 to 0 end vice versa. Great point - completely forgot about FILLMODE! Haha Building on your apt post: (defun c:FAT () (setvar 'fillmode 1) (command "._regen") (princ) ) (defun c:THIN () (setvar 'fillmode 0) (command "._regen") (princ) ) Quote Link to comment Share on other sites More sharing options...
vernonlee Posted May 13, 2015 Author Share Posted May 13, 2015 Fillmode=1 [attach]54203[/attach] fillmode=0 [attach]54204[/attach] Cool. Will test it out tomorrow Quote Link to comment Share on other sites More sharing options...
marmo Posted May 13, 2015 Share Posted May 13, 2015 Great point - completely forgot about FILLMODE! Haha Building on your apt post: (defun c:FAT () (setvar 'fillmode 1) (command "._regen") (princ) ) (defun c:THIN () (setvar 'fillmode 0) (command "._regen") (princ) ) Thanks for the codes!!! :) Quote Link to comment Share on other sites More sharing options...
marmo Posted May 13, 2015 Share Posted May 13, 2015 Cool. Will test it out tomorrow . I'm glad to help you. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted May 13, 2015 Share Posted May 13, 2015 Thanks for the codes!!! :) *Tips hat*... You did the hard part. Quote Link to comment Share on other sites More sharing options...
vernonlee Posted May 14, 2015 Author Share Posted May 14, 2015 Thanks Marmo. It works. I am able to work with this. Thanks Blackbox for the LISP. I prefer using macro script oo i wrote this for myself instead. ^C^CFILLMODE;1;REGEN; ^C^CFILLMODE;0;REGEN; Quote Link to comment Share on other sites More sharing options...
steven-g Posted May 14, 2015 Share Posted May 14, 2015 +1 Marmo - I like that thinking outside of the box, BlackBox - sometimes I wish I had access to LISP the possibilities seem endless, and to be honest this is one of the first pieces of code that I can actually understand, it looks logical to someone who has never looked into the syntax of the language. vernonlee - I have no choice but to use scripts and macro's, here is a slight adaptation that will just toggle the fillmode on/off ^C^C^C$M=$(if,$(=,$(getvar,fillmode),1),setvar;fillmode;0,setvar;fillmode;1);rea; Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 14, 2015 Share Posted May 14, 2015 +1 Marmo - I like that thinking outside of the box,BlackBox - sometimes I wish I had access to LISP the possibilities seem endless, and to be honest this is one of the first pieces of code that I can actually understand, it looks logical to someone who has never looked into the syntax of the language. vernonlee - I have no choice but to use scripts and macro's, here is a slight adaptation that will just toggle the fillmode on/off ^C^C^C$M=$(if,$(=,$(getvar,fillmode),1),setvar;fillmode;0,setvar;fillmode;1);rea; Nicely conditioned steven-g! ;beer: Quote Link to comment Share on other sites More sharing options...
vernonlee Posted May 14, 2015 Author Share Posted May 14, 2015 +1 Marmo - I like that thinking outside of the box,BlackBox - sometimes I wish I had access to LISP the possibilities seem endless, and to be honest this is one of the first pieces of code that I can actually understand, it looks logical to someone who has never looked into the syntax of the language. vernonlee - I have no choice but to use scripts and macro's, here is a slight adaptation that will just toggle the fillmode on/off ^C^C^C$M=$(if,$(=,$(getvar,fillmode),1),setvar;fillmode;0,setvar;fillmode;1);rea; Thanks steven-g 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.