+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Aug 2012
    Posts
    12

    Default Change plot style of multiple blocks to bylayer

    Registered forum members do not see this ad.

    Hi,

    I need a lisp routine to change the plot style of blocks in my drawing to 'bylayer' rather than the selected plot styles that they have been put on when they were created (by others). I would really appreciate if anyone had a lisp routine that would do this easily as there are many blocks in my drawings that need to be changed and going through the block editor is very time consuming.

    I have a lisp routine that can change the colour to one of my choosing but as I am not very good at lisp I do not know how to edit it to do the plot style rather than colour.

    Any help is greatly appreciated.

  2. #2
    Forum Deity rkent's Avatar
    Computer Details
    rkent's Computer Details
    Operating System:
    WIN7 PRO 64bit
    Computer:
    Dell Precision T7500
    CPU:
    Xeon Dual Core E5503 2.0Ghz
    RAM:
    6GB DDR3 ECC SDRAM, 1333MHz, 6x1GB
    Graphics:
    nVidia Quadro 3800
    Primary Storage:
    300Gb, 10K rpm
    Monitor:
    Dell 24" FS (2x)
    Discipline
    Mechanical
    rkent's Discipline Details
    Occupation
    Facilities Design - Semi-conductor manufacturing
    Discipline
    Mechanical
    Details
    Designer: Process Piping, P&ID's, Machine Part Design, Planning / General Arrangement. Facilities Management. Drafting: Electrical, Controls, Architectural.
    Using
    Mechanical 2014
    Join Date
    Nov 2007
    Location
    Lat:35, Long:-106, Elev: 5164'
    Posts
    3,375

    Default

    Use the SETBYLAYER command, Settings to pick what you want set to bylayer.
    "You are entitled to your own opinion but you are not entitled to your own facts." Daniel Patrick Moynihan

  3. #3
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Aug 2012
    Posts
    12

    Default

    Thanks for the reply, but I did try to use the SETBYLAYER command afetr reading another thread but it did not work.
    I went to SETBYLAYERMODE and chose the integer as 16 which changes all of the entities in my drawing to BYLAYER but for blocks that have the plotstyle set within the block editor as a particular style did not change. I don't know if I am doing something wrong but it didn't seem to be able to do what i was after. The blocks are still showing up as the different plotstyles when I go to print and I think this is because it is plotting off of the nested style rather than the layer that they are on within my drawing.

    I think I need a lisp that will go into each block and change the plotstyle within the block. As i said I have one that does this exact thing for me but with the colour rather than the plotstyle, I just don't know how to convert it or write a new one to do what I need.

  4. #4
    Senior Member nod684's Avatar
    Computer Details
    nod684's Computer Details
    Operating System:
    Windows 7 Home
    Discipline
    Architectural
    Using
    AutoCAD 2010
    Join Date
    Jul 2012
    Location
    Singapore
    Posts
    232

    Default

    Quote Originally Posted by Cazza View Post
    Thanks for the reply, but I did try to use the SETBYLAYER command afetr reading another thread but it did not work.
    I went to SETBYLAYERMODE and chose the integer as 16 which changes all of the entities in my drawing to BYLAYER but for blocks that have the plotstyle set within the block editor as a particular style did not change. I don't know if I am doing something wrong but it didn't seem to be able to do what i was after. The blocks are still showing up as the different plotstyles when I go to print and I think this is because it is plotting off of the nested style rather than the layer that they are on within my drawing.

    I think I need a lisp that will go into each block and change the plotstyle within the block. As i said I have one that does this exact thing for me but with the colour rather than the plotstyle, I just don't know how to convert it or write a new one to do what I need.

    do you want to make the block to By Layer and By Color?

    try FixBlock.lsp
    "Memories fade but the scars still linger...."

  5. #5
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Aug 2012
    Posts
    12

    Default

    Don't worry, I had a bit more of a play around with the SETBYLAYER command and got it to work. I must have been doing something wrong the first time around.

    Thank you for your help.

  6. #6
    Forum Deity Dadgad's Avatar
    Using
    AutoCAD 2012
    Join Date
    Nov 2011
    Location
    At the confluence of worthlessness & invaluability
    Posts
    3,134

    Default

    Is your VISRETAIN variable set to 1?
    Try saving and closing the drawing, then reopen it,
    and check if it is still as you saved it, or whether those settings may have reverted to the earlier settings.
    Volume and repetition do not validate opinions forged in the absence of thought.

  7. #7
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Aug 2012
    Posts
    12

    Default

    Registered forum members do not see this ad.

    Yes my VISRETAIN is set to 1. I don't know why it wasn't working the first time that I tried but second time round it worked perfectly.

    Thanks again for the help.

Similar Threads

  1. Batch change Plot Style Table
    By baker in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 24th Jul 2012, 06:26 pm
  2. change multiple blocks at once
    By LaneClare in forum AutoCAD Drawing Management & Output
    Replies: 0
    Last Post: 10th Mar 2012, 03:57 pm
  3. Can you change multiple sheet plot settings at the same time?
    By rwhitt0724 in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 21st Sep 2011, 10:51 pm
  4. Change plot style table from none to monochrome in one hit
    By mdbdesign in forum AutoCAD General
    Replies: 6
    Last Post: 4th Mar 2011, 09:37 pm
  5. Using multiple directories with Plot Style tables
    By Autodesk in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 11th Sep 2006, 08:50 pm

Tags for this Thread

Bookmarks

Posting Permissions

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