See the top rated post in this thread. Click here

Page 1 of 3 123 LastLast
Results 1 to 10 of 40

Thread: LISP routine to overwrite layer descriptions...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Active Member
    Join Date
    2006-08
    Location
    Southern California
    Posts
    52
    Login to Give a bone
    0

    Question LISP routine to overwrite layer descriptions...

    I've done several searches for a commands and/or LISP routine to overwrite an existing layer description with the same layer and description found in another file.

    My process:
    I have several files containing standard layers that are being updated as information is processed (Casework, Equipment, Furniture, etc.). I insert these files, when updated, into several main files (Level 1, 2, 3, etc.) to add, delete or replace layers. The use of the layers is to control my blocks and their visibility through the layer manager; hide all Casework or hide all base cabinets that are 30" tall, etc. The layer description is important because it gives the user an understanding of what the layer is specifically used for; layer 'CW-30-BC B3' has a layer description of 'Casework: 30" - Base Cabinet - (11" & 30")'.

    Should this layer description need to be updated from 'Casework: 30" - Base Cabinet - (11" & 30")' to 'Casework: 30" - Base Cabinet - (12" & 28")' I would like to insert the file containing the correct layer descriptions and overwrite the current layer descriptions. The current 'insert' function only overwrites the layer name, however, the layer description remains unchanged.

    Note: Using the Design Center to add or overwrite layers, using Layer Translator (laytrans), or using Layer Standards (.dws) have only edited the layer name, and layer properties, these commands have not edited the layer description.

    Anything you can offer to get me started is greatly appreciated.

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    1

    Default Re: LISP routine to overwrite layer descriptions...

    Quote Originally Posted by dortega4269 View Post
    I have several files containing standard layers that are being updated as information is processed (Casework, Equipment, Furniture, etc.). I insert these files, when updated, into several main files (Level 1, 2, 3, etc.) to add, delete or replace layers....
    Not that this couldn't be done with some custom code, but to get at the root issue here... If I understand you correctly, you're currently inserting your new template into your existing drawing(s)... What happens when you insert your existing drawing(s), into a new, empty drawing created from your new template?

    Cheers



    [Edit] - To save others from making duplicate responses:

    http://www.cadtutor.net/forum/showth...r-descriptions...

    http://www.theswamp.org/index.php?to...4528#msg524528
    Last edited by BlackBox; 2014-07-21 at 04:52 PM.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Active Member
    Join Date
    2006-08
    Location
    Southern California
    Posts
    52
    Login to Give a bone
    0

    Default Re: LISP routine to overwrite layer descriptions...

    Quote Originally Posted by BlackBox View Post
    What happens when you insert your existing drawing(s), into a new, empty drawing created from your new template?
    Thanks for the quick reply BlackBox, the layer names would be overwritten/updated, however, due to the file size and 3D content, inserting the entire drawing into a new template takes several minutes and I would need to do this with several drawings. Not to mention I would be forced into inserting all of my xrefs again.

    Below are all of my layer templates. Each control several items using the predefined layers and layer descriptions.
    Layer Templates.jpg

    Thanks for the added links, great idea...
    Last edited by dortega4269; 2014-07-21 at 05:03 PM. Reason: added image and additional information

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

    Default Re: LISP routine to overwrite layer descriptions...

    Wouldn't a Standards (DWS) file take care of that without any coding?

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

    Default Re: LISP routine to overwrite layer descriptions...

    Quote Originally Posted by Tom Beauford View Post
    Wouldn't a Standards (DWS) file take care of that without any coding?
    Ahh yes good point! (didn't even think of that)

    That should work, if you have proper DWS files updated the way you want them, you could update the target drawings that way.

    Good call Tom.

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: LISP routine to overwrite layer descriptions...

    Quote Originally Posted by dortega4269 View Post
    ... the layer names would be overwritten/updated, however, due to the file size and 3D content, inserting the entire drawing into a new template takes several minutes and I would need to do this with several drawings.
    Correct, and that helps to explain why you opted not to follow the typical procedure; this old routine will (re-)create layers based on a source, regardless of if they already exist or not.



    Quote Originally Posted by dortega4269 View Post
    Not to mention I would be forced into inserting all of my xrefs again.
    Incorrect; inserting a drawing into another drawing includes any external references to the former.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  7. #7
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: LISP routine to overwrite layer descriptions...

    *Someone* didn't read the fine, red print in the OP.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

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

    Default Re: LISP routine to overwrite layer descriptions...

    Quote Originally Posted by BlackBox View Post
    *Someone* didn't read the fine, red print in the OP.

    Well I stand behind my original suggestion then...

  9. #9
    Member
    Join Date
    2014-07
    Posts
    8
    Login to Give a bone
    0

    Default Re: LISP routine to overwrite layer descriptions...

    I'd be interested in a race BB.

  10. #10
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: LISP routine to overwrite layer descriptions...

    Quote Originally Posted by john.kaul677093 View Post
    I'd be interested in a race BB.
    Good to see you here, welcome to AUGI! (Shh, I won't tell)

    I'm intrigued; so what shall we race to do exactly?
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Page 1 of 3 123 LastLast

Similar Threads

  1. Special Layer Freeze LISP Routine
    By dbanker in forum AutoLISP
    Replies: 10
    Last Post: 2017-08-11, 12:32 PM
  2. Layer Color Change LISP Routine
    By guardianfiredesign774457 in forum AutoLISP
    Replies: 19
    Last Post: 2013-08-28, 05:08 AM
  3. Add layer command line to a lisp routine
    By BrianTFC in forum AutoLISP
    Replies: 1
    Last Post: 2012-02-02, 07:47 AM
  4. Layer creation lisp routine?
    By boeris9333 in forum AutoLISP
    Replies: 10
    Last Post: 2009-10-05, 11:24 AM
  5. Lisp routine help, Layer check problem
    By Craig.Baldie in forum AutoLISP
    Replies: 6
    Last Post: 2007-10-12, 06:27 AM

Posting Permissions

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