Jump to content

LWeight Followup Question..


Recommended Posts

Posted

This is a followup to this thread..

 

http://www.cadtutor.net/forum/showthread.php?t=43123

 

Is there a SETVAR for the Toggle to Display Lineweight?

 

I have something that toggles it ON from time to time and

would like to just set it to be OFF when Autocad starts.

In my startup preferrably.

 

TIA!!

Posted

Perhaps this?

 

"The default value is set by the LWDEFAULT system variable, which has an initial value of 0.01 inches or 0.25 mm. All new layers use the default setting. The lineweight value of 0 plots at the thinnest lineweight available on the specified plotting device and is displayed at one pixel wide in model space."

Posted

LWDisplay!!

 

You're my hero!!

 

 

On a side note how would I write a routine to go through all layers in a drawing

and set the lineweight to Default for each layer?

Drawings imported from Solidworks sometimes set a lineweight for different layers...

Posted

Try this:

 

(defun c:lwd nil
 (vl-load-com)

 (vlax-for lay (vla-get-Layers
                 (vla-get-ActiveDocument
                   (vlax-get-acad-object)))
   
   (vla-put-lineweight lay acLnWtByLwDefault))

 (princ))

 

Or

 

(defun c:lwd (/ tdef)

 (while (setq tdef (tblnext "LAYER" (not tdef)))
   (entmod (subst (cons 370 -3) (assoc 370 tdef) tdef)))

 (princ))

Posted
LWDisplay!!

 

You're my hero!!

 

 

On a side note how would I write a routine to go through all layers in a drawing

and set the lineweight to Default for each layer?

Drawings imported from Solidworks sometimes set a lineweight for different layers...

 

 

 

Merry Christmas Everyone!

Posted

Lee...

 

Once again...

 

YOU ARE THE MAN!!

 

When I grow up I want to program just like you!!

 

Thank you and MERRY CHRISTMAS!!

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...