Author Topic: "BYLAYER"  (Read 8793 times)

0 Members and 1 Guest are viewing this topic.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15567
"BYLAYER"
« on: October 26, 2006, 05:08:33 AM »
Company policy is to draw objects as colour, linestyle and lineweight bylayer. This is currently not being done by some engineers. I'm finding objects as I take the drawings to final check before the drawings go for issue, or have to make changes to the drawings... and its beginning to drive me potty :ugly:
I guess my question is really 2

1. Is there any way to highlight objects that are not drawn "bylayer" so they are easier for me to find.
2. To stop the engineers questioning company standards, I need to explain why we have to draw bylayer... any advice please.

Thanks in advance
Tracey :-)
Thanks for explaining the word "many" to me, it means a lot.

BREZI

  • Guest
Re: "BYLAYER"
« Reply #1 on: October 26, 2006, 05:45:46 AM »
Not easy. Stop letting engineers do drawings.

Suppose a quick check is just to use the quick select command and see if entities are bylayer.

It's hard, I had the same problem, although it's got better, as we implemented cad manual 5 years ago, and engineers are only allowed to do minor cad. That has stopped the bylayer problem.

Also we have lot's af layers for just about every services, high level, low level, underground etc.. so it is easy for engineers to use the system.


jonesy

  • SuperMod
  • Seagull
  • Posts: 15567
Re: "BYLAYER"
« Reply #2 on: October 26, 2006, 06:02:56 AM »
I have no choice but to let the graduate engineers do some cad work. They tell me they are designing as they go along.... but some of the drawings are a total mess. One of my jobs is supposed to be to audit drawings, but I have to find time to do this, and every drawing I have audited so far, has had problems with some objects not being bylayer.

I have used the properties to see if the selected items are bylayer, but unless I am doing something wrong, they dont highlight the problems.

As part of the company standards we use AIA, but we have to define new layers within that system to suit our needs. In theory we have plenty of layers, but people just wont ask what layers to use if they arent sure, they just put it wherever they want, and change one of the properties to suit. :-(
Thanks for explaining the word "many" to me, it means a lot.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: "BYLAYER"
« Reply #3 on: October 26, 2006, 06:33:53 AM »
Tracey, are they at least drawn the correct color ?

I had an idea about this problem a while back, and it may be fun to fashion a solution.

Can you email one of your drawings to me ?

I'll have a look at it tomorrow if you like.
kdub in one timeline.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<-

jonesy

  • SuperMod
  • Seagull
  • Posts: 15567
Re: "BYLAYER"
« Reply #4 on: October 26, 2006, 06:47:25 AM »
Thanks Kerry...

They seem to be the correct colours.

I'll see if I can find a small one that has this problem.

I'll take you up on that very generous offer :-)
Thanks for explaining the word "many" to me, it means a lot.

CADaver

  • Guest
Re: "BYLAYER"
« Reply #5 on: October 26, 2006, 07:03:14 AM »
1. Is there any way to highlight objects that are not drawn "bylayer" so they are easier for me to find.
I'm sure some of the lispy gurus here will have a very elegant solution to this shortly, but in the mean time, XREF it into an empty file and change the layer colors to something dark like 250.  The offending elements should stick out like a sore thumb.

2. To stop the engineers questioning company standards, I need to explain why we have to draw bylayer... any advice please.
After you've done the XREF thingie above, call the idio... ummm.... uhhh... engineer over and tell him to go fix his drawing 'cuz you can't use it as an xref like this, (whether you need to or not) and let him know that if he drew to company standards, his wasting of several hours could have been avoided.

Compliance to standards is made easier when its invisible to the users.  We use hundreds of macros and functions to control our layering, all of it under the user's radar.  The designer just needs to focus on his design and let the system control everything else.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15567
Re: "BYLAYER"
« Reply #6 on: October 26, 2006, 07:17:17 AM »
Randy, I'd love for the companys standards to be automatically incorporated into everything they draw, but I get no time to develop routines that will end up saving money (unfortunately all my time has to be billable). Some of the things I have introduced have been created by me in my personal time, with lashings of help form the gurus here, but I cant keep begging for free routines, and they cant expect me to keep providing stuff that'll help them if they dont give me the time to do it.
Thanks for explaining the word "many" to me, it means a lot.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: "BYLAYER"
« Reply #7 on: October 26, 2006, 07:29:48 AM »
Not elegant but may work for you.
Limited testing. 8-)

