Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Global Width Assignment to 0
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Global Width Assignment to 0 (Read 2461 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!
Logged
mjfarrell
Seagull
Posts: 14444
Every Student their own Lesson
WWW
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
Logged
Be your Best
Michael Farrell
http://primeservicesglobal.com/
Lee Mac
Seagull
Posts: 12927
London, England
WWW
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]
(
defun
c:pwz
nil
(
vlax-for
blk
(
vla-get-blocks
(
vla-get-activedocument
(
vlax-get-acad-object
)
)
)
(
if
(
=
:vlax-false
(
vla-get-isxref
blk
)
)
(
vlax-for
obj blk
(
if
(
and
(
=
"AcDbPolyline"
(
vla-get-objectname
obj
)
)
(
vlax-write-enabled-p
obj
)
)
(
vla-put-constantwidth
obj
0.0
)
)
)
)
)
(
command
"_.regen"
)
(
princ
)
)
(
vl-load-com
)
(
princ
)
Logged
Lee Mac Programming
•
Twitter
•
Exchange App Store
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!
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Global Width Assignment to 0