Results 1 to 9 of 9

Thread: Copy Layer but Freeze in Viewports

  1. #1
    Member
    Join Date
    2009-09
    Location
    Elkhart, IN
    Posts
    5
    Login to Give a bone
    0

    Default Copy Layer but Freeze in Viewports

    Short way of saying what I want to do is, import a layer where it will be already frozen in all existing viewports (faster than freezing in each viewport).

    Long explanation:

    We use template-style .dwg files to create individual product drawings where things like layers are already set up. Every once in a while we come up with a need for a new layer to use on new and often, existing drawings. On our 'base template' drawings, it's easy enough to create the new layer, and set the layer to be frozen or not on the individual viewports for all new drawings. The problem is bringing in the new layer to existing drawings. In the past, I've just copied and pasted a layer into the older (existing) drawings. This means though, that the layer is turned on in all viewports which is not desired. So I have been manually shutting off the individual viewports where they're not wanted. This is getting cumbersome, however as the number of existing files, tabs, and viewports is becoming larger and larger.

    I've seen several ways this process CAN be done, other than the way I'm doing it, but I'm not proficient in areas like using layer states, etc... so I can't make an informed decision on how to make this the easiest process possible.

  2. #2
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,491
    Login to Give a bone
    0

    Default Re: Copy Layer but Freeze in Viewports

    Quote Originally Posted by vweavers View Post
    Short way of saying what I want to do is, import a layer where it will be already frozen in all existing viewports (faster than freezing in each viewport).

    Long explanation:

    We use template-style .dwg files to create individual product drawings where things like layers are already set up. Every once in a while we come up with a need for a new layer to use on new and often, existing drawings. On our 'base template' drawings, it's easy enough to create the new layer, and set the layer to be frozen or not on the individual viewports for all new drawings. The problem is bringing in the new layer to existing drawings. In the past, I've just copied and pasted a layer into the older (existing) drawings. This means though, that the layer is turned on in all viewports which is not desired. So I have been manually shutting off the individual viewports where they're not wanted. This is getting cumbersome, however as the number of existing files, tabs, and viewports is becoming larger and larger.

    I've seen several ways this process CAN be done, other than the way I'm doing it, but I'm not proficient in areas like using layer states, etc... so I can't make an informed decision on how to make this the easiest process possible.
    I'm not sure the best way to do this either, we (AUGI) may need more information...

    Are you freezing the layer(s) or turning them off? (there's a difference)

    How is this done in your templates? (vpoverides or simply freezing [or turning off] through the viewports)?

    What do your drawings look like?
    Model Space geometry with lots of layout tabs and viewports?
    Xrefs?

    Maybe if we had more info, you can get better help.
    I don't do allot with vpoverrides, but others may.
    Thinking a lisp could help too...

    Just some thoughts

  3. #3
    Member
    Join Date
    2009-09
    Location
    Elkhart, IN
    Posts
    5
    Login to Give a bone
    0

    Default Re: Copy Layer but Freeze in Viewports

    I'm freezing the layer in the individual viewports.

    I create the part in model space, and each customer gets it's own tab that may has information on individual layers (could be notes, dimensions, additional modifications, etc) turned on or off in the corresponding viewports. The average part has four tabs with 3 viewports each tab. We have about 800 current parts and growing...so it's a large task to change that many tabs and viewports when adding a layer.
    Maybe 10% of drawings have an Xref- usually an inserted block with a scan/photo.

    I'm not familiar either with using vpoverrides, or lisps for that matter...it's not that I'm afraid to learn, but with ACAD sometimes the learning curve is higher than what you get out of it. There appears to be several ways it COULD be done, but without the knowledge of which is easier/better, I'm trying to rely on others recommendations on how to best use my time in resolving this.. especially as this is likely not a one-time problem.

    Hope that helps.

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,646
    Login to Give a bone
    0

    Default Re: Copy Layer but Freeze in Viewports


  5. #5
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,491
    Login to Give a bone
    0

    Default Re: Copy Layer but Freeze in Viewports

    Quote Originally Posted by vweavers View Post
    I'm freezing the layer in the individual viewports.

    I create the part in model space, and each customer gets it's own tab that may has information on individual layers (could be notes, dimensions, additional modifications, etc) turned on or off in the corresponding viewports. The average part has four tabs with 3 viewports each tab. We have about 800 current parts and growing...so it's a large task to change that many tabs and viewports when adding a layer.
    Maybe 10% of drawings have an Xref- usually an inserted block with a scan/photo.

    I'm not familiar either with using vpoverrides, or lisps for that matter...it's not that I'm afraid to learn, but with ACAD sometimes the learning curve is higher than what you get out of it. There appears to be several ways it COULD be done, but without the knowledge of which is easier/better, I'm trying to rely on others recommendations on how to best use my time in resolving this.. especially as this is likely not a one-time problem.

    Hope that helps.
    There may be a better way to achieve what you're trying to do, but here's my take on it.
    What you are doing can be achieved on the command line (using the vplayer command) if you know what the "newly added" layer name is.

    Quite simply you can freeze the new layer in all viewports:
    command: vplayer - freeze - <type your layer name> - all - <enter>

    And you can thaw that layer in selected viewports:
    command: vplayer - thaw - <type your layer name> - select - <select your viewports> - <enter>

    And if you're interested, here's a little (crude) lisp routine that will do what I described above:
    After you appload the routine the commands are (in red) and follow the prompts on the command line:
    FNL (freeze new layer)
    TNL (thaw new layer)
    Code:
     
    ;;new layer in viewport
    
    (defun c:fnl (/ lyrname)
    (setq lyrname (getstring "New Layer Name?"))
    (command "vplayer" "f" lyrname "all" "")
    (princ)
    )
    
    (defun c:tnl (/ lyrname vprts)
    (setq lyrname (getstring  "New Layer Name?"))
    (setq vprts (ssget (prompt "Select Viewports")))
    (command "vplayer" "t" lyrname "S" vprts "" "")
    (princ)
    )
    Or.. if you want to do it all in one routine which may be easier, only need to type the new layer once:
    NLYR (new layer)
    Code:
    ;;new layer in viewport all-in-one
    
    (defun c:nlyr (/ lyrname vprts)
    (setq lyrname (getstring  "New Layer Name?"))
    (setq vprts (ssget (prompt "Select Viewports")))
    (command "vplayer" "f" lyrname "all" "")
    (command "vplayer" "t" lyrname "S" vprts "" "")
    (princ)
    )
    Like I said, these routines are basic, and there's probably a cleaner way, but these do work.
    Hope this helps.

  6. #6
    Member
    Join Date
    2009-09
    Location
    Elkhart, IN
    Posts
    5
    Login to Give a bone
    0

    Default Re: Copy Layer but Freeze in Viewports

    Ted, Your second LISP routine worked GREAT with one exception- I could only choose the viewport(s) to remain thawed on the Tab I'm working on. Do you know if there's any way to move to another Tab to select other viewports while in the command? If not, that's still a big help!! Kudos~

  7. #7
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,491
    Login to Give a bone
    0

    Default Re: Copy Layer but Freeze in Viewports

    Quote Originally Posted by vweavers View Post
    Ted, Your second LISP routine worked GREAT with one exception- I could only choose the viewport(s) to remain thawed on the Tab I'm working on. Do you know if there's any way to move to another Tab to select other viewports while in the command? If not, that's still a big help!! Kudos~
    Glad it worked for you.

    Not sure how you can do that(?)

    I noticed that if you run the second LISP, it re-freezes the layer in all viewports, and I'm sure you don't want that.

    You could use the first LISP routine where the first command (FNL) freezes the layer in all the viewports, and just keep running the second command (TNL) to thaw them out per viewport, per layout.

    Maybe someone out there can add to this?

    I'll ponder it some more too.


  8. #8
    Member
    Join Date
    2009-09
    Location
    Elkhart, IN
    Posts
    5
    Login to Give a bone
    0

    Default Re: Copy Layer but Freeze in Viewports

    I thought about using the first routine's TNL on the other tabs... I haven't begun tackling the updating of the drawings yet, so I've got a few days perhaps before using it... so maybe someone else might be able to add to the ideas...

  9. #9
    I could stop if I wanted to
    Join Date
    2008-03
    Posts
    383
    Login to Give a bone
    0

    Default Re: Copy Layer but Freeze in Viewports

    You could also try using Layer State Manager, each layer state will be specific to a certain layout.

Similar Threads

  1. 2014: New Layer .... Freeze in all new viewports
    By tim_newsome in forum AutoCAD General
    Replies: 3
    Last Post: 2014-06-16, 02:43 PM
  2. Layer freeze in ALL viewports
    By matthew.g in forum ACA/AMEP Tips & Tricks
    Replies: 2
    Last Post: 2009-01-16, 04:32 PM
  3. Copying Viewports & Layer Freeze
    By lmnop in forum AutoCAD General
    Replies: 2
    Last Post: 2008-01-27, 11:02 AM
  4. Replies: 3
    Last Post: 2008-01-17, 01:08 PM
  5. Freeze in all viewports
    By cboisvert in forum AutoCAD General
    Replies: 6
    Last Post: 2005-05-17, 10:56 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •