Author Topic: Global Width Assignment to 0  (Read 2430 times)

0 Members and 1 Guest are viewing this topic.

b-rye guy

  • Guest
Global Width Assignment to 0
« on: March 09, 2016, 12:38:47 PM »
Hello -

We often receive files from consultants that have multiple global widths assigned to different polylines. I am wondering if there is an easy way to set all polylines and other objects with global width assignments (including block layers) to 0.

I was wondering if a script running through the _.qselect command could handle this, or would I need a full function?

Thanks in advance for any help!

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Global Width Assignment to 0
« Reply #1 on: March 09, 2016, 12:43:04 PM »
should NOT need a lisp for this...

qselect all polylines with global width greater than 0(zero)

go to properties and set the global width value as desired, and done
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Global Width Assignment to 0
« Reply #2 on: March 09, 2016, 12:52:15 PM »
I agree that AutoLISP is unnecessary given that this property can be modified for multiple objects simultaneously through the Properties Palette.

Nevertheless, I have published a Polyline Width program here.

And the following will set the global width of all LWPolylines in a drawing to zero:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:pwz nil
  2.         (if (= :vlax-false (vla-get-isxref blk))
  3.             (vlax-for obj blk
  4.                 (if (and (= "AcDbPolyline" (vla-get-objectname obj)) (vlax-write-enabled-p obj))
  5.                     (vla-put-constantwidth obj 0.0)
  6.                 )
  7.             )
  8.         )
  9.     )
  10.     (command "_.regen")
  11.     (princ)
  12. )

b-rye guy

  • Guest
Re: Global Width Assignment to 0
« Reply #3 on: March 09, 2016, 01:52:53 PM »
Thank you both for your help. We are trying to automate our technical workflow so that we have more time to focus on designing or projects, which is why automation helps everyone, even if it saves 30 seconds.

Thanks again!