Code: [Select]
;; Highlite non standard objects in current space
;;   objects with color or linestyle or lineweight NOT bylayer.
(defun c:findnonstandard (/ ss i ename)
  (if
    (setq ss (ssget (list
                      '(-4 . "<OR")
                      '(-4 . "<not") ; NOT the following
                      '(62 . 256)    ; color
                      '(-4 . "not>") ; end of NOT
                      '(6 . "~Bylayer") ; linetype, not ByLayer
                      '(-4 . ">")  ; if > 0 then
                      '(370 . 0)   ; line weight not bylayer
                      '(-4 . "OR>")
                      (cons 410 (getvar "ctab")) ; current space only
                    )
             )
    )
     (progn
       (setq i -1)
       (while (setq ename (ssname ss (setq i (1+ i))))
         (redraw ename 3) ; highlite the object
       )
     )
  )
  (princ)
)
« Last Edit: October 26, 2006, 07:42:49 AM by CAB »
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.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15567
Re: "BYLAYER"
« Reply #8 on: October 26, 2006, 07:47:04 AM »
Wow, thanks CAB that goes a long way into helping me find the errors
Thanks for explaining the word "many" to me, it means a lot.

M-dub

  • Guest
Re: "BYLAYER"
« Reply #9 on: October 26, 2006, 08:50:27 AM »
Advice on how to get it through their skulls that using bylayer is important...
Tell them to go into one of their worst creations and change the colour of the text layer to yellow.  Then show them how much easier it could have been if they had simply drawn everything BYLAYER.  Yes, they can use QSELECT, etc. to select all of the text, etc. but the standard is there for a reason... not just 'because'.
My only other advice would be to send each and every single drawing back to the offender and tell them to put everything back to bylayer, then resubmit it to you.  If they only do CAD occasionally and their skill level with AutoCAD is quite low and will likely never increase that much, chances are that they will never truly understand the benefit, so when they ask "Why is it so important to you?!" in their whiney voice, just tell them "Because it is..."

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: "BYLAYER"
« Reply #10 on: October 26, 2006, 08:55:28 AM »

2. To stop the engineers questioning company standards, I need to explain why we have to draw bylayer... any advice please.
After you've done the XREF thingie above, ......

I could have sworn that Tracey said this, not Mick ... 
« Last Edit: October 26, 2006, 08:56:46 AM by Kerry Brown »
kdub in one timeline.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<-

jonesy

  • SuperMod
  • Seagull
  • Posts: 15567
Re: "BYLAYER"
« Reply #11 on: October 26, 2006, 08:59:08 AM »
I must've said it in a deep voice :-D
Thanks for explaining the word "many" to me, it means a lot.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: "BYLAYER"
« Reply #12 on: October 26, 2006, 09:01:59 AM »
 :angel:

I know Mick, so I'm not allowed to comment on that ...   :evil:
kdub in one timeline.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<-

dan19936

  • Guest
Re: "BYLAYER"
« Reply #13 on: October 26, 2006, 09:05:31 AM »
I just quickly change all layers to color 250 (basically black) and most non BYLAYER colors pop right out.  I'm old school so it's command line LA C 250 * (enter twice) - no slow dialog. Then zoom in and change back to previous layer state. You could make a toolbar button with that quick one.

Dan

(oh yeah - my pgp has LA as -LAYER for command line not dialog, use -LA for generic acad.)
« Last Edit: October 26, 2006, 09:08:55 AM by dan19936 »

daron

  • Guest
Re: "BYLAYER"
« Reply #14 on: October 26, 2006, 09:14:40 AM »
Check out where the comment from Cadaver, quoting mick comes from. here

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: "BYLAYER"
« Reply #15 on: October 26, 2006, 09:32:11 AM »
Check out where the comment from Cadaver, quoting mick comes from. here

Yes daron, the link is to a post of Micks, the quote is Joney's.
... but I'm sure there will be a rational reason for it :-)



 
kdub in one timeline.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<-

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: "BYLAYER"
« Reply #16 on: October 26, 2006, 09:53:18 AM »
I have expierence this before in my previous job as a Manufacturing Engineer but on the paper work side of processing the job.  I know your frustration.

Advice on how to get it through their skulls that using bylayer is important...
Tell them to go into one of their worst creations and change the colour of the text layer to yellow.  Then show them how much easier it could have been if they had simply drawn everything BYLAYER.  Yes, they can use QSELECT, etc. to select all of the text, etc. but the standard is there for a reason... not just 'because'.
  Quick Select and CAB's routine will be your friends.  I Cant agree more for a beginning step

My only other advice would be to send each and every single drawing back to the offender and tell them to put everything back to bylayer, then resubmit it to you.
  Second Step.  M-Dub, Jonesy will need the speak softly  and carry the big stick of management.  If she doesn't have support of management, she will never be able to get any changes done with the engineers.  If you don't have the big stick you are wasting your time.

If they only do CAD occasionally and their skill level with AutoCAD is quite low and will likely never increase that much, chances are that they will never truly understand the benefit, so when they ask "Why is it so important to you?!" in their whiney voice, just tell them "Because it is..."
  The ultimate solution would be to enforce the standards through Customization.  That way the engineers can "design" <cough> and not worry about standards.  And you wont have to fight the new engineers that come on board.

