Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

pline width

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
352 Views, 7 Replies

pline width

I would like to be able to set the width of a polyline or lwpolyline, draw the polyline or lwpolyline and then have the width set back to the way it was before. Does this make sense? Thanks! -JB
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Just use the _W parameter in the PLINE command. -David (defun c:wpl (/ opw) (setq opw (getvar "PLINEWID")) (setvar "CMDECHO" 1) (command "_.PLINE") (while (> (getvar "CMDACTIVE") 0) (command pause)) (setvar "CMDECHO" 0) (setvar "PLINEWID" opw) (prin1)) JB wrote: > I would like to be able to set the width of a polyline or lwpolyline, draw > the polyline or lwpolyline and then have the width set back to the way it > was before. Does this make sense? > > Thanks! > > -JB > >
Message 3 of 8
Anonymous
in reply to: Anonymous

Thanks! I am using your code called from this menu item and it works but for some reason it isn't setting it back to 0 wpl;\w;.675;; Thanks again! -JB "David Bethel" wrote in message news:405b2ac6$1_1@newsprd01... > > Just use the _W parameter in the PLINE command. -David > > (defun c:wpl (/ opw) > (setq opw (getvar "PLINEWID")) > (setvar "CMDECHO" 1) > (command "_.PLINE") > (while (> (getvar "CMDACTIVE") 0) > (command pause)) > (setvar "CMDECHO" 0) > (setvar "PLINEWID" opw) > (prin1)) > > > JB wrote: > > I would like to be able to set the width of a polyline or lwpolyline, draw > > the polyline or lwpolyline and then have the width set back to the way it > > was before. Does this make sense? > > > > Thanks! > > > > -JB > > > >
Message 4 of 8
Anonymous
in reply to: Anonymous

Try adding this to the end: (setvar "plinewid" 0.0) "JB" wrote in message news:405b3035$1_3@newsprd01... > Thanks! > > I am using your code called from this menu item and it works but for some > reason it isn't setting it back to 0 > > > wpl;\w;.675;; > > Thanks again! > > -JB > > > "David Bethel" wrote in message > news:405b2ac6$1_1@newsprd01... > > > > Just use the _W parameter in the PLINE command. -David > > > > (defun c:wpl (/ opw) > > (setq opw (getvar "PLINEWID")) > > (setvar "CMDECHO" 1) > > (command "_.PLINE") > > (while (> (getvar "CMDACTIVE") 0) > > (command pause)) > > (setvar "CMDECHO" 0) > > (setvar "PLINEWID" opw) > > (prin1)) > > > > > > JB wrote: > > > I would like to be able to set the width of a polyline or lwpolyline, > draw > > > the polyline or lwpolyline and then have the width set back to the way > it > > > was before. Does this make sense? > > > > > > Thanks! > > > > > > -JB > > > > > > > >
Message 5 of 8
Anonymous
in reply to: Anonymous

I don't think the program will work like that. -David JB wrote: > Thanks! > > I am using your code called from this menu item and it works but for some > reason it isn't setting it back to 0 > > > wpl;\w;.675;; > > Thanks again! > > -JB > > > "David Bethel" wrote in message > news:405b2ac6$1_1@newsprd01... > >>Just use the _W parameter in the PLINE command. -David >> >>(defun c:wpl (/ opw) >> (setq opw (getvar "PLINEWID")) >> (setvar "CMDECHO" 1) >> (command "_.PLINE") >> (while (> (getvar "CMDACTIVE") 0) >> (command pause)) >> (setvar "CMDECHO" 0) >> (setvar "PLINEWID" opw) >> (prin1)) >> >> >>JB wrote: >> >>>I would like to be able to set the width of a polyline or lwpolyline, > > draw > >>>the polyline or lwpolyline and then have the width set back to the way > > it > >>>was before. Does this make sense? >>> >>>Thanks! >>> >>>-JB >>> >>> > > >
Message 6 of 8
Anonymous
in reply to: Anonymous

It works just fine as it is, as long as the command is ended with an enter. It doesn't reset the width if an escape is used. Is there a way around this? Thanks again again! -JB "JB" wrote in message news:405b3035$1_3@newsprd01... > Thanks! > > I am using your code called from this menu item and it works but for some > reason it isn't setting it back to 0 > > > wpl;\w;.675;; > > Thanks again! > > -JB > > > "David Bethel" wrote in message > news:405b2ac6$1_1@newsprd01... > > > > Just use the _W parameter in the PLINE command. -David > > > > (defun c:wpl (/ opw) > > (setq opw (getvar "PLINEWID")) > > (setvar "CMDECHO" 1) > > (command "_.PLINE") > > (while (> (getvar "CMDACTIVE") 0) > > (command pause)) > > (setvar "CMDECHO" 0) > > (setvar "PLINEWID" opw) > > (prin1)) > > > > > > JB wrote: > > > I would like to be able to set the width of a polyline or lwpolyline, > draw > > > the polyline or lwpolyline and then have the width set back to the way > it > > > was before. Does this make sense? > > > > > > Thanks! > > > > > > -JB > > > > > > > >
Message 7 of 8
Anonymous
in reply to: Anonymous

Yes, But it would take a robust error trapping function. In other words a complete routine, not just the snippet I posted. -David JB wrote: > It works just fine as it is, as long as the command is ended with an enter. > It doesn't reset the width if an escape is used. Is there a way around > this? > > Thanks again again! > > -JB > > "JB" wrote in message news:405b3035$1_3@newsprd01... > >>Thanks! >> >>I am using your code called from this menu item and it works but for some >>reason it isn't setting it back to 0 >> >> >>wpl;\w;.675;; >> >>Thanks again! >> >>-JB >> >> >>"David Bethel" wrote in message >>news:405b2ac6$1_1@newsprd01... >> >>>Just use the _W parameter in the PLINE command. -David >>> >>>(defun c:wpl (/ opw) >>> (setq opw (getvar "PLINEWID")) >>> (setvar "CMDECHO" 1) >>> (command "_.PLINE") >>> (while (> (getvar "CMDACTIVE") 0) >>> (command pause)) >>> (setvar "CMDECHO" 0) >>> (setvar "PLINEWID" opw) >>> (prin1)) >>> >>> >>>JB wrote: >>> >>>>I would like to be able to set the width of a polyline or lwpolyline, >> >>draw >> >>>>the polyline or lwpolyline and then have the width set back to the way >> >>it >> >>>>was before. Does this make sense? >>>> >>>>Thanks! >>>> >>>>-JB >>>> >>>> >> >> > >
Message 8 of 8
Anonymous
in reply to: Anonymous

Never the less I am MUCH farther along than I was before your help. Thanks and have a nice weekend. -JB "David Bethel" wrote in message news:405b613c$1_3@newsprd01... > Yes, > > But it would take a robust error trapping function. In other words a > complete routine, not just the snippet I posted. -David

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost