Author Topic: Reduce all lineweights  (Read 2091 times)

0 Members and 1 Guest are viewing this topic.

smakfactor1

  • Guest
Reduce all lineweights
« on: September 29, 2016, 05:08:15 PM »
Has anyone ever come across this issue?  We've switched plotting file formats from DWF to PDF(long overdue) as well as our physical plotting device and server software.  It seems as though somehow DWF's are producing lines .004 smaller than PDF's are.  Whether that's the file-type difference, or how the server is processing them on output I don't know. 

Regardless...going into hundreds/thousands of drawings certainly can't be the answer.  I've found some specific "set X layer to X lineweight", but we're definitely talking thousands of variables at that point. 

How difficult would it be to simply subtract .004 from all current lineweight values?

Thoughts?

Thanks in advance for any ideas!
« Last Edit: September 29, 2016, 05:13:59 PM by smakfactor1 »

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Reduce all lineweights
« Reply #1 on: September 30, 2016, 09:07:26 AM »
Reducing all lineweights by a fixed amount is not possible since only certain lineweights are allowed.
But something like this may come close to what you want:
Code - Auto/Visual Lisp: [Select]
  1. (defun LyrLwReduceSelect (old)
  2.   (cdr
  3.     (assoc
  4.       old
  5.       '(
  6.         ( -3 .  -3) ; Default.
  7.         (  0 .   0)
  8.         (  5 .   0) ; 5 = 0.05mm.
  9.         (  9 .   0)
  10.         ( 13 .   5)
  11.         ( 15 .   5)
  12.         ( 18 .   9)
  13.         ( 20 .   9)
  14.         ( 25 .  15)
  15.         ( 30 .  20)
  16.         ( 35 .  25)
  17.         ( 40 .  30)
  18.         ( 50 .  40)
  19.         ( 53 .  40)
  20.         ( 60 .  50)
  21.         ( 70 .  60)
  22.         ( 80 .  70)
  23.         ( 90 .  80)
  24.         (100 .  90)
  25.         (106 .  90)
  26.         (120 . 106)
  27.         (140 . 120)
  28.         (158 . 140)
  29.         (200 . 200)
  30.         (211 . 200)
  31.       )
  32.     )
  33.   )
  34. )
  35.  
  36. (defun c:LyrLwReduce ( / doc)
  37.   (vlax-for lyr (vla-get-layers doc)
  38.     (vla-put-lineweight lyr (LyrLwReduceSelect (vla-get-lineweight lyr)))
  39.   )
  40.   (princ)
  41. )
« Last Edit: September 30, 2016, 09:24:59 AM by roy_043 »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Reduce all lineweights
« Reply #2 on: September 30, 2016, 09:44:53 AM »
Isn't that controlled by the CTB or STB file?

Or have you set all line weights in each drawing object?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Reduce all lineweights
« Reply #3 on: September 30, 2016, 10:55:13 AM »
0.004 what?  Inches?  Millimeters?  And on what size of drawing?  Are you certain you didn't throw in an extra zero or two, because that's an insanely small difference (1/32" = 0.03125), nearly impossible to measure.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

smakfactor1

  • Guest
Re: Reduce all lineweights
« Reply #4 on: September 30, 2016, 12:56:01 PM »
We haven't changed the STB file, it's the same one they were using for plotting to DWF.

.004 inches for each lineweight seems to be the difference.  Standard drawing sizes are 24"x36"

While it is a small amount, side by side it is very noticeable. 

smakfactor1

  • Guest
Re: Reduce all lineweights
« Reply #5 on: September 30, 2016, 01:05:42 PM »
Reducing all lineweights by a fixed amount is not possible since only certain lineweights are allowed.
But something like this may come close to what you want:
Code - Auto/Visual Lisp: [Select]
  1. (defun LyrLwReduceSelect (old)
  2.   (cdr
  3.     (assoc
  4.       old
  5.       '(
  6.         ( -3 .  -3) ; Default.
  7.         (  0 .   0)
  8.         (  5 .   0) ; 5 = 0.05mm.
  9.         (  9 .   0)
  10.         ( 13 .   5)
  11.         ( 15 .   5)
  12.         ( 18 .   9)
  13.         ( 20 .   9)
  14.         ( 25 .  15)
  15.         ( 30 .  20)
  16.         ( 35 .  25)
  17.         ( 40 .  30)
  18.         ( 50 .  40)
  19.         ( 53 .  40)
  20.         ( 60 .  50)
  21.         ( 70 .  60)
  22.         ( 80 .  70)
  23.         ( 90 .  80)
  24.         (100 .  90)
  25.         (106 .  90)
  26.         (120 . 106)
  27.         (140 . 120)
  28.         (158 . 140)
  29.         (200 . 200)
  30.         (211 . 200)
  31.       )
  32.     )
  33.   )
  34. )
  35.  
  36. (defun c:LyrLwReduce ( / doc)
  37.   (vlax-for lyr (vla-get-layers doc)
  38.     (vla-put-lineweight lyr (LyrLwReduceSelect (vla-get-lineweight lyr)))
  39.   )
  40.   (princ)
  41. )

Roy, you are awesome.  Thank you very much sir! 

You've saved me a lot of headache! 

danallen

  • Guest
Re: Reduce all lineweights
« Reply #6 on: September 30, 2016, 01:44:51 PM »
Reducing all lineweights by a fixed amount is not possible since only certain lineweights are allowed.

You can edit a STB (or CTB) file to have any lineweight you want, within the fixed number of slots. But if you use more than 1/2 of the slots for your standards, you won't be able to edit the other 1/2 slots to be 0.004 less and available for Roy's slimming function.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Reduce all lineweights
« Reply #7 on: September 30, 2016, 03:37:40 PM »
@ dan allen:
The code I have posted changes the lineweights of layers in the dwg, and in a dwg only certain lineweights are allowed. The OP prints with a CTB or STB that uses the 'Use object lineweight' option.

danallen

  • Guest
Re: Reduce all lineweights
« Reply #8 on: September 30, 2016, 03:54:06 PM »
Roy - you're right, I didn't see OP state that their STB used object lineweight, my STB defines lineweight in the plot style, except for Normal when I want a RGB value

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Reduce all lineweights
« Reply #9 on: September 30, 2016, 04:12:18 PM »
I didn't see OP state that their STB used object lineweight
True, the OP hasn't mentioned this, but reading between the lines this seems to be a reasonable assumption.

Here is an interesting article (in English) about using a compact STB in combination with layers with lineweights:
http://forum.cad.de/foren/ubb/uploads/marc.scherer/ProStb.pdf

smakfactor1

  • Guest
Re: Reduce all lineweights
« Reply #10 on: October 03, 2016, 10:04:32 AM »
Good read, and thanks again Roy.  We have been using our "standard" .stb for some time now, the issue isn't getting the standards set though.  We have current jobs that have already been plotted(to DWF), but will continue to be plotted moving forward after the switch from DWF to PDF.  A lot of our jobs are massive, and take years to complete.  I wish it was as easy as "start using these settings on the next job", but it's not. 

I didn't intend for our old Oce server to die on me.  Switching to their latest server/processing software has greatly degraded the plot quality of DWF's.  Alas, we have no choice but to switch to PDF.  Not that I don't think we should have done that a long time ago anyways.  :)