My 2 cent opinion from my experience.  Convince management first then go after the offenders.  Management may even allow you to bill some time to customization.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

chance

  • Guest
Re: "BYLAYER"
« Reply #17 on: October 26, 2006, 09:57:35 AM »
2. To stop the engineers questioning company standards, I need to explain why we have to draw bylayer... any advice please.

I worked for a firm in Camden,NJ....lovely spot....since it was by the waterfront and influenced heavily by cartels from South America....we would put the feet in concrete and then the concrete would go in the water....worked every time....but then again it was Camden....feel your pain when it comes to people question standards.....you could go to the top and ask for privileges to be revoked....like no IM or surfing the net....but then you might find your feet in concrete...good luck

Bryco

  • Water Moccasin
  • Posts: 1879
Re: "BYLAYER"
« Reply #18 on: October 26, 2006, 10:39:55 AM »
I saw quick select mentioned. With a simple test, it looks like you can do modelspace in one swoop.
Quick select->
Apply to entire drawing->
Object type=Multiple->Properties=Color->
Operator=<>Not Equal->
Value-> ByLayer

Now that they are all selected  set color in the properties window to ByLayer.

It seems that layouts need to be worked on one at a time though.

pmvliet

  • Guest
Re: "BYLAYER"
« Reply #19 on: October 26, 2006, 11:03:56 AM »
I feel your pain as well...
If they are breaking the company standard, I would just start documenting it and start logging how much time it is taking to fix. That is if it is your responsiblity to fix the issues.

Once you get a sizable amount of fixing time, go to your boss with an excel spreadsheet listing the drawings and how much time it is taking you to fix errors. You need to put it in terms of dollars so the higher up people can understand it.

The other side of the coin would be to have a routine that would automatically take all objects in a drawing and set all the properties to "Bylayer". You could even just have it in your back pocket and send a company wide memo that this routine will automatically run every 5 days on all drawings. Make it clear in your memo what this routine does, the reason for it and I am sure you will get some heads to turn. The people who complain are going to be your "bad eggs"...

Pieter

Didge

  • Bull Frog
  • Posts: 211
Re: "BYLAYER"
« Reply #20 on: October 26, 2006, 12:22:10 PM »
I would've agreed with most of the pro- "BYLAYER" comments here but after running CAB's utility on my latest drawing I feel somewhat ashamed of my own work.

WHERE DID ALL THOSE "NON-STANDARD" entities come from !!!!

CAB:  I suggest you add a percentage score and re-title it "How_Good_is_my_Draughting"  :wink:
Think Slow......

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: "BYLAYER"
« Reply #21 on: October 26, 2006, 12:36:19 PM »
CAB:  I suggest you add a percentage score and re-title it "How_Good_is_my_Draughting"  :wink:

Most excellent Idea.

We subscribe to the By-Layer religion as well.  Most of our layers will use only one line type.  for the few individual entities  that need a different line type we just over ride the line type.  If I was to guess on a typical floor plan for an office I would say dozen entities are overridden when compared next to thosands of entities that are by-layer in a file.  But I would need a Cabs routine to know for sure.   :-D :-D :-D
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

jonesy

  • SuperMod
  • Seagull
  • Posts: 15567
Re: "BYLAYER"
« Reply #22 on: October 26, 2006, 12:40:06 PM »
The only thing the users here are supposed to over-ride is the linetype, and that is only when its for road markings... everything else should be bylayer.
Thanks for explaining the word "many" to me, it means a lot.

CADaver

  • Guest
Re: "BYLAYER"
« Reply #23 on: October 26, 2006, 07:15:27 PM »
Check out where the comment from Cadaver, quoting mick comes from. here

Yes daron, the link is to a post of Micks, the quote is Joney's.
... but I'm sure there will be a rational reason for it :-)

A missed "copy" in this thread and a misplaced "paste" from a previous thread post.  Flog me.... please.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: "BYLAYER"
« Reply #24 on: October 26, 2006, 09:40:34 PM »
Have a play Tracey.
This will isolate entities drawn ByColor to new layers named for the Color.

May be easier to make changes from there.
Code: [Select]
(DEFUN c:seocl () (selecteverythingoncurrentlayer))
;;
(DEFUN selecteverythingoncurrentlayer (/ ss)
  (IF (SETQ ss (SSGET (LIST (CONS 8 (GETVAR "CLAYER")))))
    (COMMAND ".select" ss "")
  )
  (PRINC)
)



