Layer states - per drawing only?

To keep layer states settings for all drawings, is it necessary to write them into the template dwg? Or is there a setting to make them persist for every drawing?
thanks

Comments

  • interesting question, and templates are a nice idea, but I tell people to focus on how to get a drawing "in shape" whenever you need to.
    What you don't want is to tell people "never purge your drawing...".
    I see it happen all the time, and its the sign of an only semi-competent cad manager.
    You simply cannot prevent people from cleaning their drawings, and should not try to.
    Of course, there are limits to this, as you should not define a bunch of blocks then run purge all 10 seconds later.
    You should have those inserted somewhere in some drawing for later if they did get purged.
    Anyway, the better way is to make tools that import anything needed, whenever needed.
    Then no bad feelings about asking users how they started the drawing, why they are criminals for purging a drawing, and so on, don't do it.
    I recommend lisp for this, and anyone attempting to run things with templates has the skills to learn super basic lisp.
    For layer states, investigate the -LA command and notice you can import from a drawing.
    You would lisp that up with a command statement like:
    (command "-layer" "a"....) and so on.
    You could make a key-in to run that fast like:
    (defun c:STI () (command "-layer" "a"....) (princ))

    I've done stuff like this for about every type of thing you would want to pull in, and use everything from scripts, lisp, and even .net for super exotic things and settings. I don't expect cad managers to learn .net, but scripts and lisp, yes.
    Should you care what I think? Probably, as I have worked with many companies and cad managers even before bricscad was a thing.
    Its all about living in harmony with users, not over controlling them or expecting perfection.
    Template based living is sensitive, and fine to provide, but not great if that is all you provide.
    thx

  • Thanks, I think I get it. Templates have been a bit of a problem for me as well. I think I've got them dialed in, but then an old drawing shows up without those settings and I'm back to square 1, re setting everything. More research/work required on my end for sure to start with Lisp.
    cheers

  • MDunn
    edited April 2021

    ScottC,
    You got me w/ the “for all drawings” part; as James intimated, that there, is a very rare animal.
    It has been my experience, & it sounds like James is in agreement w/ this, as “for all drawings”, there is always an exception to the rule.
    As mentioned, you can create all sorts of lisp routines for turning settings or command options on/off. Most committed to memory, but a few I have on sticky notes literally hanging off my monitor for those I use every few months or maybe once a yr. & have not yet committed to memory. Just noticed many could be taken down now.
    Here’s one, I don’t care to see the lineweight while editing, & only have this problem when getting dwgs from vendors or opening very old dwgs previously untouched by me. Created a lisp routine to do that:

    defun c:LWD0()              ;LWD0 @ command line launches routine
    (Command "LWDISPLAY" "0")   ;LWDISPLAY OFF 0 
    (princ "\n\t     LWDEFAULT OFF")    ;Comment @ routine completion
    (princ)                 ;No Nil returned
    )                       ;Ends LWD0
    

    Or something like dims, which I rarely use in electrical dwgs, but when needed I insert a block w/ various predefined dim settings depending on the scale needed. Explode the block & pick the dim I need, make it the default, & life is good.
    Did this next one many yrs. ago, when an oil company CAD Standard required specific linetypes, layers, fonts, etc. included in EVERY dwg, regardless of being used or not. Back then we were concerned about file size, so purge was used religiously; & purging 150 different items w/ a yes/no answer was too tedious. Created a block w/ all the pertinent items & made it a pinpoint in size & inserted it into the company title block so the “needed” items were not purged. Saved a ton of time & aggravation as I were doing 150 ladder logic dwgs @ a time on a continuous basis.
    Another: Lisp routine (VZ) that creates a view of the Title & Rev blocks, which are the first things edited, & restores that view for editing those blocks. No more zoom, window, clickity, click; “VZ” & we are ready to edit both. Use this every day for every dwg I edit.
    Also have one for the Ref block (VF).
    Hope this helps. Let me know if I can help get you going w/ some of this. James would be an excellent source of help, even much more versed in lisp than myself.
    Mike

  • So I'm hearing be flexible - not rigid with your drawings. If they need something, bring it in with lisp. I do have a few lisp files and my challenge has been mostly keeping track of where they are and not losing them or their buttons when installing a new version of BC. Good information though and I will move in that direction more. Thanks!

  • I like the conversation here. MDunn, I also keep some blocks to facilitate some set-up. One has a set of custom line-types. It is made of lines, with each line labeled and set to a linetype. Another has a set of dimensions, each with a dimension style I often use.
    Though, drawing sets have proven to be a problem. On my version 14, these have limits on what you can create in programming.

    -Joe

  • While we are talking, one tool that goes a long way toward copying and psting standard stuff is the WTIT.lsp.
    Open it to see the commands. Its for acad and bcad both.
    It has what I call "local" copy and paste which does not use the clipboard so much superior to ctrl-c and cltrl-v.
    It has several variations like WTP in ITP to use a point instead of 0,0.

    The bigger thing is it has "Network" copy and paste. Edit the file to some folder on your network and you can share with anyone.
    You can WTN, give a name like StdWater1, and pick some stuff.
    Anyone can ITN, type StdWater1, and get that stuff.
    Variations of that too.

    The point is the stuff stays forever until overwritten. No more sending small drawings back and forth in email. Just use the WTN and ITN.
    This is just one example of systems that solve long time annoying things in cad. I have many more from hanging out with cad people through the years.

  • @James Maeding I want to thank you and say I almost cannot work without wtit.lsp now, ever since you shared around this forum about a year ago. Simple and so useful. I find myself using wtt most frequently and have added a wttp variant, and tweaked the pick-related cousins to all use temp.dwg (abandoning tempp.dwg) because I often insert the same stuff at a chosen location in one file but at the origin in another.