+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Junior Member
    Discipline
    Mechanical
    kite15's Discipline Details
    Occupation
    Service
    Discipline
    Mechanical
    Details
    This is a software company working in BIM industry.
    Using
    AutoCAD 2015
    Join Date
    Oct 2015
    Location
    india
    Posts
    17

    Default Line type change in the selected blocks

    Registered forum members do not see this ad.

    I have a code please, suggest to change the line type into selected blocks
    (vl-load-com)
    (or acdoc
    (setq acdoc (vla-get-activedocument (vlax-get-acad-object))))
    (if (setq ss (ssget "_:L" '((0 . "INSERT"))))
    (repeat (setq i (sslength ss))
    (setq sn (ssname ss (setq i (1- i))))
    (if (not (member (setq name (cdr (assoc 2 (entget sn)))) l))
    (progn
    (setq l (cons name l)) (vlax-for x (setq bd (vla-item (vla-get-blocks acdoc) name))
    (if (and (eq :vlax-false (vla-get-isxref bd))
    (eq (vla-get-linetype x) "Hidden 1_5"))
    (vl-catch-all-apply 'vla-put-linetype (list x) "0"))
    )
    )
    )
    )
    (princ)
    )
    (if ss (vla-regen acdoc acAllViewports))
    (princ)
    (setvar "cmdecho" 1)
    )

    Thanks

  2. #2
    Senior Member kpblc's Avatar
    Using
    AutoCAD 2005
    Join Date
    May 2006
    Location
    Russia, St-Petersburg
    Posts
    357

    Default

    What did you mean by
    Code:
    (vl-catch-all-apply 'vla-put-linetype (list x) "0")
    ?
    Try to change it to
    Code:
    (vl-catch-all-apply (function (lambda () (vla-put-linetype x "<LineTypeName"))))
    And don't forget to change "<LineTypeName>" to requested value.
    P.S. Linetype should be already loaded to dwg
    All I say is only my opinion.

  3. #3
    Junior Member
    Discipline
    Mechanical
    kite15's Discipline Details
    Occupation
    Service
    Discipline
    Mechanical
    Details
    This is a software company working in BIM industry.
    Using
    AutoCAD 2015
    Join Date
    Oct 2015
    Location
    india
    Posts
    17

    Default Line type change in the selected blocks

    Hi kpblc,

    Thank you very much its works..

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

    Default

    what i did is i downloaded the FixBlock.lsp here

    http://www.draftsperson.net/index.ph...ck_-_Free_LISP


    and change the Linetype to Hidden
    "Memories fade but the scars still linger...."

  5. #5
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO 64-bit
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x64
    CPU:
    Pentium(R) i5 4570 @ 3.2GHz
    RAM:
    8 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    2x ThinkVision 24"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    11,720

    Default

    Registered forum members do not see this ad.

    Please read the Code Posting Guidelines and place your Code in Code Tags.
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



Similar Threads

  1. Line Type Will Not Change
    By gsksun4 in forum AutoCAD LT
    Replies: 12
    Last Post: 3rd Oct 2014, 01:48 pm
  2. LISP Routine to change colour of all selected objects (except blocks)...?
    By lamensterms in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 17th Jun 2014, 01:11 pm
  3. Break the line and change the line type
    By nalsur8 in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 13th Jul 2011, 02:12 pm
  4. Line type scales change.... BIG PROBLEM
    By RICO in forum AutoCAD Bugs, Error Messages & Quirks
    Replies: 0
    Last Post: 25th May 2011, 07:28 am
  5. Can't change line type, need some help guys.
    By T.A. Metal in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 3rd Nov 2008, 05:08 pm

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