(DEFUN c:febc () (findentsbycolor))
;;
(DEFUN findentsbycolor (/
                        ;;
                        s:iacadlayers
                        ;;
                        _assertitem           _selset=>enames
                        _moveenttolayerwithcolor
                       )
  ;;
  ;; codehimbelonga kwb@TheSwamp
  ;;
  ;; Define layers collection Object
  (SETQ
    s:iacadlayers (VLA-GET-LAYERS
                    (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT))
                  )
  )
  ;;
  ;;-------------------------------------------------------------
  ;; Ensure item exists in collection
  ;;
  (DEFUN _assertitem (collection item / returnvalue)
    (IF (NOT (VL-CATCH-ALL-ERROR-P
               (SETQ
                 returnvalue (VL-CATCH-ALL-APPLY 'VLA-ITEM
                                                 (LIST collection item)
                             )
               )
             )
        )
      returnvalue
    )
  )
  ;;
  ;;-------------------------------------------------------------
  ;; convert SELECTION set to LIST of e-names
  ;;
  (DEFUN _selset=>enames (sel / l len)
    (IF (= 'pickset (TYPE sel))
      (REPEAT (SETQ len (SSLENGTH sel))
        (SETQ len (1- len)
              l   (CONS (SSNAME sel len) l)
        )
      )
    )
  )
  ;;
  ;;-------------------------------------------------------------
  ;; Move entity to layer named by it's color
  ;;
  (DEFUN _moveenttolayerwithcolor (ename / o-ename layername o-layer)
    ;;
    ;; Convert ename to Object
    ;; Determine suitable LayerName
    ;;
    (SETQ o-ename   (VLAX-ENAME->VLA-OBJECT ename)
          layername (STRCAT "_BYCOLOR_" (ITOA (VLA-GET-COLOR o-ename)))
    )
    (IF (NOT (SETQ o-layer (_assertitem s:iacadlayers layername)))
      (PROGN ;;
             ;; Add the Layer to the Layer Collection
             ;;
             (SETQ o-layer (VLA-ADD s:iacadlayers layername))
             ;;
             ;; Set the Layer color
             ;;
             (VLA-PUT-COLOR o-layer (VLA-GET-COLOR o-ename))
      )
    )
    (IF o-layer
      ;;
      ;; put the object on the layer
      ;;
      (PROGN (VLA-PUT-LAYER o-ename layername)
             (PROMPT (STRCAT "\n Moved entity to Layer " layername))
      )
      ;; else
      (PROMPT (STRCAT "\n Unable to assign entity to Layer " layername)
      )
    )
  )
  ;;
  ;;-------------------------------------------------------------
  ;;
  ;; Main Entry Point
  ;;
  ;;
  ;;
  (IF (SETQ enameslist (_selset=>enames
                         (SSGET (LIST '(-4 . "<not")
                                      '(62 . 256)                ; BYcolor
                                      '(-4 . "not>")
                                      (CONS 410 (GETVAR "ctab")) ; In the Current space only
                                )
                         )
                       )
      )
    (FOREACH ename enameslist
      (_moveenttolayerwithcolor ename)
      (REDRAW ename 3)                                           ; highlight the ent
    )
  )
  (PRINC)
)
(PROMPT
  "\n c:FEBC < Find Ents by color >  and \n c:SEOCL < Select Everything on current layer >\n"
)
(PRINC)

« Last Edit: October 26, 2006, 09:41:51 PM by Kerry Brown »
kdub in one timeline.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<-

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: "BYLAYER"
« Reply #25 on: October 26, 2006, 09:46:43 PM »
And the obligatory piccy ..

kdub in one timeline.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<-

Big G

  • Bull Frog
  • Posts: 415
Re: "BYLAYER"
« Reply #26 on: October 27, 2006, 02:21:33 AM »
what about removing the 'color' toolbar from the screen leaving only the layer one.....might eliminate some of the random colour changes, agreed they could still change the colour from the layer DIA but it would be easier to just pick the appropriate layer

(aps. if you have already thought of this)
I thought i seen the light at the end of the tunnel. But it was just someone with a torch bringing me more work.
"You have to accept that somedays youre the pigeon and  somedays youre the statue"

jonesy

  • SuperMod
  • Seagull
  • Posts: 15567
Re: "BYLAYER"
« Reply #27 on: October 27, 2006, 02:50:57 AM »
Thanks Big G... I hadn't thought about that method. BUT I'm gonna give Kerry's routine a try in a couple of minutes.

By proving the engineers are consistently doing it wrong, it might add credence to a purely cad team (which is the way they said they wanted to run)
Thanks for explaining the word "many" to me, it means a lot.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15567
Re: "BYLAYER"
« Reply #28 on: October 27, 2006, 03:14:27 AM »
Thanks Kerry, that works a treat.

Thanks for explaining the word "many" to me, it means a lot.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: "BYLAYER"
« Reply #29 on: October 27, 2006, 03:46:10 AM »
Great! I thought it would suit you ... Could do with a little refinement but seems like a good start.
kdub in one timeline.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<-